Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: switch from browserify to webpack (fixes #11366) #11398

Merged
merged 9 commits into from Feb 18, 2019
Merged
17 changes: 3 additions & 14 deletions Makefile.js
Expand Up @@ -796,7 +796,7 @@ target.gensite = function(prereleaseVersion) {
// 13. Update demos, but only for non-prereleases
if (!prereleaseVersion) {
echo("> Updating the demos (Step 13)");
target.browserify();
target.browserify("production");
cp("-f", "build/eslint.js", `${SITE_DIR}js/app/eslint.js`);
} else {
echo("> Skipped updating the demos (Step 13)");
Expand All @@ -809,19 +809,8 @@ target.gensite = function(prereleaseVersion) {
echo("Done generating eslint.org");
};

target.browserify = function() {

// 1. create temp and build directory
if (!test("-d", TEMP_DIR)) {
mkdir(TEMP_DIR);
}

if (!test("-d", BUILD_DIR)) {
mkdir(BUILD_DIR);
}

// 2. run webpack
exec(`${getBinFile("webpack")} --output-path=${path.resolve(__dirname, BUILD_DIR)}`);
target.browserify = function(mode = "none") {
g-plane marked this conversation as resolved.
Show resolved Hide resolved
exec(`${getBinFile("webpack")} --mode=${mode} --output-path=${path.resolve(__dirname, BUILD_DIR)}`);
};

target.checkRuleFiles = function() {
Expand Down
4 changes: 3 additions & 1 deletion lib/linter.js
Expand Up @@ -11,6 +11,7 @@

const eslintScope = require("eslint-scope"),
evk = require("eslint-visitor-keys"),
espree = require("espree"),
lodash = require("lodash"),
CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"),
ConfigOps = require("./config/config-ops"),
Expand Down Expand Up @@ -776,7 +777,8 @@ module.exports = class Linter {
ruleMaps.set(this, new Rules());
this.version = pkg.version;
this.environments = new Environments();
this.defineParser("espree", require("espree"));

this.defineParser("espree", espree);
}

/**
Expand Down