From e5ec57d807dd402f610cfa8ee1dd6b7dbf29d061 Mon Sep 17 00:00:00 2001 From: Tom Atterton Date: Mon, 6 Aug 2018 12:14:37 -0700 Subject: [PATCH] Ignore DevDependencies when generating template. (#20542) Summary: Regarding [Add devDependenices support for templates](https://github.com/facebook/react-native/commit/c4ab03a18e75e6ed55444b5d86f3ceee435b9a78). Once a project is created using the custom template command with devDependencies inside, the devDependenices.json file is also copied to the new projects directory. By adding this to the ignore paths we stop the devDependenices being copied into the new projects directory. Pull Request resolved: https://github.com/facebook/react-native/pull/20542 Differential Revision: D9182795 Pulled By: hramos fbshipit-source-id: 543c8ca67612a981c22fc83c8d54a25ddc0ca5fc --- local-cli/generator/templates.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-cli/generator/templates.js b/local-cli/generator/templates.js index 17e4379a72b..183bdd6438f 100644 --- a/local-cli/generator/templates.js +++ b/local-cli/generator/templates.js @@ -171,7 +171,7 @@ function createFromRemoteTemplate( // only for publishing the template to npm. // We want to ignore this dummy file, otherwise it would overwrite // our project's package.json file. - ignorePaths: ['package.json', 'dependencies.json'], + ignorePaths: ['package.json', 'dependencies.json','devDependencies.json'], }); installTemplateDependencies(templatePath, yarnVersion); installTemplateDevDependencies(templatePath, yarnVersion);