Verified Commit 91ebf8e7 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3233491 by hooroomoo, xjm, lauriii, nod_, justafish, droplet,...

Issue #3233491 by hooroomoo, xjm, lauriii, nod_, justafish, droplet, effulgentsia: Create process for reviewing changes in 3rd party JavaScript dependencies

(cherry picked from commit b825f910)
parent 41b04e45
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -10,7 +10,9 @@ function getDirectories(srcpath) {
    .filter((item) => fs.statSync(path.join(srcpath, item)).isDirectory());
}

module.exports = [];
const prodPluginBuilds = [];
const devPluginBuilds = [];

// Loop through every subdirectory in ckeditor5_plugins, which should be a different
// plugin, and build them all in ./build.
getDirectories(path.resolve(__dirname, './js/ckeditor5_plugins')).forEach((dir) => {
@@ -59,5 +61,17 @@ getDirectories(path.resolve(__dirname, './js/ckeditor5_plugins')).forEach((dir)
    },
  };

  module.exports.push(bc);
  const dev = {...bc, mode: 'development', optimization: {...bc.optimization, minimize: false}, devtool: false};

  prodPluginBuilds.push(bc);
  devPluginBuilds.push(dev);
});

module.exports = (env, argv) => {
  // Files aren't minified in build with the development flag.
  if (argv.mode === 'development') {
    return devPluginBuilds;
  } else {
    return prodPluginBuilds;
  }
}
+3 −1
Original line number Diff line number Diff line
@@ -31,7 +31,9 @@
    "watch:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js --watch",
    "build:ckeditor5": "webpack --config ./modules/ckeditor5/webpack.config.js",
    "check:ckeditor5": "node ./scripts/js/ckeditor5-check-plugins.js",
    "build:ckeditor5-types": "node ./scripts/js/ckeditor5-types-documentation.js"
    "build:ckeditor5-types": "node ./scripts/js/ckeditor5-types-documentation.js",
    "build:ckeditor5-dev": "yarn build:ckeditor5 --mode=development",
    "watch:ckeditor5-dev": "yarn watch:ckeditor5 --mode=development"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",