Sfoglia il codice sorgente

cleanup build and git scripts

Steven Silvester 6 anni fa
parent
commit
18633e077a
6 ha cambiato i file con 11 aggiunte e 16 eliminazioni
  1. 1 10
      .lintstagedrc
  2. 1 1
      CONTRIBUTING.md
  3. 2 1
      buildutils/src/ensure-repo.ts
  4. 1 1
      buildutils/src/prepublish.ts
  5. 2 0
      clean.py
  6. 4 3
      package.json

+ 1 - 10
.lintstagedrc

@@ -3,15 +3,6 @@
     "**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}": [
       "prettier --write",
       "git add"
-    ],
-    "**/*{.ts,.tsx}": [
-      "tslint --fix -c tslint.json",
-      "git add"
-    ],
-    "**/*{.js,.jsx}": [
-      "eslint --fix",
-      "git add"
     ]
-  },
-  "concurrent": false
+  }
 }

+ 1 - 1
CONTRIBUTING.md

@@ -101,7 +101,7 @@ Notes:
   local version of `yarn` in `jupyterlab/yarn.js` when run in the repository or
   a built application directory.
 
-- At times, it may be necessary to clean your local repo with the command `jlpm run clean:slate`. This will clean the repository, and re-install and
+- At times, it may be necessary to clean your local repo with the command `npm run clean:slate`. This will clean the repository, and re-install and
   rebuild.
 
 - If `pip` gives a `VersionConflict` error, it usually means that the installed

+ 2 - 1
buildutils/src/ensure-repo.ts

@@ -253,7 +253,8 @@ export async function ensureIntegrity(): Promise<boolean> {
       process.exit(1);
     }
     utils.run('jlpm install');
-    console.log('\n\nPlease commit the changes by running:');
+    console.log('\n\nMade integrity changes!');
+    console.log('Please commit the changes by running:');
     console.log('git commit -a -m "Package integrity updates"');
     return false;
   }

+ 1 - 1
buildutils/src/prepublish.ts

@@ -4,7 +4,7 @@
 |----------------------------------------------------------------------------*/
 import * as utils from './utils';
 
-utils.run('jlpm run clean:slate');
+utils.run('npm run clean:slate');
 utils.run('jlpm run build:packages');
 utils.run('jlpm run build:themes');
 utils.run('jlpm integrity');

+ 2 - 0
clean.py

@@ -14,3 +14,5 @@ if os.name == 'nt':
 
 
 subprocess.check_call(['git', 'clean', '-dfx'], cwd=here)
+
+subprocess.call('python -m pip uninstall -y jupyterlab'.split(), cwd=here)

+ 4 - 3
package.json

@@ -1,7 +1,7 @@
 {
   "private": true,
   "scripts": {
-    "pre-publish": "cd buildutils && npm run build && cd .. && node buildutils/lib/prepublish.js",
+    "pre-publish": "jlpm && cd buildutils && npm run build && cd .. && node buildutils/lib/prepublish.js",
     "add:sibling": "node buildutils/lib/add-sibling.js",
     "build": "jlpm run build:dev",
     "build:core": "cd jupyterlab/staging && jlpm && jlpm run build",
@@ -20,7 +20,7 @@
     "clean:dev": "cd dev_mode && jlpm run clean",
     "clean:examples": "node buildutils/lib/clean-packages.js examples",
     "clean:packages": "node buildutils/lib/clean-packages.js packages",
-    "clean:slate": "python clean.py && python -m pip uninstall -y jupyterlab && python -m pip install -v -e .",
+    "clean:slate": "python clean.py && python -m pip install -v -e .",
     "clean:src": "jlpm run clean",
     "clean:test": "lerna run clean --scope \"@jupyterlab/test-*\"",
     "clean:utils": "cd buildutils && jlpm run clean",
@@ -79,7 +79,8 @@
   },
   "husky": {
     "hooks": {
-      "pre-commit": "jlpm run integrity && lint-staged"
+      "pre-commit": "lint-staged",
+      "pre-push": "jlpm run integrity"
     }
   },
   "workspaces": [