Skip to content

Commit

Permalink
fix: yeoman-generator fork issue (#294)
Browse files Browse the repository at this point in the history
* chore(generator): fix yeoman-generator fork issue

* misc(lint): add temp inline eslint disable
  • Loading branch information
dhruvdutt authored and evenstensberg committed Mar 1, 2018
1 parent 159b8dd commit 514a695
Show file tree
Hide file tree
Showing 10 changed files with 703 additions and 589 deletions.
2 changes: 1 addition & 1 deletion bin/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
const stdout = argv.silent
? {
write: () => {}
}
} // eslint-disable-line
: process.stdout;

function ifArg(name, fn, init) {
Expand Down
4 changes: 3 additions & 1 deletion lib/commands/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function serve() {
: [];

if (hasDevServerDep.length) {
let WDSPath = getRootPathModule("node_modules/webpack-dev-server/bin/webpack-dev-server.js");
let WDSPath = getRootPathModule(
"node_modules/webpack-dev-server/bin/webpack-dev-server.js"
);
if (!WDSPath) {
console.log(
"\n",
Expand Down
6 changes: 3 additions & 3 deletions lib/generators/add-generator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Generator = require("webpack-fork-yeoman-generator");
const Generator = require("yeoman-generator");
const glob = require("glob-all");
const path = require("path");
const Confirm = require("webpack-addons").Confirm;
Expand Down Expand Up @@ -124,7 +124,7 @@ module.exports = class AddGenerator extends Generator {
: webpackSchema.properties[action].anyOf
? webpackSchema.properties[action].anyOf.filter(
p => p.properties || p.enum
)
) // eslint-disable-line
: null;
if (Array.isArray(defOrPropDescription)) {
// Todo: Generalize these to go through the array, then merge enum with props if needed
Expand Down Expand Up @@ -405,7 +405,7 @@ module.exports = class AddGenerator extends Generator {
let othersDeepPropKey = deepPropAns.deepProp
? `what do you want the value of ${
deepPropAns.deepProp
} to be?`
} to be?` // eslint-disable-line
: `what do you want to be the value of ${action} to be?`;
// Push the answer to the array we have created, so we can use it later
isDeepProp.push(deepPropAns.deepProp);
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/init-generator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const Generator = require("webpack-fork-yeoman-generator");
const Generator = require("yeoman-generator");
const chalk = require("chalk");
const logSymbols = require("log-symbols");

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/remove-generator.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const Generator = require("webpack-fork-yeoman-generator");
const Generator = require("yeoman-generator");

module.exports = class RemoveGenerator extends Generator {};
2 changes: 1 addition & 1 deletion lib/generators/update-generator.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const Generator = require("webpack-fork-yeoman-generator");
const Generator = require("yeoman-generator");

module.exports = class UpdateGenerator extends Generator {};
2 changes: 1 addition & 1 deletion lib/generators/webpack-generator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var path = require("path");
var mkdirp = require("mkdirp");
var Generator = require("webpack-fork-yeoman-generator");
var Generator = require("yeoman-generator");
var copyUtils = require("../utils/copy-utils");

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/init/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const yeoman = require("yeoman-environment");
const Generator = require("webpack-fork-yeoman-generator");
const Generator = require("yeoman-generator");
const path = require("path");
const defaultGenerator = require("../generators/init-generator");
const runTransform = require("./transformations/index");
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@
"uglifyjs-webpack-plugin": "^1.2.2",
"v8-compile-cache": "^1.1.0",
"webpack-addons": "^1.1.5",
"webpack-fork-yeoman-generator": "^1.1.1",
"yargs": "9.0.1",
"yeoman-environment": "^2.0.0"
"yeoman-environment": "^2.0.0",
"yeoman-generator": "github:ev1stensberg/generator#Feature-getArgument"
},
"peerDependencies": {
"webpack": "^4.0.0-beta.1"
Expand Down
Loading

0 comments on commit 514a695

Please sign in to comment.