Origin of Suite

As the project continues to evolve iteratively, the business modules created will also expand. In addition, for some business scenarios, multiple modules are often required to be implemented together. To solve the above problems, CabloyJS introduced the concept of suite. In short, a suite is a combination of a group of business modules, often corresponding to a specific business scenario, such as e-commerce, CRM, supply chain, and so on

Naming Convention

The suite uses a naming convention similar to the module:

  1. 1egg-born-suite-{providerId}-{suiteName}
Name Description
providerId It is strongly recommended to use the Username of GitHub as the Provider ID, so as to ensure that the modules contributed to the community will not conflict
suiteName suite name

Directory Structure

A suite is a combination of a group of business modules, so the directory structure is also very simple. Take the suite test-party as an example:

  1. 1test-party
  2. 2├── modules
  3. 3│ ├── test-wechat
  4. 4│ ├── test-wxwork
  5. 5│ ├── test-dingtalk
  6. 6│ ├── test-party
  7. 7│ └── ...
  8. 8└── package.json

Suite Type

There are two types of suites in EggBornJS: Local Suite, Vendor Suite

Name Description
Local Suite path: {project}/src/suite
Vendor Suite path: {project}/src/suite-vendor

Create Suite

If want to create a new suite named as demo-suite, enter the project path and run the cli command:

  1. 1$ cd /path/to/project
  2. 2$ npm run cli :create:suite demo-suite

Install Vendor Suite

In general, vendor suites are provided by Cabloy Store. For example, Cabloy Store has a test-party suite. If you want to install this suite, just as follows:

  1. 1$ npm run cli :store:sync test-party

Troika: Suite, Module, App

To cope with the development of large projects, CabloyJS provides troika: Suite, Module and App. Suites and Modules are used to organize source codes, and Apps are used to organize interface layout

  • About App, refer to: App