Browse Source

Preparing to publish

Afshin T. Darian 5 years ago
parent
commit
e9d3400104
4 changed files with 510 additions and 622 deletions
  1. 1 1
      dev_mode/package.json
  2. 58 58
      jupyterlab/staging/package.json
  3. 5 117
      jupyterlab/staging/webpack.config.js
  4. 446 446
      jupyterlab/staging/yarn.lock

+ 1 - 1
dev_mode/package.json

@@ -4,7 +4,7 @@
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {
     "build": "webpack",
     "build": "webpack",
-    "build:prod": "node --max_old_space_size=4096 ../node_modules/webpack/bin/webpack.js --config webpack.prod.config.js",
+    "build:prod": "webpack --config webpack.prod.config.js",
     "build:prod:stats": "webpack --profile --config webpack.prod.config.js --json > stats.json",
     "build:prod:stats": "webpack --profile --config webpack.prod.config.js --json > stats.json",
     "build:stats": "webpack --profile --json > stats.json",
     "build:stats": "webpack --profile --json > stats.json",
     "clean": "rimraf build",
     "clean": "rimraf build",

+ 58 - 58
jupyterlab/staging/package.json

@@ -1,10 +1,10 @@
 {
 {
   "name": "@jupyterlab/application-top",
   "name": "@jupyterlab/application-top",
-  "version": "1.0.0-rc.0",
+  "version": "1.0.0-rc.2",
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {
     "build": "webpack",
     "build": "webpack",
-    "build:prod": "node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --config webpack.prod.config.js",
+    "build:prod": "webpack --config webpack.prod.config.js",
     "build:prod:stats": "webpack --profile --config webpack.prod.config.js --json > stats.json",
     "build:prod:stats": "webpack --profile --config webpack.prod.config.js --json > stats.json",
     "build:stats": "webpack --profile --json > stats.json",
     "build:stats": "webpack --profile --json > stats.json",
     "clean": "rimraf build",
     "clean": "rimraf build",
@@ -12,59 +12,59 @@
     "watch": "webpack --watch"
     "watch": "webpack --watch"
   },
   },
   "dependencies": {
   "dependencies": {
-    "@jupyterlab/application": "^1.0.0-rc.0",
-    "@jupyterlab/application-extension": "^1.0.0-rc.0",
-    "@jupyterlab/apputils": "^1.0.0-rc.0",
-    "@jupyterlab/apputils-extension": "^1.0.0-rc.0",
-    "@jupyterlab/codemirror-extension": "^1.0.0-rc.0",
-    "@jupyterlab/completer-extension": "^1.0.0-rc.0",
-    "@jupyterlab/console": "^1.0.0-rc.0",
-    "@jupyterlab/console-extension": "^1.0.0-rc.0",
-    "@jupyterlab/coreutils": "^3.0.0-rc.0",
-    "@jupyterlab/csvviewer-extension": "^1.0.0-rc.0",
-    "@jupyterlab/docmanager": "^1.0.0-rc.0",
-    "@jupyterlab/docmanager-extension": "^1.0.0-rc.0",
-    "@jupyterlab/documentsearch-extension": "^1.0.0-rc.0",
-    "@jupyterlab/extensionmanager": "^1.0.0-rc.0",
-    "@jupyterlab/extensionmanager-extension": "^1.0.0-rc.0",
-    "@jupyterlab/filebrowser": "^1.0.0-rc.0",
-    "@jupyterlab/filebrowser-extension": "^1.0.0-rc.0",
-    "@jupyterlab/fileeditor": "^1.0.0-rc.0",
-    "@jupyterlab/fileeditor-extension": "^1.0.0-rc.0",
-    "@jupyterlab/help-extension": "^1.0.0-rc.0",
-    "@jupyterlab/htmlviewer-extension": "^1.0.0-rc.0",
-    "@jupyterlab/hub-extension": "^1.0.0-rc.0",
-    "@jupyterlab/imageviewer": "^1.0.0-rc.0",
-    "@jupyterlab/imageviewer-extension": "^1.0.0-rc.0",
-    "@jupyterlab/inspector-extension": "^1.0.0-rc.0",
-    "@jupyterlab/javascript-extension": "^1.0.0-rc.0",
-    "@jupyterlab/json-extension": "^1.0.0-rc.0",
-    "@jupyterlab/launcher": "^1.0.0-rc.0",
-    "@jupyterlab/launcher-extension": "^1.0.0-rc.0",
-    "@jupyterlab/mainmenu-extension": "^1.0.0-rc.0",
-    "@jupyterlab/markdownviewer-extension": "^1.0.0-rc.0",
-    "@jupyterlab/mathjax2-extension": "^1.0.0-rc.0",
-    "@jupyterlab/notebook": "^1.0.0-rc.0",
-    "@jupyterlab/notebook-extension": "^1.0.0-rc.0",
-    "@jupyterlab/pdf-extension": "^1.0.0-rc.0",
-    "@jupyterlab/rendermime": "^1.0.0-rc.0",
-    "@jupyterlab/rendermime-extension": "^1.0.0-rc.0",
-    "@jupyterlab/rendermime-interfaces": "^1.3.0-rc.0",
-    "@jupyterlab/running-extension": "^1.0.0-rc.0",
-    "@jupyterlab/services": "^4.0.0-rc.0",
-    "@jupyterlab/settingeditor-extension": "^1.0.0-rc.0",
-    "@jupyterlab/shortcuts-extension": "^1.0.0-rc.0",
-    "@jupyterlab/statusbar-extension": "^1.0.0-rc.0",
-    "@jupyterlab/tabmanager-extension": "^1.0.0-rc.0",
-    "@jupyterlab/terminal": "^1.0.0-rc.0",
-    "@jupyterlab/terminal-extension": "^1.0.0-rc.0",
-    "@jupyterlab/theme-dark-extension": "^1.0.0-rc.0",
-    "@jupyterlab/theme-light-extension": "^1.0.0-rc.0",
-    "@jupyterlab/tooltip": "^1.0.0-rc.0",
-    "@jupyterlab/tooltip-extension": "^1.0.0-rc.0",
-    "@jupyterlab/vdom-extension": "^1.0.0-rc.0",
-    "@jupyterlab/vega4-extension": "^1.0.0-rc.0",
-    "@jupyterlab/vega5-extension": "^1.0.0-rc.0",
+    "@jupyterlab/application": "^1.0.0-rc.1",
+    "@jupyterlab/application-extension": "^1.0.0-rc.1",
+    "@jupyterlab/apputils": "^1.0.0-rc.1",
+    "@jupyterlab/apputils-extension": "^1.0.0-rc.1",
+    "@jupyterlab/codemirror-extension": "^1.0.0-rc.1",
+    "@jupyterlab/completer-extension": "^1.0.0-rc.1",
+    "@jupyterlab/console": "^1.0.0-rc.1",
+    "@jupyterlab/console-extension": "^1.0.0-rc.1",
+    "@jupyterlab/coreutils": "^3.0.0-rc.1",
+    "@jupyterlab/csvviewer-extension": "^1.0.0-rc.1",
+    "@jupyterlab/docmanager": "^1.0.0-rc.1",
+    "@jupyterlab/docmanager-extension": "^1.0.0-rc.1",
+    "@jupyterlab/documentsearch-extension": "^1.0.0-rc.1",
+    "@jupyterlab/extensionmanager": "^1.0.0-rc.1",
+    "@jupyterlab/extensionmanager-extension": "^1.0.0-rc.1",
+    "@jupyterlab/filebrowser": "^1.0.0-rc.1",
+    "@jupyterlab/filebrowser-extension": "^1.0.0-rc.1",
+    "@jupyterlab/fileeditor": "^1.0.0-rc.1",
+    "@jupyterlab/fileeditor-extension": "^1.0.0-rc.1",
+    "@jupyterlab/help-extension": "^1.0.0-rc.1",
+    "@jupyterlab/htmlviewer-extension": "^1.0.0-rc.1",
+    "@jupyterlab/hub-extension": "^1.0.0-rc.1",
+    "@jupyterlab/imageviewer": "^1.0.0-rc.1",
+    "@jupyterlab/imageviewer-extension": "^1.0.0-rc.1",
+    "@jupyterlab/inspector-extension": "^1.0.0-rc.1",
+    "@jupyterlab/javascript-extension": "^1.0.0-rc.1",
+    "@jupyterlab/json-extension": "^1.0.0-rc.1",
+    "@jupyterlab/launcher": "^1.0.0-rc.1",
+    "@jupyterlab/launcher-extension": "^1.0.0-rc.1",
+    "@jupyterlab/mainmenu-extension": "^1.0.0-rc.1",
+    "@jupyterlab/markdownviewer-extension": "^1.0.0-rc.1",
+    "@jupyterlab/mathjax2-extension": "^1.0.0-rc.1",
+    "@jupyterlab/notebook": "^1.0.0-rc.1",
+    "@jupyterlab/notebook-extension": "^1.0.0-rc.1",
+    "@jupyterlab/pdf-extension": "^1.0.0-rc.1",
+    "@jupyterlab/rendermime": "^1.0.0-rc.1",
+    "@jupyterlab/rendermime-extension": "^1.0.0-rc.1",
+    "@jupyterlab/rendermime-interfaces": "^1.3.0-rc.1",
+    "@jupyterlab/running-extension": "^1.0.0-rc.1",
+    "@jupyterlab/services": "^4.0.0-rc.1",
+    "@jupyterlab/settingeditor-extension": "^1.0.0-rc.1",
+    "@jupyterlab/shortcuts-extension": "^1.0.0-rc.1",
+    "@jupyterlab/statusbar-extension": "^1.0.0-rc.1",
+    "@jupyterlab/tabmanager-extension": "^1.0.0-rc.1",
+    "@jupyterlab/terminal": "^1.0.0-rc.1",
+    "@jupyterlab/terminal-extension": "^1.0.0-rc.1",
+    "@jupyterlab/theme-dark-extension": "^1.0.0-rc.1",
+    "@jupyterlab/theme-light-extension": "^1.0.0-rc.1",
+    "@jupyterlab/tooltip": "^1.0.0-rc.1",
+    "@jupyterlab/tooltip-extension": "^1.0.0-rc.1",
+    "@jupyterlab/vdom-extension": "^1.0.0-rc.1",
+    "@jupyterlab/vega4-extension": "^1.0.0-rc.1",
+    "@jupyterlab/vega5-extension": "^1.0.0-rc.1",
     "@phosphor/algorithm": "^1.1.3",
     "@phosphor/algorithm": "^1.1.3",
     "@phosphor/application": "^1.6.3",
     "@phosphor/application": "^1.6.3",
     "@phosphor/commands": "^1.6.3",
     "@phosphor/commands": "^1.6.3",
@@ -86,7 +86,7 @@
     "url-parse": "~1.4.3"
     "url-parse": "~1.4.3"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@jupyterlab/buildutils": "^1.0.0-rc.0",
+    "@jupyterlab/buildutils": "^1.0.0-rc.2",
     "css-loader": "~2.1.1",
     "css-loader": "~2.1.1",
     "duplicate-package-checker-webpack-plugin": "^3.0.0",
     "duplicate-package-checker-webpack-plugin": "^3.0.0",
     "file-loader": "~3.0.1",
     "file-loader": "~3.0.1",
@@ -116,6 +116,8 @@
     "node": ">=6.11.5"
     "node": ">=6.11.5"
   },
   },
   "jupyterlab": {
   "jupyterlab": {
+    "name": "JupyterLab",
+    "version": "1.0.0rc1",
     "extensions": {
     "extensions": {
       "@jupyterlab/application-extension": "",
       "@jupyterlab/application-extension": "",
       "@jupyterlab/apputils-extension": "",
       "@jupyterlab/apputils-extension": "",
@@ -157,7 +159,6 @@
       "@jupyterlab/vega4-extension": "",
       "@jupyterlab/vega4-extension": "",
       "@jupyterlab/vega5-extension": ""
       "@jupyterlab/vega5-extension": ""
     },
     },
-    "name": "JupyterLab",
     "buildDir": "./build",
     "buildDir": "./build",
     "outputDir": "..",
     "outputDir": "..",
     "singletonPackages": [
     "singletonPackages": [
@@ -209,7 +210,6 @@
       "url-parse",
       "url-parse",
       "xterm"
       "xterm"
     ],
     ],
-    "version": "1.0.0rc0",
     "linkedPackages": {},
     "linkedPackages": {},
     "staticDir": "../static"
     "staticDir": "../static"
   }
   }

+ 5 - 117
jupyterlab/staging/webpack.config.js

@@ -12,6 +12,7 @@ var DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-p
 var Visualizer = require('webpack-visualizer-plugin');
 var Visualizer = require('webpack-visualizer-plugin');
 
 
 var Build = require('@jupyterlab/buildutils').Build;
 var Build = require('@jupyterlab/buildutils').Build;
+var WPPlugin = require('@jupyterlab/buildutils').WPPlugin;
 var package_data = require('./package.json');
 var package_data = require('./package.json');
 
 
 // Handle the extensions.
 // Handle the extensions.
@@ -84,7 +85,8 @@ function maybeSync(localPath, name, rest) {
 
 
 /**
 /**
  * A filter function set up to exclude all files that are not
  * A filter function set up to exclude all files that are not
- * in a package contained by the Jupyterlab repo
+ * in a package contained by the Jupyterlab repo. Used to ignore
+ * files during a `--watch` build.
  */
  */
 function ignored(path) {
 function ignored(path) {
   path = plib.resolve(path);
   path = plib.resolve(path);
@@ -112,120 +114,6 @@ function ignored(path) {
   return ignore;
   return ignore;
 }
 }
 
 
-// custom webpack plugin definitions.
-// These can be removed the next time @jupyterlab/buildutils is published on npm
-class FrontEndPlugin {
-  constructor(buildDir, staticDir) {
-    this.buildDir = buildDir;
-    this.staticDir = staticDir;
-
-    this._first = true;
-  }
-
-  apply(compiler) {
-    compiler.hooks.afterEmit.tap('JupyterFrontEndPlugin', () => {
-      // bail if no staticDir
-      if (!this.staticDir) {
-        return;
-      }
-
-      // ensure a clean static directory on the first emit
-      if (this._first && fs.existsSync(this.staticDir)) {
-        fs.removeSync(this.staticDir);
-      }
-      this._first = false;
-
-      fs.copySync(this.buildDir, this.staticDir);
-    });
-  }
-}
-
-class FilterIgnoringWatchFileSystem {
-  constructor(wfs, ignored) {
-    this.wfs = wfs;
-    // ignored should be a callback function that filters the build files
-    this.ignored = ignored;
-  }
-
-  watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) {
-    const notIgnored = path => !this.ignored(path);
-
-    const ignoredFiles = files.filter(ignored);
-    const ignoredDirs = dirs.filter(ignored);
-
-    const watcher = this.wfs.watch(
-      files.filter(notIgnored),
-      dirs.filter(notIgnored),
-      missing,
-      startTime,
-      options,
-      (
-        err,
-        filesModified,
-        dirsModified,
-        missingModified,
-        fileTimestamps,
-        dirTimestamps,
-        removedFiles
-      ) => {
-        if (err) return callback(err);
-        for (const path of ignoredFiles) {
-          fileTimestamps.set(path, 1);
-        }
-
-        for (const path of ignoredDirs) {
-          dirTimestamps.set(path, 1);
-        }
-
-        callback(
-          err,
-          filesModified,
-          dirsModified,
-          missingModified,
-          fileTimestamps,
-          dirTimestamps,
-          removedFiles
-        );
-      },
-      callbackUndelayed
-    );
-
-    return {
-      close: () => watcher.close(),
-      pause: () => watcher.pause(),
-      getContextTimestamps: () => {
-        const dirTimestamps = watcher.getContextTimestamps();
-        for (const path of ignoredDirs) {
-          dirTimestamps.set(path, 1);
-        }
-        return dirTimestamps;
-      },
-      getFileTimestamps: () => {
-        const fileTimestamps = watcher.getFileTimestamps();
-        for (const path of ignoredFiles) {
-          fileTimestamps.set(path, 1);
-        }
-        return fileTimestamps;
-      }
-    };
-  }
-}
-
-class FilterWatchIgnorePlugin {
-  constructor(ignored) {
-    this.ignored = ignored;
-  }
-
-  apply(compiler) {
-    compiler.hooks.afterEnvironment.tap('FilterWatchIgnorePlugin', () => {
-      compiler.watchFileSystem = new FilterIgnoringWatchFileSystem(
-        compiler.watchFileSystem,
-        this.ignored
-      );
-    });
-  }
-}
-
 const plugins = [
 const plugins = [
   new DuplicatePackageCheckerPlugin({
   new DuplicatePackageCheckerPlugin({
     verbose: true,
     verbose: true,
@@ -244,9 +132,9 @@ const plugins = [
   new webpack.HashedModuleIdsPlugin(),
   new webpack.HashedModuleIdsPlugin(),
 
 
   // custom plugin for ignoring files during a `--watch` build
   // custom plugin for ignoring files during a `--watch` build
-  new FilterWatchIgnorePlugin(ignored),
+  new WPPlugin.FilterWatchIgnorePlugin(ignored),
   // custom plugin that copies the assets to the static directory
   // custom plugin that copies the assets to the static directory
-  new FrontEndPlugin(buildDir, jlab.staticDir)
+  new WPPlugin.FrontEndPlugin(buildDir, jlab.staticDir)
 ];
 ];
 
 
 if (process.argv.includes('--analyze')) {
 if (process.argv.includes('--analyze')) {

File diff suppressed because it is too large
+ 446 - 446
jupyterlab/staging/yarn.lock


Some files were not shown because too many files changed in this diff