This is a very basic boilerplate to get started with. It includes a specific folder structure with some predefined HTML/SCSS and runs on Git and Gulp.
The src
folder is for development only, where you can find all of the SCSS code, uncompressed JavaScript and uncompressed images or placeholders used for development.
The dist
folder is the one you upload on a server when deploying your project. Here are all minified and compressed files and images, automatically created by Gulp. This folder is empty by default - the minified files will be created by Gulp.
-
Install gulp globally for all projects:
npm install -g gulp
-
Install gulp dev dependencies:
npm install
-
Install postcss plugins:
npm install gulp-postcss pixrem autoprefixer cssnano
-
Open DevTools with
Ctrl+Shift+I
-
Open the settings in the upper right corner (or press
F1
) -
Make sure
Enable CSS source maps
andAuto-reload generated CSS
are enabled -
Go to
Workspace
and add your local project folder -
Restart DevTools
- Use the minified CSS file by changing your input
style.css
tostyle.min.css
in your HTML files. (If you don't want to use sourcemaps you can do this in development stage)