git clone https://github.com/NetEaseMobileFE/3g-new.git
cd 3g-new
npm i
npm i -g eslint
touch .profile
// dev
npm start
// test
gulp test // all files
gulp test -w article // single file
// deploy
gulp deploy // all files
gulp deploy -w article // single file
// lint
npm run lint
- 开发中启动服务后,访问地址为
http://localhost:3100/page/:type
, type取值为src/:folder
,一般一个src下的文件夹对应一个页面,common
和img
例外 - 开发中,通过代理工具将线上地址重定向到本地,如:
http://c.m.163.com/news/v/VBOOFPEVP.html -> http://localhost:3100/page/video
src/common
中存放公用模块,src/img
中存放图片- 如需增加页面,需要在
package.json
中,为pages
属性数组中增加一个元素,元素名称为增加的文件夹名
Eslint: airbnb && eslint rules