@cerema/cadriciel 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/global/create.js +6 -1
- package/package.json +1 -1
package/cli/global/create.js
CHANGED
|
@@ -132,8 +132,13 @@ module.exports = (args) => {
|
|
|
132
132
|
if (fs.existsSync(srcPath)) {
|
|
133
133
|
// Check if file or directory
|
|
134
134
|
const stat = await fs.promises.stat(srcPath);
|
|
135
|
+
const filterFunc = (src, dest) => {
|
|
136
|
+
if (path.basename(src) === 'node_modules') return false;
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
|
|
135
140
|
if (stat.isDirectory()) {
|
|
136
|
-
await fse.copy(srcPath, destPath);
|
|
141
|
+
await fse.copy(srcPath, destPath, { filter: filterFunc });
|
|
137
142
|
} else {
|
|
138
143
|
await fse.ensureDir(path.dirname(destPath));
|
|
139
144
|
await fse.copy(srcPath, destPath);
|