0.3.7 • Published 4 months ago
@april9/generator-stack9-generator v0.3.7
Stack9 Generator
Usage
Install generator-stack9-generator
globally.
npm i -g generator-stack9-generator
Run the generator from the stack9 instance project.
# generate entities
yo @april9/stack9-generator:entities ./stack9/entities/custom
# generate hooks (entityName, hookName, hookType, folder?, type?)
yo @april9/stack9-generator:hooks --entityName=user --hookName=TestHook --hookType=ValidateAndTransformInput --folder=native --type=function
Contrib
sudo npm install -g yo generator-generator
# IMPORTANT: bump package version
sudo npm link
# them go to the stack project and run
cd ../your-stack9-project
# v3
# yo @april9/stack9-generator:entities ./stack9/entities/custom ./stack9/models/stack9 instance-custom --force
# v4
yo @april9/stack9-generator:entities ./src/entities/custom ./src/models/stack9 instance-custom --force
yo @april9/stack9-generator:entities ./src/entities/native ./src/models/stack9 instance-native --force
Make sure you remove any old stack9-generator package from the package.json file to allow yo
to use it from the global (where is linked)