FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-cli/bin/devkit-admin at master · kiritodeveloper/angular-cli · GitHub
kiritodeveloper
/
angular-cli
Public
forked from
angular/angular-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
angular-cli
/
bin
/
devkit-admin
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
77 lines (66 loc) · 2.2 KB
Breadcrumbs
angular-cli
/
bin
/
devkit-admin
Copy path
File metadata and controls
executable file
·
77 lines (66 loc) · 2.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env node
/**
*
@license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
'use strict'
;
/**
* This file is useful for not having to load bootstrap-local in various javascript.
* Simply use package.json to have npm scripts that use this script as well, or use
* this script directly.
*/
require
(
'../lib/bootstrap-local'
)
;
const
minimist
=
require
(
'minimist'
)
;
const
path
=
require
(
'path'
)
;
const
args
=
minimist
(
process
.
argv
.
slice
(
2
)
,
{
boolean
:
[
'verbose'
]
}
)
;
const
scriptName
=
args
.
_
.
shift
(
)
;
const
scriptPath
=
path
.
join
(
'../scripts'
,
scriptName
)
;
const
cwd
=
process
.
cwd
(
)
;
process
.
chdir
(
path
.
join
(
__dirname
,
'..'
)
)
;
// This might get awkward, so we fallback to console if there was an error.
let
logger
=
null
;
try
{
logger
=
new
(
require
(
'@angular-devkit/core'
)
.
logging
.
IndentLogger
)
(
'root'
)
;
const
{
bold
,
gray
,
red
,
yellow
,
white
}
=
require
(
'@angular-devkit/core'
)
.
terminal
;
const
filter
=
require
(
'rxjs/operators'
)
.
filter
;
logger
.
pipe
(
filter
(
entry
=>
(
entry
.
level
!==
'debug'
||
args
.
verbose
)
)
)
.
subscribe
(
entry
=>
{
let
color
=
gray
;
let
output
=
process
.
stdout
;
switch
(
entry
.
level
)
{
case
'info'
:
color
=
white
;
break
;
case
'warn'
:
color
=
yellow
;
break
;
case
'error'
:
color
=
red
;
output
=
process
.
stderr
;
break
;
case
'fatal'
:
color
=
x
=>
bold
(
red
(
x
)
)
;
output
=
process
.
stderr
;
break
;
}
output
.
write
(
color
(
entry
.
message
)
+
'\n'
)
;
}
)
;
}
catch
(
e
)
{
console
.
error
(
`Reverting to manual console logging.\nReason:
${
e
.
message
}
.`
)
;
logger
=
{
debug
:
console
.
log
.
bind
(
console
)
,
info
:
console
.
log
.
bind
(
console
)
,
warn
:
console
.
warn
.
bind
(
console
)
,
error
:
console
.
error
.
bind
(
console
)
,
fatal
:
x
=>
{
console
.
error
(
x
)
;
process
.
exit
(
100
)
;
}
,
createChild
:
(
)
=>
logger
,
}
;
}
try
{
Promise
.
resolve
(
)
.
then
(
(
)
=>
require
(
scriptPath
)
.
default
(
args
,
logger
,
cwd
)
)
.
then
(
exitCode
=>
process
.
exit
(
exitCode
||
0
)
)
.
catch
(
err
=>
{
logger
.
fatal
(
err
&&
err
.
stack
)
;
process
.
exit
(
99
)
;
}
)
;
}
catch
(
err
)
{
logger
.
fatal
(
err
.
stack
)
;
process
.
exit
(
99
)
;
}
Back
|
FazBrowse Home
|
New Git URL