A workflow created with Gulp taskrunner.
Features:
- SASS to CSS compiling, minifying, autoprefixing and sourcemap writing
- Javascript concatonation and uglifying
- Optimizing and minifying images (PNG, JPEG, GIF and SVG)
- Cache busting
- Live reload using BrowserSync
For using this Gulp workflow you need to have node.js, npm and Gulp (globally) installed.
- Clone or download this repo into your folder.
- Run the following terminal command
npm install
in the folder where you have cloned or downloaded the repo. This will automaticly install all used dev dependencies. - Create your folder structure and edit te paths in the
gulp-config.json
file. - Create a index.html file and put
<!-- inject:css --> <!-- endinject -->
in the<head>
tag and<!-- inject:js --> <!-- endinject -->
at the bottom of the<body>
tag. You may want to create for example<link rel="stylesheet" href="css/styles.css">
within the inject tags to point to the development styles or script when developing. - After you have setup the paths and created some scripts and sass files you can run
gulp
in the terminal. This will run the default Gulp task which will start a browser with BrowserSync and watch your SASS and scripts folders.
Run the following command to create a deployment ready app/website.
gulp deploy
This will create a new folder with concatonated and minified scripts and stylesheets. (Foldername depends how you have configured your dist path in the gulp-config.json)
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
-
Style (SASS) task
-
Autoprefixer
-
Javascript task -
Browser Sync -
Clean dist folder for new deploys -
Style deploy task -
Javascript deploy task -
Images deploy task (image optimization) -
Cache busting assets (css & js) - SASSdoc integration
- Bower integration
- HTML optimization
- Merge Media Queries
The MIT License (MIT) Copyright (c) 2016 Andrew Reasoa
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.