react-reality-cli v1.0.0
react-reality-cli
Command line interface for react-reality projects
Installation
yarn global add rhdeck/react-reality-clior
npm i g rhdeck/react-reality-cliUsage
init
Create a new react-reality project
react-reality init myprojector use the short alias:
rr init myprojectFun Fact You can use rr as an alias for any of your react-native commands. rr run-ios helps, and is shorter!
Templates
Specify the react-reality template you want to use for faster initialization:
react-reality init myproject --template <mytemplate>or try the short version
rr init myproject -t <mytemplate>Pre-Built Templates
To help with learning react-reality, some basic apps are available as templates
holokit
Deploys a package designed for use with HoloKit heads-up stereoscopic display.
rr init myproject -t holokitURL
Any url specified with a file://, http:// or https:// scheme will reference a react-reality template a that location.
rr init myproject -t https://github.com/rhdeck/react-reality-template-holokitnpm scoped project
Any argument prefixed with a @ and containing a slash is assumed to be a scoped npm project, in the form @scope/project. Passes through to npm
rr init myproject -t @myscope/mytemplateGitHub repository
Any argument containing a slash (that does not start with the @) is assumed to refer to a github repository, and builds a https url to access it.
rr init myproject -t rhdeck/react-reality-template-holokitNPM projects
Any other string tries to build a URL from NPM with the prefix "react-reality-template-", like a react-native template would.
rr init myproject -t holokitNote on building templates of your own
Templates parallel the build system from react-native. They must contain:
package.jsonused for identification only. Should include a name and version.dependencies.jsonindicating dependencies that should be added to the project. (should include the react-reality package and react-native-swift at a minimum)- Any other files you want copied into your package that would override the core react-native files. Usually
App.jsis defined here, since it is the center of the app experience.
Note Templates are installed by first adding then removing from your dependencies. So you will not find them in your project post-install.
7 years ago