-
Checkout a topic branch from
main
branch, and merge back against that branch. -
Work in the
src
andtemplates
folders. -
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-web": "^1.4.0" } <!-- after --> { "@fbi-js/factory-web": "file:../" <!-- relative to factory-web's root --> }
-
Install dependencies
npm i
-
Run npm scripts
yarn dev yarn build
src
index.ts
: factory class entry file. It extendsfbi
Factory
.src/commands
: contains all executable commands which extendsfbi
Command
.src/templates
: contains all templates which extendsfbi
Template
.
templates
: contains all static files of each template, used bysrc/templates
.