File tree 5 files changed +16
-6
lines changed
5 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ nav_order: 3
10
10
** skuba** lets you interactively run your TypeScript source code during development.
11
11
The following commands are powered by [ ` ts-node ` ] and [ ` ts-node-dev ` ] .
12
12
13
+ These commands are only intended to serve local development and simple scripting scenarios,
14
+ as a TypeScript process can present substantial overhead at runtime.
15
+ In production, we recommend [ ` skuba build ` ] ing your project and executing under a regular Node.js runtime.
16
+
13
17
---
14
18
15
19
## skuba node
@@ -125,6 +129,7 @@ const app = express();
125
129
export default Object .assign (app , { port });
126
130
` ` `
127
131
132
+ [ ` skuba build ` ]: ./build.md
128
133
[ ` skuba -dive /register ` ]: https://github.com/seek-oss/skuba-dive#register
129
134
[ ` ts -node -dev ` ]: https://github.com/whitecolor/ts-node-dev
130
135
[ ` ts -node ` ]: https://github.com/typestrong/ts-node
Original file line number Diff line number Diff line change @@ -118,7 +118,8 @@ export const configure = async () => {
118
118
log . plain ( log . bold ( 'yarn format' ) ) ;
119
119
120
120
log . newline ( ) ;
121
- process . exit ( 1 ) ;
121
+ process . exitCode = 1 ;
122
+ return ;
122
123
}
123
124
try {
124
125
await exec ( 'npx' , 'yarn-deduplicate' , '--strategy=highest' ) ;
Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ export const init = async () => {
112
112
log . ok ( 'git push --set-upstream origin master' ) ;
113
113
114
114
log . newline ( ) ;
115
- process . exit ( 1 ) ;
115
+ process . exitCode = 1 ;
116
+ return ;
116
117
}
117
118
118
119
log . newline ( ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ const skuba = async () => {
34
34
35
35
if ( ! hasProp ( commandModule , moduleName ) ) {
36
36
log . err ( log . bold ( commandName ) , "couldn't run! Please submit an issue." ) ;
37
- process . exit ( 1 ) ;
37
+ process . exitCode = 1 ;
38
+ return ;
38
39
}
39
40
40
41
const run = commandModule [ moduleName ] as ( ) = > Promise < unknown > ;
@@ -46,7 +47,7 @@ const skuba = async () => {
46
47
await showLogoAndVersionInfo ( ) ;
47
48
showHelp ( ) ;
48
49
49
- process . exit ( 1 ) ;
50
+ process . exitCode = 1 ;
50
51
} ;
51
52
52
53
skuba ( ) . catch ( handleCliError ) ;
Original file line number Diff line number Diff line change @@ -24,11 +24,13 @@ const isExecaError = (err: unknown): err is ExecaError =>
24
24
25
25
export const handleCliError = ( err : unknown ) => {
26
26
if ( isExecaError ( err ) ) {
27
- process . exit ( err . exitCode ) ;
27
+ process . exitCode = err . exitCode ;
28
+ return ;
28
29
}
29
30
30
31
log . err ( err ) ;
31
- process . exit ( 1 ) ;
32
+ process . exitCode = 1 ;
33
+ return ;
32
34
} ;
33
35
34
36
export const isErrorWithCode = < T > (
You can’t perform that action at this time.
0 commit comments