FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-cli/scripts/devkit-admin.mts at main · pieh/angular-cli · GitHub
pieh
/
angular-cli
Public
forked from
angular/angular-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
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
/
scripts
/
devkit-admin.mts
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (40 loc) · 1.25 KB
Breadcrumbs
angular-cli
/
scripts
/
devkit-admin.mts
Copy path
File metadata and controls
45 lines (40 loc) · 1.25 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
#!/usr/bin/env node
/**
*
@license
* Copyright Google LLC 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.dev/license
*/
import
colors
from
'ansi-colors'
;
import
path
,
{
dirname
}
from
'node:path'
;
import
{
fileURLToPath
}
from
'node:url'
;
import
yargsParser
from
'yargs-parser'
;
const
args
=
yargsParser
(
process
.
argv
.
slice
(
2
)
,
{
boolean
:
[
'verbose'
]
,
configuration
:
{
'camel-case-expansion'
:
false
,
}
,
}
)
;
const
scriptName
=
args
.
_
.
shift
(
)
;
const
cwd
=
process
.
cwd
(
)
;
const
scriptDir
=
dirname
(
fileURLToPath
(
import
.
meta
.
url
)
)
;
process
.
chdir
(
path
.
join
(
scriptDir
,
'..'
)
)
;
const
originalConsole
=
{
...
console
}
;
console
.
warn
=
function
(
...
args
)
{
const
[
m
,
...
rest
]
=
args
;
originalConsole
.
warn
(
colors
.
yellow
(
m
)
,
...
rest
)
;
}
;
console
.
error
=
function
(
...
args
)
{
const
[
m
,
...
rest
]
=
args
;
originalConsole
.
error
(
colors
.
red
(
m
)
,
...
rest
)
;
}
;
try
{
const
script
=
await
import
(
`./
${
scriptName
}
.mjs`
)
;
const
exitCode
=
await
script
.
default
(
args
,
cwd
)
;
process
.
exitCode
=
typeof
exitCode
===
'number'
?
exitCode
:
0
;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}
catch
(
err
:
any
)
{
console
.
error
(
err
.
stack
)
;
process
.
exitCode
=
99
;
}
Back
|
FazBrowse Home
|
New Git URL