File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
node_modules
2
2
extension /dist
3
- extension /manifest.json
3
+ extension /manifest.json
4
+ extension.zip
Original file line number Diff line number Diff line change
1
+ import { exec } from 'child_process'
2
+ import { log , r } from './utils'
3
+
4
+ log ( 'PACK' , '开始压缩插件' )
5
+ exec ( `zip -r extension.zip ${ r ( __dirname , '../extension' ) } ` , ( err ) => {
6
+ if ( err ) {
7
+ log ( 'PACK' , '压缩失败' )
8
+ return
9
+ }
10
+ log ( 'PACK' , '压缩完成' )
11
+ } )
Original file line number Diff line number Diff line change 10
10
"dev:pre" : " esno ./build/pre" ,
11
11
"dev:web" : " vite build --config ./build/vite.config.ts" ,
12
12
"dev:content" : " vite build --config ./build/vite.content.config.ts" ,
13
- "build" : " cross-env NODE_ENV=production run-p dev:*"
13
+ "build" : " cross-env NODE_ENV=production run-p dev:*" ,
14
+ "build:pack" : " npm run build && esno ./build/pack"
14
15
},
15
16
"devDependencies" : {
16
17
"@types/chrome" : " ^0.0.180" ,
You can’t perform that action at this time.
0 commit comments