base develop server
fserver-cli是基于wepack-dev-server包装和整合的前端开发服务器
fserver-cli相关命令
配置相关信息如:
fserver config -c user.name=ddddd
fserver config -c user.password=11111
fserver config -c proxy.host=http://www.baidu.com
fserver config -c proxy.port=8080
fserver config -c proxy.enable=true
项目初始化
fserver init <project-name> [options]
options参数说明:
-w --webpack 是否创建webpack.config.js文件[如需自定义webpack配置项可创建,否则可忽略]
-s --server 是否创建server.config.js文件[如需自定义可创建]
-p --proxy 是否创建proxy.config.js文件[该文件用户配置http代理转发]
-c --config 是否创建项目规范配置文件,其中的文件包括:.bablerc/.editorconfig/.eslintrc.json/.gitignore
mock服务器如:
fserver start [options]
options参数说明:
-c --config 指定webpack配置文件
-p --port 设置服务端口
-w --watch 监听文件变化,自动刷新页面
-P --proxy 关闭http代理
-W --Watch 关闭文件变化监听