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
:Open啟動時打開瀏覽器,默認值: false
port
:指定服務器端口,默認值: 2080
yarn build
或npm run build
將應用程序構建到dist
文件夾中。它在生產模式下縮小了源,以獲得最佳性能。
production
:生產模式標誌,默認: false
prod
: production
的別名yarn start
或npm run start
在生產模式下運行項目。
open
:Open啟動時打開瀏覽器,默認值: false
port
:指定服務器端口,默認值: 2080
yarn deploy
或npm run deploy
將dist
文件夾部署到GitHub頁面。
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
注意:在提出拉請請求之前,請務必合併“上游”的最新信息!
麻省理工學院©汪磊