This article is reproduced in: Ape 2048 Website ➺ https://www.mk2048.com/blog/blog.php?id=i0cac1bb0j
This article was published in the micro-store front-end team blog
What is bio
Note: bio is currently only compatible with Mac platform
github Address: Bio-cli
npm Address: Bio-cli
A one-stop solution for front-end development.
Use bio, you will only need to focus on business logic, without paying attention to the scaffolding configuration information, you can quickly complete the front-end development.
Additional, bio provides eslint, styleint detection, mock service.
)installation
-
Installation Node.js (> = 8.9.1)
https://nodejs.org/en/download/
-
Installation bio
npm install bio-cli -g
Quick
-
Step 1: Create a project directory
mkdir demo cd demo
-
Step 2: Initialize various projects
bio init bio-scaffold-vue
: Initialization vue projectbio init bio-scaffold-react
: Initialization react Projectbio init bio-scaffold-pure
: Initialization of non-vue / Non-react items
-
Step 3: Debugging
bio run dev-daily
Command set
-
bio init <脚手架在 npm 源上的名称>
-
Features
Initialize the project directory.
This command will perform the following actions:
- Install scaffolding locally to ensure the presence of scaffolding. Scaffolding installed in bio cache directory (
/Users/用户名/.bio/
) - If the current directory is an empty directory (or only
README.md
), this command will generate demo file. - Execution
npm install
.
- Install scaffolding locally to ensure the presence of scaffolding. Scaffolding installed in bio cache directory (
-
scaffold
bio currently built three scaffolding
bio-scaffold-vue
(bio-scaffold-react
,bio-scaffold-pure
, )bio scaffolding using npm hosting, hosted by default npm official source, you can set your own hosting source code address
-
Scaffolding nickname
bio is built scaffolding all three took Nickname:
bio-scaffold-vue --> vue bio-scaffold-react --> react bio-scaffold-pure --> pure
Therefore, all commands involving scaffolding name, can be replaced with a nickname.
You can also add your own nickname, code address
-
-
bio run <脚手架支持的任务> [-n, --no-watch]
-
Features
Start scaffolding tasks.
bio starts scaffolding, the task name and pass-through to the scaffolding to complete various tasks.
Therefore, the task name is variable, as long as the support scaffolding can be.
Our three scaffolding provided by default provides the following six tasks:
dev-daily dev-pre dev-prod build-daily build-pre build-prod
For more information see: Bio built scaffolding task name .
Example: Initialization complete
bio-scaffold-vue
the project, started itsdev-daily
task order shall be:bio run dev-daily
-
Options
-n, --no-watch
introduction:bio default will start a file monitoring services, and synchronize files in the current directory to the directory scaffolding, ensure scaffolding catalog business directory is always parent-child relationship, for scaffolding compilation. (Data :( Why should ensure that parent-child relationship? ))
-n, --no-watch
It will close synchronize files in the current directory to the directory scaffolding listening service.For example:
bio run dev-daily -n
-
-
bio scaffold show <脚手架在 npm 源上的名称>
Open the local directory where the scaffolding.
-
bio scaffold create
Create a scaffold, you will be prompted to name the new scaffolding
-
bio mock [端口]
Start the local mock services, the default port 7000
If you want to specify a port number, you can directly specify, such as:
bio mock 8000
-
bio lint init
-
Features
Initialization lint, before git commit automatically mount lint to hook
-
-
bio lint [--fix] [-w, --watch]
Implementation of lint checks, bio generate lint results page view for you
--fix
: Automatic correction code format of the source code.-w, --watch
: Start listening file, once the file has changed, it will trigger lint checks
-
bio help
help information
bio features
link
ALL
- Perfect unit testing
- Continuous Integration
- English Docs
- Scaffolding perfect demo project
Developers
- Core: Liu ocean @ micro shop
- Lint: Ding Junjie @ micro shop
LICENSE
WITH