Front-end workflow with Gulp , BrowserSync , Pug , PostCSS , Browserify
PostCSS Plugins: cssnext , lost , import , reporter , precss , rucksack
- Install Node.js (for your platform).
- run
npm install --g gulp browser-sync browserify.
git clone https://github.com/xowei/frontend-workflow.git
Install dependencies npm install
src folder is sources code : contains Pug, PostCSS, Javascript, Javascript modules, fonts, images etc.
dist folder is for public : contains HTML, CSS, javascript, fonts, compressed images etc.
-
gulp pugCompile Pug to HTML -
gulp cssCompile PostCSS to single CSS file named 'styles.css' -
gulp jsCompile script.js with browserify to single javascript file named 'scripts.js' -
gulp assetscopy fonts and compressed images -
gulp assets:imagescopy compressed images -
gulp assets:fontscopy fonts and compressed images -
gulp initrun all of the above task -
gulp init --productionrun all task and compressed it all -
gulp delremove dist folder -
gulporgulp watchopen browser-sync server,Local view: http://127.0.0.1:3000/