Feature manager. It creates the basic feature folder structure and provides the capability to rename or remove it.
- Source:
Methods
(static) add(name)
- Source:
Add a feature. Create the basic folder strcutre of a feature, such as files of index.js
, style.less
, redux
folder, etc.
Example
const feature = require('rekit-core').feature;
feature.add('customer'); // create a feature named 'customer'
// Result => Create a folder named 'customer' in 'src/features' folder.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | feature name. |
(static) move(oldName, newName)
- Source:
Rename a feature
Parameters:
Name | Type | Description |
---|---|---|
oldName |
string | The old name. |
newName |
string | The new name. |
(static) remove(name)
- Source:
Remove a feature
Parameters:
Name | Type | Description |
---|---|---|
name |
string | feature name. |