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 --productionyarn lint或npm run lint检查样式和脚本文件。
yarn compile或npm run compile编译样式、脚本和页面文件。
yarn serve或npm run serve使用自动化服务器在开发模式下运行应用程序。
open :启动时打开浏览器,默认值: falseport :指定服务器端口,默认: 2080 yarn build或npm run build将用于生产的应用程序构建到dist文件夹中。它在生产模式下最小化源以获得最佳性能。
production : 生产模式标志,默认值: falseprod : production的别名yarn start或npm run start在生产模式下运行项目。
open :启动时打开浏览器,默认值: falseport :指定服务器端口,默认: 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-featuregit commit -am 'Add some feature'git push -u origin my-awesome-feature注意:在发出拉取请求之前,请务必合并来自“上游”的最新内容!
麻省理工学院 © 汪磊