Command Line Interface (CLI) to support Single Page Application(js) framework.
npm install -g spa-cli
#USAGE:
spa-cli appName
OR use --new option to download and use the latest boilerplate bundle from SPA.js repository.
spa-cli appName --new
NOTE: Use . instead of 'appName' if 'appName' directory is current working directory.
spa-cli appName componentName
OR
spa-cli appName/componentName
OR use --new option to download and use the latest boilerplate bundle from SPA.js repository.
spa-cli appName/componentName --new
spa-cli appName componentName --new
NOTE: Use . instead of 'appName' if 'appName' directory is current working directory.
spa-cli appName componentX,componentY
OR
spa-cli appName/componentX,componentY
OR use --new option to download and use the latest boilerplate bundle from SPA.js repository.
spa-cli appName componentX,componentY --new
spa-cli appName/componentX,componentY --new
spa-cli your-custom-app-bundle.zip --app
spa-cli your-custom-component-bundle.zip --component
your-custom-component-bundle.zip must contain the following files with custom content:
- componentX.js
- componentX.html
- componentX.css (optional)
NOTE: The string 'componentX' will be replaced with actual componentName, including the file name and the content inside the files during a new component creation.
Reset bundles with the latest boilerplate bundle(s) from SPA.js repository.
spa-cli --reset
spa-cli --reset --app
spa-cli --reset --component
spa-cli appName --zip
spa-cli appName --update
###Requires live-server (run install command as root/Administrator)
npm install -g live-server
To start LiveServer for an app, use --start option at the end of spa-cli command.
Example:
spa-cli appName --start
Along with --start option, use --ch OR --chrome OR --ff OR --firefox OR --ie OR --iexplore to open respective browser.
Example:
spa-cli appName --start --ch
spa-cli appName --start --chrome
spa-cli appName --start --ff
spa-cli appName --start --firefox
spa-cli appName --start --ie
spa-cli appName --start --iexplore