This repository was archived by the owner on Feb 7, 2022. It is now read-only.
Open
Conversation
1 similar comment
pago
reviewed
Dec 29, 2017
pago
reviewed
Dec 29, 2017
src/createVariants.js
Outdated
| return function(config) { | ||
| return variants[key].map(function(value) { | ||
| var result = assign({}, config); | ||
| let result = assign({}, config); |
Contributor
There was a problem hiding this comment.
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.
pago
reviewed
Dec 30, 2017
| "targets": {"node": 4} | ||
| } | ||
| ]] | ||
| "plugins": [ |
pago
reviewed
Dec 30, 2017
src/loadConfigurationFile.js
Outdated
| function callConfigFunction(fn) { | ||
| return fn(require('minimist')(process.argv, { '--': true }).env || {}); | ||
| } | ||
| availableExtensions.some(ext => { |
Contributor
There was a problem hiding this comment.
We could take it a step further:
const ext = availableExtensions.find(ext => endsWith(configPath, ext));
return ext ? jsVariants[ext] : null;
pago
reviewed
Dec 30, 2017
src/loadConfigurationFile.js
Outdated
| if(installed) { | ||
| break; | ||
| } | ||
| for (let mod of mods) { |
Contributor
There was a problem hiding this comment.
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
runinto utility functions to reducing clutter and improve readability.