-
Checkout a topic branch from
mainbranch, and merge back against that branch. -
Work in the
srcandtemplatesfolders. -
Use fbi commit to commit your code.
# install npx fbi add factory-commands # usage npx fbi commit
-
Setup
npm i -g fbi yarn # link local factory to global env, so you can use it everywhere in terminal. (like `npm link`) fbi link -
Start development
yarn dev
-
Create an examples folder
cd [project-root] mkdir examples cd examples
-
Create a project
fbi create
Exit when showing
Installing dependencies...in terminal. -
Change project to use local deps. In project's package.json
devDependencies<!-- before --> { "@fbi-js/factory-node": "^2.0.3" } <!-- after --> { "@fbi-js/factory-node": "file:../" <!-- relative to factory-node's root --> }
-
Install dependencies
npm i
-
Run npm scripts
yarn dev yarn build
srcindex.ts: factory class entry file. It extendsfbiFactory.src/commands: contains all executable commands which extendsfbiCommand.src/templates: contains all templates which extendsfbiTemplate.
templates: contains all static files of each template, used bysrc/templates.