Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

parallel-webpack 3.0.0 alpha #70

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

efegurkan
Copy link
Contributor

@efegurkan efegurkan commented Dec 29, 2017

  • Change worker-farm with jest-worker.
  • Add simple build process to use es6 features.
  • Split run into utility functions to reducing clutter and improve readability.
  • Dropped watch mode
  • Bump version to 3.x

@efegurkan efegurkan requested review from pago and anilanar December 29, 2017 16:27
@coveralls
Copy link

Coverage Status

Coverage decreased (-44.9%) to 42.137% when pulling 525422c on refactor/modernize-simplify-code-base into 8122728 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-44.9%) to 42.137% when pulling 525422c on refactor/modernize-simplify-code-base into 8122728 on master.

build/build.js Show resolved Hide resolved
return function(config) {
return variants[key].map(function(value) {
var result = assign({}, config);
let result = assign({}, config);
Copy link
Contributor

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": [
Copy link
Contributor

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?

function callConfigFunction(fn) {
return fn(require('minimist')(process.argv, { '--': true }).env || {});
}
availableExtensions.some(ext => {
Copy link
Contributor

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;

if(installed) {
break;
}
for (let mod of mods) {
Copy link
Contributor

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) {}
    }
});

@coveralls
Copy link

coveralls commented Jan 3, 2018

Coverage Status

Coverage decreased (-46.3%) to 40.872% when pulling 2975857 on refactor/modernize-simplify-code-base into 2c50d31 on master.

@efegurkan efegurkan force-pushed the refactor/modernize-simplify-code-base branch 5 times, most recently from ca7c704 to 0a692ed Compare January 30, 2018 15:21
@efegurkan efegurkan changed the title [WIP] Refactor/modernize simplify code base parallel-webpack 3.0.0 alpha Jan 30, 2018
-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
@efegurkan efegurkan force-pushed the refactor/modernize-simplify-code-base branch from c64c8c9 to 84326e4 Compare January 30, 2018 15:52
@efegurkan efegurkan force-pushed the refactor/modernize-simplify-code-base branch from 84326e4 to 0655444 Compare January 30, 2018 16:51
@sdemjanenko
Copy link

What remains to get this over the finish line? Do we just need to get the conflicts resolved?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants