Browse Source

Merge pull request #212 from blink1073/fix-examples

Fix the example builds for older versions of npm
A. Darian 8 years ago
parent
commit
1e8d976055
3 changed files with 33 additions and 7 deletions
  1. 17 1
      examples/console/package.json
  2. 15 1
      examples/notebook/package.json
  3. 1 5
      scripts/buildexamples.js

+ 17 - 1
examples/console/package.json

@@ -8,6 +8,22 @@
     "update": "rimraf node_modules/jupyter-js-notebook && npm install"
   },
   "devDependencies": {
-    "concurrently": "^2.0.0"
+    "concurrently": "^2.0.0",
+    "css-loader": "^0.23.1",
+    "rimraf": "^2.5.2",
+    "style-loader": "^0.13.1",
+    "typescript": "^1.8.10",
+    "webpack": "^1.13.0"
+  },
+  "dependencies": {
+    "jupyter-js-notebook": "file:../..",
+    "jupyter-js-services": "^0.10.1",
+    "jupyter-js-utils": "^0.4.0",
+    "phosphor-commandpalette": "^0.2.0",
+    "phosphor-disposable": "^1.0.5",
+    "phosphor-keymap": "^0.8.0",
+    "phosphor-signaling": "^1.2.0",
+    "phosphor-splitpanel": "^1.0.0-rc.1",
+    "phosphor-widget": "^1.0.0-rc.1"
   }
 }

+ 15 - 1
examples/notebook/package.json

@@ -8,6 +8,20 @@
     "update": "rimraf node_modules/jupyter-js-notebook && npm install"
   },
   "devDependencies": {
-    "concurrently": "^2.0.0"
+    "concurrently": "^2.0.0",
+    "css-loader": "^0.23.1",
+    "rimraf": "^2.5.2",
+    "style-loader": "^0.13.1",
+    "typescript": "^1.8.10",
+    "webpack": "^1.13.0"
+  },
+  "dependencies": {
+    "jupyter-js-notebook": "file:../..",
+    "jupyter-js-services": "^0.10.1",
+    "jupyter-js-ui": "^0.11.2",
+    "phosphor-commandpalette": "^0.2.0",
+    "phosphor-keymap": "^0.8.0",
+    "phosphor-splitpanel": "^1.0.0-rc.1",
+    "phosphor-widget": "^1.0.0-rc.1"
   }
 }

+ 1 - 5
scripts/buildexamples.js

@@ -1,11 +1,6 @@
 var childProcess = require('child_process');
 var fs = require('fs');
 
-process.chdir('examples');
-childProcess.execSync('npm install', { stdio: 'inherit' });
-childProcess.execSync('npm run update', { stdio: 'inherit' });
-process.chdir('..');
-
 // Build all of the example folders.
 dirs = fs.readdirSync('examples');
 
@@ -19,6 +14,7 @@ for (var i = 0; i < dirs.length; i++) {
   }
   console.log('\n***********\nBuilding: ' + dirs[i] + '...');
   process.chdir('examples/' + dirs[i]);
+  childProcess.execSync('npm run update', { stdio: 'inherit' });
   childProcess.execSync('npm run build', { stdio: 'inherit' });
   process.chdir('../..');