Init Project
bio init <scaffoldName in npm registry | scaffold short name>
description
It will:
- init project files in current directory.
- run
npm installautomatically.
params
scaffoldName in npm registrybio will search for scaffoldName from npm registry
scaffold short nameBy default, bio provides shortName for scaffolds in npm as list:
vueforbio-scaffold-vuereactforbio-scaffold-reactpureforbio-scaffold-pure
examples
init a vue project:
bio init bio-scaffold-vueorbio init vueinit a react project:
bio init bio-scaffold-reactorbio init reactinit a pure project:
bio init bio-scaffold-pureorbio init pure
Compile Project
bio run <taskName that scaffold supports> [-n, --no-watch]
description
It will run task that is only supported by scaffold, which was defined in
bio init <scaffoldName>.param
<taskName that scaffold supports>By default, these tasks are supported in bio inside scaffolds as list:
dev-daily: develop in daily envioronment.dev-pre: develop in re envioronment.dev-prod: develop in prod envioronment.build-daily: build in daily envioronment.build-pre: build in pre envioronment.build-prod: build in prod envioronment.
-n, --no-watchbiowill lanch a local server to watch file changes by default.-n, --no-watchwill close this server.
examples
- run task
dev-dailyand watch file changes:bio run dev-daily - run task
dev-dailyand don't watch file changes:bio run dev-daily -n - run task
build-dailyand don't watch file changes:bio run build-daily -n
- run task
Mock
bio mock [port]
bio will lanch a local mock server and create a test file named as ./mock/test.json.
7000 is the default server port, and it can be changed by offering port.
example:
bio mock 8000
Lint
init lint config
bio lint initrun lint
bio lint [--fix] [-w, --watch]examples:
- auto fixing and only run once:
bio lint --fix - not auto fixing and only run once:
bio lint - auto fixing and watching file changes:
bio lint --fix -w - not auto fixing and watching file changes:
bio lint -w
- auto fixing and only run once:
Help
bio help
It will show helps.