pages boilerplate
1.0.0
搭建您精彩的静态网站总是令人愉快的。
# clone repo
$ git clone https://github.com/zce/pages-boilerplate.git my-awesome-pages
$ cd my-awesome-pages
# install dependencies
$ yarn # or npm install
$ yarn < task > [options]
# Runs the app in development mode
$ yarn serve --port 5210 --open
# Builds the app for production to the `dist` folder
$ yarn build --production
yarn lint
或npm run lint
检查样式和脚本文件。
yarn compile
或npm run compile
编译样式、脚本和页面文件。
yarn serve
或npm run serve
使用自动化服务器在开发模式下运行应用程序。
open
:启动时打开浏览器,默认值: false
port
:指定服务器端口,默认: 2080
yarn build
或npm run build
将用于生产的应用程序构建到dist
文件夹中。它在生产模式下最小化源以获得最佳性能。
production
: 生产模式标志,默认值: false
prod
: production
的别名yarn start
或npm run start
在生产模式下运行项目。
open
:启动时打开浏览器,默认值: false
port
:指定服务器端口,默认: 2080
yarn deploy
或npm run deploy
将dist
文件夹部署到 GitHub Pages。
branch
:您要推送到的分支的名称,默认值: 'gh-pages'
yarn clean
或npm run clean
清理dist
和temp
文件。
└── my-awesome-pages ································· project root
├─ public ········································· static folder
│ └─ favicon.ico ································· static file (unprocessed)
├─ src ············································ source folder
│ ├─ assets ······································ assets folder
│ │ ├─ fonts ···································· fonts folder
│ │ │ └─ pages.ttf ····························· font file (imagemin)
│ │ ├─ images ··································· images folder
│ │ │ └─ logo.png ······························ image file (imagemin)
│ │ ├─ scripts ·································· scripts folder
│ │ │ └─ main.js ······························· script file (babel / uglify)
│ │ └─ styles ··································· styles folder
│ │ ├─ _variables.scss ······················· partial sass file (dont output)
│ │ └─ main.scss ····························· entry scss file (scss / postcss)
│ ├─ layouts ····································· layouts folder
│ │ └─ basic.html ······························· layout file (dont output)
│ ├─ partials ···································· partials folder
│ │ └─ header.html ······························ partial file (dont output)
│ ├─ about.html ·································· page file (use layout & partials)
│ └─ index.html ·································· page file (use layout & partials)
├─ .csscomb.json ·································· csscomb config file
├─ .editorconfig ·································· editor config file
├─ .gitignore ····································· git ignore file
├─ .travis.yml ···································· travis ci config file
├─ CHANGELOG.md ··································· repo changelog
├─ LICENSE ········································ repo license
├─ README.md ······································ repo readme
├─ gulpfile.js ···································· gulp tasks file
├─ package.json ··································· package file
└─ yarn.lock ······································ yarn lock file
git checkout -b my-awesome-feature
git commit -am 'Add some feature'
git push -u origin my-awesome-feature
注意:在发出拉取请求之前,请务必合并来自“上游”的最新内容!
麻省理工学院 © 汪磊