Commit b62ecfa 1 parent 11b3025 commit b62ecfa Copy full SHA for b62ecfa
File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,12 @@ module.exports = function (hexo) {
5
5
if ( hexo . env ?. cmd ?. startsWith ( 'n' ) ) {
6
6
return ;
7
7
}
8
- hexo . log . info ( 'building js' ) ;
9
- cp . execSync ( 'pnpm build' , { cwd : './themes/Anatolo' , stdio : 'inherit' } ) ;
10
- hexo . log . info ( 'build successful!' ) ;
8
+ if ( hexo . env ?. cmd === 's' || hexo . env ?. cmd === 'server' ) {
9
+ hexo . log . info ( 'Starting js watch changer...' ) ;
10
+ cp . exec ( 'pnpm watch' , { cwd : './themes/Anatolo' , stdio : 'inherit' } ) ;
11
+ } else {
12
+ hexo . log . info ( 'Building js...' ) ;
13
+ cp . execSync ( 'pnpm build' , { cwd : './themes/Anatolo' , stdio : 'inherit' } ) ;
14
+ hexo . log . info ( 'Build successful!' ) ;
15
+ }
11
16
} ;
Original file line number Diff line number Diff line change 8
8
"format:biome" : " biome format --write includes languages scripts source src" ,
9
9
"lint" : " eslint . --fix" ,
10
10
"format" : " pnpm format:stylus && pnpm format:biome && pnpm format:pretty" ,
11
+ "watch" : " rollup -w -c ./rollup.config.mjs" ,
11
12
"build" : " rollup -c ./rollup.config.mjs"
12
13
},
13
14
"dependencies" : {
You can’t perform that action at this time.
0 commit comments