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