浏览代码

Merge pull request #2085 from blink1073/update-contributing-guide

Update contributing guide and fix watch scripts
Afshin Darian 8 年之前
父节点
当前提交
f8a5f72a59
共有 3 个文件被更改,包括 5 次插入13 次删除
  1. 1 1
      CONTRIBUTING.md
  2. 2 2
      package.json
  3. 2 10
      scripts/watch-filter.js

+ 1 - 1
CONTRIBUTING.md

@@ -158,7 +158,7 @@ npm run build
 
 ```bash
 npm run clean
-npm run build:all
+npm run build
 ```
 
 ## The Jupyter Server Extension

+ 2 - 2
package.json

@@ -20,8 +20,8 @@
     "test:ie": "lerna run test:ie --concurrency 1 --stream",
     "publish": "npm update && npm install && npm run clean && npm run build && lerna publish -m \"Publish\"",
     "update:dependency": "node scripts/update-dependency.js",
-    "watch": "watch \"npm run build\" packages --wait 10 --filter=scripts/watch-filter.js",
-    "watch:main": "watch \"npm run build:main\" packages --wait 10 --filter=scripts/watch-filter.js"
+    "watch": "watch \"npm run build\" ./packages/** --wait 10 --filter=scripts/watch-filter.js",
+    "watch:main": "watch \"npm run build:main\" ./packages/** --wait 10 --filter=scripts/watch-filter.js"
   },
   "dependencies": {},
   "devDependencies": {

+ 2 - 10
scripts/watch-filter.js

@@ -1,14 +1,6 @@
 var path = require('path');
 
 module.exports = function(f, stat) {
-    if (f.indexOf('node_modules') !== -1) {
-        return false;
-    }
-    if (f.indexOf('.git') !== -1) {
-        return false;
-    }
-    if (f.indexOf('src') !== -1 && f.indexOf('style') !== -1) {
-        return false;
-    }
-    return true;
+    let parts = f.split(path.sep);
+    return parts.indexOf('src') !== -1 || parts.indexOf('style') !== -1;
 }