Skip to content

Commit 5a0da2e

Browse files
committed
fix: Filters out node_module when copying template (only for dev since the npm package does not contains the node_modules)
1 parent 6c14d06 commit 5a0da2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/cli/createTsLib.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ async function run(root, appName, originalDirectory) {
9999
console.log(e);
100100
}
101101
}
102-
fs.copySync(templatePath, root, { dereference: true });
102+
fs.copySync(templatePath, root, {
103+
dereference: true,
104+
filter: function(path) {
105+
return path.indexOf(`${templateName}/node_modules`) === -1;
106+
}
107+
});
103108
let packageJsonPath = path.join(root, 'package.json');
104109
let packageJson = require(packageJsonPath);
105110
packageJson.name = appName;

0 commit comments

Comments
 (0)