From 58cbcbabbf61bf905c3fdd962e650ed21d963885 Mon Sep 17 00:00:00 2001 From: Mike Nikles Date: Sun, 1 Aug 2021 22:52:03 +0000 Subject: [PATCH] chore(create-webstone-app): ignore node_modules when copying the template --- .changeset/slow-ladybugs-shop.md | 5 +++++ packages/create-webstone-app/src/index.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/slow-ladybugs-shop.md diff --git a/.changeset/slow-ladybugs-shop.md b/.changeset/slow-ladybugs-shop.md new file mode 100644 index 00000000..163a0708 --- /dev/null +++ b/.changeset/slow-ladybugs-shop.md @@ -0,0 +1,5 @@ +--- +"create-webstone-app": patch +--- + +Ignore node_modules when copying the template. diff --git a/packages/create-webstone-app/src/index.js b/packages/create-webstone-app/src/index.js index 1b13d3d5..d6871220 100644 --- a/packages/create-webstone-app/src/index.js +++ b/packages/create-webstone-app/src/index.js @@ -49,7 +49,9 @@ const createAppDir = async (appName = process.argv[2]) => { const copyTemplate = (appDir) => { console.log(`Copying template...`); const templateDir = path.join(__dirname, "..", "template"); - fs.copySync(templateDir, appDir); + fs.copySync(templateDir, appDir, { + filter: (src) => src.indexOf("node_modules") === -1, + }); return appDir; };