FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
TypeScriptSamples/node/index.ts at master · 1310f/TypeScriptSamples · GitHub
1310f
TypeScriptSamples
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
TypeScriptSamples
/
node
/
index.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
18 lines (13 loc) · 372 Bytes
Breadcrumbs
TypeScriptSamples
/
node
/
index.ts
Copy path
File metadata and controls
18 lines (13 loc) · 372 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
/**
* Just running the command line program.
*/
import
{
ChildProcess
,
exec
}
from
'child_process'
;
const
main
:
Function
=
(
)
:
ChildProcess
=>
{
let
command
:
string
=
`ts-node ./src/
${
process
.
argv
[
3
]
}
.ts`
;
if
(
process
.
argv
[
2
]
===
'js'
)
{
exec
(
'tsc'
)
;
command
=
`node ./dist/
${
process
.
argv
[
3
]
}
.js`
;
}
return
exec
(
command
)
;
}
;
main
(
)
;
Back
|
FazBrowse Home
|
New Git URL