1.0.4-rc.5 • Published 6 years ago
@insites/cli v1.0.4-rc.5
Tech
INS CLI uses modern technology
- Typescript - Superset of Javascript
- NodeJS - Non blocking I/O event driven
- Git - Version control
- MarketplaceCLI - CLI app for the CMS
Cloning and Installation
After cloning the repo install the dependencies
- INS CLI requires Node.js v8+ to run.
- INS CLI requires ts-node installed globally to run.
- INS CLI requires typescript to run.
- INS CLI requires git.
- INS CLI requires Marketplace Kit.
$ cd ins-pos-js-cli-production
$ npm install
If marketplace-kit is not installed in your machine, install it globally.
$ sudo npm i -g @platform-os/marketplace-kit
If ts-node is not installed in your machine, install it globally.
$ sudo npm install -g ts-node
If typescript is not installed in your machine, install it globally.
$ sudo npm install -g typescript
To package and build the app run this command
$ npm run build
Install CLI to your machine globally. Make sure you're outside app directory.
$ sudo npm i -g ./ins-pos-js-cli-production
$ ins
View available commands
$ insites --help
Development
To start development run this command
$ npm run start
FAQs
- How do you know that INS CLI was installed successfully?
- Execute ins command.
$ insites
- After running npm install then a warning occured, kindly ignore it.
npm WARN optional Skipping failed optional dependency /sane/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
- It's a warning, not an error. It occurs because fsevents is an optional dependency, used only when project is run on macOS environment (the package provides 'Native Access to Mac OS-X FSEvents').
- And since you're running your project on Windows, fsevents is skipped as irrelevant.
- If commands does not work, add sudo
$ sudo npm install
$ sudo npm run build
- If you prefix “sudo” with any linux command, it will run that command with elevated privileges.
- How do you know that the app build successfully?
- There is build folder inside app directory. Meaning the app build successfully.
- It did not installed globally. What to do?
- Option 1: Before running
npm i -g ./ins-pos-js-cli-production
Make sure you are outside of app directory. By this command it will install the app globally.
$ cd ..
$ npm i -g ./ins-pos-js-cli-production
- Option 2: ignore the stuff matched then reinstall to you machine globally.
$ touch .npmignore
$ cd ..
$ sudo npm i -g ./ins-pos-js-cli-production
- Option 3: Install app dependencies.
$ sudo npm install -g typescript
$ sudo npm install -g ts-node
$ sudo npm i -g @platform-os/marketplace-kit
Contribute
Want to contribute? Great!
INS CLI uses NODE API to make it happen