frontend starter
v1
項目模板是快速構建靜態站點的方式。使用一個命令,使用WebPack,Gulp,Hannebars.js和SCSS構建一個靜態頁面。
[ES6]
所有這些都帶有終端的一個命令:
yarn startnpm install -g gulp # May require `sudo` yarn install # One time
gulp serve如果您想將此回購用於下一個項目,請確保進行以下更改:
data.yml ,填寫與您的網站關聯的HTML元數據。package.json提供name , version , description , license和repository.url 。.git文件夾,以便您從新的提交歷史記錄開始。README.md編輯為您的喜好。 可用的GULP命令的概述:
gulp build將站點構建到dist目錄。這包括:
gulp build:optimized這用於分發網站的優化版本(用於部署)。它包括gulp build和以下所有內容:
gulp watch觀看需要更改本地文件的更改,並根據需要重建網站的某些部分,以納入dist目錄。
gulp serve在後台運行gulp watch ,並在Localhost上為dist目錄提供localhost:3000使用browsersync自動重新加載。
├── webpack.config.dev.js # Controls javascript and css bundling
├── Gulpfile.js # Controls Gulp, used for building the website
├── README.md # This file
├── data.yml # Metadata associated with the site.
├── dist/ # Gulp builds the static site into this directory
├── package.json # Dependencies
└── src/ # All source code
├── assets/
├── css/ # Stylesheets
├── font/ # Font files
├── img/ # Images and SVGs
├── js/ # Javascript libraries and scripts
├── views/
├── partials/ # Handlebars HTML partials that are included / extended
└── templates/ # Handlebars HTML files, one per page on the site.