Skip to content

Commit

Permalink
fix(jsconfig): only create jsconfig for babel+vscode
Browse files Browse the repository at this point in the history
closes #723
  • Loading branch information
JeroenVinke committed Sep 3, 2017
1 parent 238b863 commit 173898c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/commands/new/buildsystems/webpack/editors/vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
const ProjectItem = require('../../../../../project-item').ProjectItem;

module.exports = function(project) {
if (project.model.transpiler.id !== 'typescript') {
project.addToContent(
ProjectItem.resource('jsconfig.json', 'content/jsconfig-webpack.json')
);
}

project.addToContent(
ProjectItem.directory('.vscode').add(
ProjectItem.resource('settings.json', 'content/settings.json'),
Expand Down
3 changes: 1 addition & 2 deletions lib/commands/new/buildsystems/webpack/transpilers/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ module.exports = function(project) {
project.addToContent(
ProjectItem.resource('.eslintrc.json', 'content/eslintrc.json'),
ProjectItem.resource('.babelrc.js', 'content/babelrc.webpack.js'),
ProjectItem.resource('.babelrc', 'content/babelrc.webpack'),
ProjectItem.resource('jsconfig.json', 'content/jsconfig-webpack.json')
ProjectItem.resource('.babelrc', 'content/babelrc.webpack')
)
.addToDevDependencies(
'[email protected]',
Expand Down

0 comments on commit 173898c

Please sign in to comment.