@ou-spida/cli v2.0.0
cli (aka Clive)
The spida cli is a dinky command line tool for setting up tooling for ida bricks. We've also used it to centralise out tooling configs for the ida-project and as a result ended up with a general setup that can be used by anyone interested in playing around with the latest javascript without having to spend too much time climbing that build-tool learning curve.
Install & Update
npm i -g @ou-spida/cli
Requirements
Have Node installed on your system (preferably version 8+).
Take a look at nvm to managed node versions if you need to.
Using spida-cli
You can use the command
spida-cli scaffold
or spida-cli s
You will be prompted for a scaffold type, name and to confirm the correct folder to add the scaffold to.
The default scaffold type is 'general' and spida-cli will ask if you need a package.json file if there isn't one.
You can run the following commands after install:
npm start
npm run test
npm run build
The cli tool will also install eslint global dependancies if you run the following command:
spida-cli install eslint
or spida-cli lint
This is recommended if you are using vsCode with the eslint extension.
spida-cli Commands
Simple: spida-cli scaffold
or spida-cli s
spida-cli --version
for spida-cli version
spida-cli --help
for listing of cli commands
spida-cli readme
of spida-cli r
to display spida-cli readme file in the terminal.
What do I get?
All scaffolds except brick and core (which do not have build systems) will include the following tools as standard.
webpack: to build your files and compile the latest javascript into es5 where needed (long live the arrow function!).
babel: used by webpack to compile to es5 as well as browser polyfills.
jest: for testing
Troubleshooting
Filepath issues Be aware you may have some issues with paths in windows should you have any directory names with spaces in. If this happens wrap your path string in double quotes.
Broken packages Sometimes using the 'latest' or 'next' branch rather than the stable branch resolves issues you may encounter as the fixes you need are in the next version. To install this try 'npm i package_name@latest' or 'npm i package_name@next'; packages wont always have these though.
Useful npm commands
List globally installed packages npm list -g --depth=0
Removed packages not in 'package.json' that are installed in node_modules but are no longer used. npm prune
Exit out when running webpack (npm start in this case) ctrl+c in the command line
You can also use this to terminate processes before they have completed like 'npm i'
Update the spida-cli npm update -g spida-cli
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago