File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ import open from 'open';
66import minimist from 'minimist' ;
77
88import constants from '../../tasks/util/constants.js' ;
9- import { context } from 'esbuild' ;
9+ import { context , build } from 'esbuild' ;
1010import config from '../../esbuild-config.js' ;
1111
12+ import { glsl } from 'esbuild-plugin-glsl' ;
13+
1214var args = minimist ( process . argv . slice ( 2 ) , { } ) ;
1315var PORT = args . port || 3000 ;
1416var strict = args . strict ;
@@ -24,11 +26,36 @@ config.outfile = './build/plotly.js';
2426var mockFolder = constants . pathToTestImageMocks ;
2527
2628// mock list
27- getMockFiles ( )
29+ await getMockFiles ( )
2830 . then ( readFiles )
2931 . then ( createMocksList )
3032 . then ( saveMockListToFile ) ;
3133
34+ // Devtools config
35+ var devtoolsConfig = {
36+ entryPoints : [
37+ path . join ( constants . pathToRoot , 'devtools' , 'test_dashboard' , 'devtools.js' )
38+ ] ,
39+ outfile : path . join ( constants . pathToRoot , 'build' , 'test_dashboard-bundle.js' ) ,
40+ format : 'cjs' ,
41+ globalName : 'Tabs' ,
42+ bundle : true ,
43+ minify : false ,
44+ sourcemap : false ,
45+ plugins : [
46+ glsl ( {
47+ minify : true ,
48+ } ) ,
49+ ] ,
50+ define : {
51+ global : 'window' ,
52+ } ,
53+ target : 'es2016' ,
54+ logLevel : 'info' ,
55+ } ;
56+
57+ build ( devtoolsConfig ) ;
58+
3259var ctx = await context ( config ) ;
3360devServer ( ) ;
3461console . log ( 'watching esbuild...' ) ;
You can’t perform that action at this time.
0 commit comments