This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Commit 82266fd 1 parent b0bf6e0 commit 82266fd Copy full SHA for 82266fd
File tree 2 files changed +10
-12
lines changed
packages/fusuma/src/tasks
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 3
3
const { join, isAbsolute } = require ( 'path' ) ;
4
4
const fusuma = require ( '../configs/fusumarc' ) ;
5
5
const { warn, error } = require ( '../cli/log' ) ;
6
- const init = require ( './init' ) ;
7
- const start = require ( './start' ) ;
8
- const build = require ( './build' ) ;
9
- const deploy = require ( './deploy' ) ;
10
- const pdf = require ( './pdf' ) ;
11
- const live = require ( './live' ) ;
12
6
13
7
async function tasks ( { type, options } ) {
14
8
const { inputDir, outputDir } = options ;
@@ -41,17 +35,17 @@ async function tasks({ type, options }) {
41
35
42
36
switch ( type ) {
43
37
case 'init' :
44
- return init ( config ) ;
38
+ return require ( './ init' ) ( config ) ;
45
39
case 'start' :
46
- return start ( config ) ;
40
+ return require ( './ start' ) ( config ) ;
47
41
case 'build' :
48
- return build ( config ) ;
42
+ return require ( './ build' ) ( config ) ;
49
43
case 'deploy' :
50
- return deploy ( config ) ;
44
+ return require ( './ deploy' ) ( config ) ;
51
45
case 'pdf' :
52
- return pdf ( config ) ;
46
+ return require ( './ pdf' ) ( config ) ;
53
47
case 'live' :
54
- return live ( config ) ;
48
+ return require ( './ live' ) ( config ) ;
55
49
}
56
50
}
57
51
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ const { start: webpackStart } = require('../webpack');
6
6
const { warn } = require ( '../cli/log' ) ;
7
7
8
8
async function start ( config ) {
9
+ if ( process . env . NODE_ENV === undefined ) {
10
+ process . env . NODE_ENV = 'development' ;
11
+ }
12
+
9
13
const spinner = new Spinner ( ) ;
10
14
11
15
try {
You can’t perform that action at this time.
0 commit comments