After cloning this repository you need to install the required NPM packages.
npm install
After development you can publish the content of dist
folder in Github Pages (gh-pages
branch)
npm run deploy
This project uses the GULP task runner
.
In the gulpfile.js of this proyect you can see the gulp tasks developed to compile and compress the SASS
and JS
, copy and paste the HTML
files and create a server and listen to the changes made to reload it (Browsersync + Gulp.js)
So the project is developed in the src
folder and published in the dist
folder.
This is the default gulp task
This command is able to:
- Creates the
dist
folder if it does not exist. - Generate
html
,css
,js
ondist
folder. - Watch the changes to the files in the
sass
, andjs
folders inside thesrc
folder. - Create a server and reloads if there are any changes in those files of
dist
folder.
gulp
This create a static server with browserSync package, serves the files from dist
folder and opens by default the index.html
file in any of these browsers: Chrome & Firefox.
gulp serve
This command is able to:
- Creates the
dist
folder if it does not exist. - Generate
html
,css
,js
ondist
folder.
gulp build
This command is able to:
- Creates the
dist
folder if it does not exist. - Copies the
html
files from thesrc
folder and pastes thedist
folder.
gulp html
This command is able to:
- Creates the
dist
folder if it does not exist. - Compile the
styles.sass
file (with the import files of partials sass) located atsrc/sass/
, add prefixes to properties css, compress the file, create and add a mapping for the debugger styles sass on the browser inspector, apply a Gulp Plugin for Line Ending Corrector (A utility that makes sure your files have consistent line endings)... - Export the
styles.min.css
file todist/css/
folder.
gulp css
This command is able to:
- Creates the
dist
folder if it does not exist. - Get list of files of
filesJsCompile
variable, compile the files with Babel NPM package, compress it and apply a Gulp Plugin for Line Ending Corrector (A utility that makes sure your files have consistent line endings)... - Export the
scripts.min.js
file todist/js
folder.
gulp js
This command is able to:
- Create the server.
- Watch the changes to the files in the
html
,sass
andjs
folders inside thesrc
folder and run the tasks to re-generate the files inside thedist
folder. - Reloads the server if there are any changes to the
html
,css
andjs
files inside thedist
folder.
gulp watch