File tree 1 file changed +29
-2
lines changed
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';
6
6
import minimist from 'minimist' ;
7
7
8
8
import constants from '../../tasks/util/constants.js' ;
9
- import { context } from 'esbuild' ;
9
+ import { context , build } from 'esbuild' ;
10
10
import config from '../../esbuild-config.js' ;
11
11
12
+ import { glsl } from 'esbuild-plugin-glsl' ;
13
+
12
14
var args = minimist ( process . argv . slice ( 2 ) , { } ) ;
13
15
var PORT = args . port || 3000 ;
14
16
var strict = args . strict ;
@@ -24,11 +26,36 @@ config.outfile = './build/plotly.js';
24
26
var mockFolder = constants . pathToTestImageMocks ;
25
27
26
28
// mock list
27
- getMockFiles ( )
29
+ await getMockFiles ( )
28
30
. then ( readFiles )
29
31
. then ( createMocksList )
30
32
. then ( saveMockListToFile ) ;
31
33
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
+
32
59
var ctx = await context ( config ) ;
33
60
devServer ( ) ;
34
61
console . log ( 'watching esbuild...' ) ;
You can’t perform that action at this time.
0 commit comments