-
Notifications
You must be signed in to change notification settings - Fork 96
parallel-webpack 3.0.0 alpha #70
base: master
Are you sure you want to change the base?
Conversation
1 similar comment
src/createVariants.js
Outdated
return function(config) { | ||
return variants[key].map(function(value) { | ||
var result = assign({}, config); | ||
let result = assign({}, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're introducing babel for pre-compilation, we probably can rewrite this a bit:
const transforms = Object.keys(variants).map(key => config => variants[key].map(value => ({ ...config, [key]: value }));
Would allow us to get rid of the lodash.assign
dependency.
.babelrc
Outdated
"targets": {"node": 4} | ||
} | ||
]] | ||
"plugins": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep the env
preset?
src/loadConfigurationFile.js
Outdated
function callConfigFunction(fn) { | ||
return fn(require('minimist')(process.argv, { '--': true }).env || {}); | ||
} | ||
availableExtensions.some(ext => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could take it a step further:
const ext = availableExtensions.find(ext => endsWith(configPath, ext));
return ext ? jsVariants[ext] : null;
src/loadConfigurationFile.js
Outdated
if(installed) { | ||
break; | ||
} | ||
for (let mod of mods) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a good case for .some
:
const installed = mods.some(mod => {
if (typeof mod === 'string') {
try {
require(mod);
return true;
} catch (ignored) {}
} else if (typeof mod === 'object') {
try {
var s = require(mod.module);
mod.register(s);
return true;
} catch (ignored) {}
}
});
ca7c704
to
0a692ed
Compare
-Modernize code base to es6, add prettier. -Create build and watch scripts. -Add build script. Transforms files to dist folder if they are JS files otherwise it copies the file. -Add watch script. Watches changes on source files and runs build accordingly. -Move tests and index file to src. -Change babelrc to use on build. -Rearrange config files to not include tests and irrelevant files while packing for release. -Change code base to ES6 imports. -Add yarn.lock file. -Add yarn scripts to build and test before release. -Change worker-farm with jest-worker -Drop support for watch mode
c64c8c9
to
84326e4
Compare
84326e4
to
0655444
Compare
What remains to get this over the finish line? Do we just need to get the conflicts resolved? |
run
into utility functions to reducing clutter and improve readability.