This is a simple boilerplate for Gulp that Generates Source Maps, Auto-Prefixes, Concatenates, Cleans, and Minifys the SCSS into a bundle.min.css file.
- Gulp
- Sass
- Autoprefixer
- Concat CSS
- Clean CSS
- Imagemin
- Sourcemaps
- BrowserSync
First you will need to clone the Quasar-Gulp Github Repository in to your existing project folder.
git clone git@github.com:DeQuasar/Quasar-Gulp.git .
Next Navigate to your project folder that contains the package.json file and run the following command. This command will install all the devDependencies in the package.json file.
npm install --save-dev
The current directory structure that I am using is as follows.
-
assets - Production folder
- images - Productions images
- stylesheets - Productions stylesheets
- javascript - Production Javascript
-
resources - Development Folder
- images - Uncompressed images
- scss - SCSS Files
- app.scss - Master SCSS File for imports
- scss folder - SCSS Folder
- scss folder - SCSS Folder
- app.scss - Master SCSS File for imports
- stylesheets - Stylesheets that will be combined, cleaned, and compressed
- app.css
- reset.css
Next find the following paths in the gulpfile.js file and edit them according to your project's directory structure.
const resourceInput = ['resources/scss/**/*.scss', 'resources/scss/**/*_.scss'];
const resourceOutput = 'resources/stylesheets';
const minifiedOutput = 'assets/stylesheets';
const imageInput = 'resources/images/*';
const imageOutput = 'assets/images';
This is the location of the entry point for the BrowserSync gulp plugin.
const htmlLocation = '.';
You may either keep the current configuration of the Gulp Packages settings or you can change them to the needs of your own project.
Simply run the following command in your terminal.
gulp
Imagemin - Compress imagesCompleted: 02 September 2017Browser-Sync - Reload browser on file changeCompleted: 02 September 2017
If you have an issues, suggestions, or questions please create an issue request or email me at tonypro999@gmail.com.