Web前端常用技术栈(持续更新!)
1.Javascript静态类型检查器 - Flow
使用方法
- First install babel-cli and babel-preset-flow with either Yarn or npm.`npm install babel-cli babel-preset-flow`
- create a .babelrc file at the root of your project with "flow" in your "presets". `{"presets": ["flow"]}`
- put all your source files in a src directory you can compile them to another directory by running: `./node_modules/.bin/babel src/ -d lib/`
- add this to your package.json scripts easily
`{
"name": "my-project",
"main": "lib/index.js",
"scripts": {
"build": "babel src/ -d lib/",
"prepublish": "npm run build"
}
}`
- Add a devDependency on the flow-bin npm package: `npm install --save-dev flow-bin`
- Add a "flow" script to your package.json:
`{
"name": "my-flow-project",
"version": "1.0.0",
"devDependencies": {
"flow-bin": "^0.41.0"
},
"scripts": {
"flow": "flow"
}
}`
- run npm flow init first `npm run flow init`
- run flow `npm run flow`
更新于2018-04-28
2.Web前端代码管理server