FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
analscript/cli.js at main · airscripts/analscript · GitHub
airscripts
/
analscript
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
1
Star
13
Code
Issues
0
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
analscript
/
cli.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (31 loc) · 772 Bytes
Breadcrumbs
analscript
/
cli.js
Copy path
File metadata and controls
37 lines (31 loc) · 772 Bytes
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
#!/usr/bin/env node
import
help
from
'./lib/help.js'
;
import
{
graceful
}
from
'./lib/utils.js'
;
import
{
run
,
compile
,
anallify
,
stringify
,
}
from
'./lib/std.js'
;
import
{
RUN
,
HELP
,
COMPILE
,
ANALLIFY
,
STRINGIFY
,
}
from
'./lib/constants.js'
;
function
cli
(
)
{
let
output
=
''
;
const
command
=
process
.
argv
[
2
]
;
const
args
=
process
.
argv
.
slice
(
3
,
process
.
argv
.
length
)
.
join
(
''
)
;
switch
(
command
)
{
case
COMPILE
:
compile
(
args
)
;
break
;
case
RUN
:
output
=
run
(
args
)
;
break
;
case
HELP
:
process
.
stdout
.
write
(
help
)
;
return
;
case
ANALLIFY
:
output
=
anallify
(
args
)
;
break
;
case
STRINGIFY
:
output
=
stringify
(
args
)
;
break
;
default
:
process
.
stdout
.
write
(
help
)
;
return
;
}
process
.
stdout
.
write
(
`
${
output
}
\n`
)
;
}
graceful
(
cli
)
;
Back
|
FazBrowse Home
|
New Git URL