-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Add support for templates fetched from npm
Summary: This PR allows anyone to publish templates for React Native. It's possible for people to publish modules for React Native, we should also support custom templates. A suggestion from a Cordova mantainer where they did the same thing suggests this is useful: https://github.com/mkonicek/AppTemplateFeedback/issues/1 I published a sample template [react-native-template-demo](https://www.npmjs.com/package/react-native-template-demo). (GitHub: https://github.com/mkonicek/react-native-template-demo) With this PR anyone can then use that template: `react-native init MyApp --template demo` The convention is: if someone publishes an npm package called `react-native-template-foo`, people can use it by running `react-native init MyApp --template foo`. Use a template called `react-native-template-demo` from npm: `react-native init MyApp --template demo` Use a local template: `react-native init MyApp --template file:///path_to/react-native-template-dem Closes #12548 Differential Revision: D4620567 Pulled By: mkonicek fbshipit-source-id: bb40d457a7fec28edb577f08137e73241072de3a
- Loading branch information
1 parent
37b91a6
commit 17c175a
Showing
3 changed files
with
167 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters