Skip to content

Commit

Permalink
fix: Filters out node_module when copying template (only for dev sinc…
Browse files Browse the repository at this point in the history
…e the npm package does not contains the node_modules)
  • Loading branch information
emyann committed Sep 28, 2018
1 parent 6c14d06 commit 5a0da2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/cli/createTsLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ async function run(root, appName, originalDirectory) {
console.log(e);
}
}
fs.copySync(templatePath, root, { dereference: true });
fs.copySync(templatePath, root, {
dereference: true,
filter: function(path) {
return path.indexOf(`${templateName}/node_modules`) === -1;
}
});
let packageJsonPath = path.join(root, 'package.json');
let packageJson = require(packageJsonPath);
packageJson.name = appName;
Expand Down

0 comments on commit 5a0da2e

Please sign in to comment.