Issue #3233491 by hooroomoo, xjm, lauriii, nod_, justafish, droplet, effulgentsia: Create process for reviewing changes in 3rd party JavaScript dependencies
parent
435dc2011d
commit
b825f91084
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue