Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #716 from EvsChen/dist-scaffold
misc: not scaffold 'dist' if the user chooses default
  • Loading branch information
evenstensberg committed Jan 3, 2019
2 parents f9bb82d + 39a45d6 commit a3fe013
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/generators/init-generator.ts
Expand Up @@ -59,7 +59,6 @@ export default class InitGenerator extends Generator {
const self: this = this;
let regExpForStyles: string;
let ExtractUseProps: object[];
let outputPath: string = "dist";

process.stdout.write(
"\n" +
Expand Down Expand Up @@ -125,11 +124,9 @@ export default class InitGenerator extends Generator {
filename: "'[name].[chunkhash].js'",
};
}
if (outputTypeAnswer.outputType.length) {
outputPath = outputTypeAnswer.outputType;
}
if (!this.usingDefaults) {
this.configuration.config.webpackOptions.output.path = `path.resolve(__dirname, '${outputPath}')`;
if (!this.usingDefaults && outputTypeAnswer.outputType.length) {
this.configuration.config.webpackOptions.output.path =
`path.resolve(__dirname, '${outputTypeAnswer.outputType}')`;
}
})
.then((_: void) => {
Expand Down

0 comments on commit a3fe013

Please sign in to comment.