react-instant
Instantly run a React application on your local device.
Features
Install
npm
npm install -g react-instant
yarn
yarn global add react-instant
If you think this package is also trash, just go with npx:
npx react-instant ...
Usage
Setup a preview of a selected React application.
react-instant <GIT_URL>
eg.
react-instant https://github.com/DRFR0ST/karutek.git
after the setup you can preview the project in your browser under http://127.0.0.1:5000/
Flags
port (-p)
5000
Default: Override default port.
react-instant https://github.com/DRFR0ST/karutek.git -p 5050
version (-v)
Displays the current version.
react-instant -v
save (-s)
Save the project permanenty in a local directory.
react-instant Misieq01/notemaster -s ./notemaster/
branch (-b)
master
Default: Switches branch after clone.
react-instant Misieq01/notemaster -b=dev
verbose
Verbose log output.
react-instant --verbose
excludeTest
false
Default: Skip the testing step.
react-instant DRFR0ST/sourcer --excludeTest
buildScript
"build"
Default: Script name executed on build.
react-instant DRFR0ST/sourcer --buildScript compose
envPath
Path to an .env file, that should be copied into the project.
react-instant DRFR0ST/circles-web --envPath /some/cool/path/.myEnvFile
omitServe
false
Default: Mainly used for testing. It skips the serving process and exits after build. Is not useful unless used with --save flag.
react-instant DRFR0ST/physiomedica-website --omitServe
forceClean
false
Default: Forces clean-up when exiting.
react-instant DRFR0ST/physiomedica-website --forceClean
Requirements
The programs listed below are required to run this app correctly.
Tips
- If you want to preview a github repository project, use a shorthand by providing only a github and repo name. eg.
react-instant Misieq01/notemaster
Caveats
- The provided project's
package.json
has to contain abuild
command (like the one generated by create-react-app). You can change the script name by usingbuildScript
flag. - When using
envPath
flag, make sure to name your selected file.env
, otherwise it will not be copied correctly. (See #10)
Contributors
Thanks to all contributors for making this a better tool and spreading the love to all your lazy (as me) friends!