Introduce

In the old version, you need to open the browser, download the suites/modules provided by the Cabloy Store, and then extract them to the project directory. Today, you can install, update, or publish suites/modules directly from the command line

Open Auth Token

The Cli command will directly access the remote API of Cabloy Store to install, update or publish. Therefore, it is necessary to provide an open auth token to authenticate the user identity

Open Auth token is a combination of Client ID and Client Secret, which can be obtained in the following way:

  1. Open CabloyJS management website: https://admin.cabloy.com/

  2. Register a new user (If need). The system will automatically assign a group of tokens to the newly registered user for install, update or publish respectively

  3. Open Page: Mine->Settings->Open Auth,You can see the specific information of tokens

How to use

- Install/Update

Operate as follows:

  1. 1# install/update some specific suites/modules
  2. 2$ npm run cli :store:sync test-suite1 test-module1
  3. 3# install/update all suites/modules
  4. 4$ npm run cli :store:sync
  • For specific suites/modules, the first execution means install, and the second execution means update

  • The first time execute the sync command, you will be prompted to enter the Client ID and Client Secret

- Install Core Modules freely

Because the built-in core modules of CabloyJS are installed in the directory node_modules, if you want to browser the source codes of any core module, you can install it into the project directory: {project}/src/suite-vendor or {project}/src/module-vendor

  1. 1# install base module: a-base-sync
  2. 2$ npm run cli :store:sync a-base-sync
  3. 3# install cms module: a-cms
  4. 4$ npm run cli :store:sync a-cms
  5. 5# install NodeJS-Workflow-Engine module: a-flow
  6. 6$ npm run cli :store:sync a-flow
  • To browser more core modules, refer to: Cabloy Store

    • The core modules are free, but you still need to generate a free purchase record on Cabloy Store, so that you can download and install it on the command line

- Publish

Operate as follows:

  1. 1# publish some specific suites/modules
  2. 2$ npm run cli :store:publish test-suite2 test-module2
  3. 3# publish all suites/modules
  4. 4$ npm run cli :store:publish
  • Before publishing, you need to open CabloyJS management website, to create a new suite/module record

  • When publishing, it will automatically compare whether the content has changed, and automatically change the version number

  • The first time execute the publish command, you will be prompted to enter the Client ID and Client Secret