File tree Expand file tree Collapse file tree 3 files changed +60
-5
lines changed
Expand file tree Collapse file tree 3 files changed +60
-5
lines changed Original file line number Diff line number Diff line change 11dist
22node_modules
3- * .js
4- * .d.ts
5- * .map
63* .tsbuildinfo
74extensions /labs /lib
85* .vsix
6+
7+ packages /* /* .d.ts
8+ packages /* /* .js
9+ packages /* /* .map
10+ packages /* /lib /** /* .d.ts
11+ packages /* /lib /** /* .js
12+ packages /* /lib /** /* .map
Original file line number Diff line number Diff line change 1+ // @ts -check
2+
3+ require ( 'esbuild' ) . context ( {
4+ entryPoints : {
5+ extension : './src/extension.js' ,
6+ } ,
7+ bundle : true ,
8+ metafile : process . argv . includes ( '--metafile' ) ,
9+ outdir : './dist' ,
10+ external : [
11+ 'vscode' ,
12+ ] ,
13+ format : 'cjs' ,
14+ platform : 'node' ,
15+ tsconfig : './tsconfig.json' ,
16+ define : { 'process.env.NODE_ENV' : '"production"' } ,
17+ minify : process . argv . includes ( '--minify' ) ,
18+ plugins : [
19+ require ( 'esbuild-plugin-copy' ) . copy ( {
20+ resolveFrom : 'cwd' ,
21+ assets : {
22+ from : [ './node_modules/esbuild-visualizer/dist/lib/**/*' ] ,
23+ to : [ './lib' ] ,
24+ } ,
25+ // @ts -expect-error
26+ keepStructure : true ,
27+ } ) ,
28+ {
29+ name : 'meta' ,
30+ setup ( build ) {
31+ build . onEnd ( ( result ) => {
32+ if ( result . metafile && result . errors . length === 0 ) {
33+ require ( 'fs' ) . writeFileSync (
34+ require ( 'path' ) . resolve ( __dirname , '../meta.json' ) ,
35+ JSON . stringify ( result . metafile ) ,
36+ ) ;
37+ }
38+ } ) ;
39+ } ,
40+ } ,
41+ ] ,
42+ } ) . then ( async ctx => {
43+ console . log ( 'building...' ) ;
44+ if ( process . argv . includes ( '--watch' ) ) {
45+ await ctx . watch ( ) ;
46+ console . log ( 'watching...' ) ;
47+ } else {
48+ await ctx . rebuild ( ) ;
49+ await ctx . dispose ( ) ;
50+ console . log ( 'finished.' ) ;
51+ }
52+ } ) ;
Original file line number Diff line number Diff line change 22 "private" : true ,
33 "scripts" : {
44 "build" : " tsc -b" ,
5- "watch" : " npm run build && (npm run watch:base & npm run watch:labs)" ,
6- "watch:base" : " tsc -b -w" ,
5+ "watch" : " tsc -b -w" ,
76 "watch:labs" : " cd extensions/labs && npm run watch" ,
87 "prerelease" : " npm run build && npm run test" ,
98 "release" : " lerna publish --exact --force-publish --yes --sync-workspace-lock --no-push" ,
You can’t perform that action at this time.
0 commit comments