Parcourir la source

Push the build script down to each example folder

Steven Silvester il y a 9 ans
Parent
commit
b0ebc3affa

+ 7 - 0
examples/filebrowser/package.json

@@ -0,0 +1,7 @@
+{
+  "private": true,
+  "name": "example",
+  "scripts": {
+    "build": "tsc --project src && webpack --config webpack.conf.js"
+  }
+}

+ 7 - 0
examples/terminal/package.json

@@ -0,0 +1,7 @@
+{
+  "private": true,
+  "name": "example",
+  "scripts": {
+    "build": "tsc --project src && webpack --config webpack.conf.js"
+  }
+}

+ 1 - 4
scripts/buildexamples.js

@@ -20,10 +20,7 @@ for (var i = 0; i < dirs.length; i++) {
   console.log('Building: ' + dirs[i] + '...');
   cmd = 'tsconfig -u examples/' + dirs[i] + '/src/tsconfig.json';
   childProcess.execSync(cmd, { stdio: [0, 1, 2] });
-  cmd = 'tsc --project examples/' + dirs[i] + '/src';
-  childProcess.execSync(cmd, { stdio: [0, 1, 2] });
   process.chdir('examples/' + dirs[i]);
-  cmd = 'webpack --config webpack.conf.js';
-  childProcess.execSync(cmd, { stdio: [0, 1, 2] });
+  childProcess.execSync('npm run build', { stdio: [0, 1, 2] });
   process.chdir('../..');
 }