Simple Gulp setup for websites develoment.
Includes functions:
- compile SCSS;
- minification HTML, CSS, JS;
- create source maps;
- compress images with TinyPNG API;
- copy dist files to FTP server.
Enjoy!
Created by Michał Milanowski.
gulp sass
- compile your SCSS files into CSS with source maps, compressed and with autoprefixergulp watch
- watcher forgulp sass
gulp css-move
- copy final CSS files fromsrc
directory todist
directorygulp html-move
- copy HTML files fromsrc
directory todist
directory and minify itgulp tinypng
- copy images fromsrc
directory todist
directory and compress it with TinyPNG API (require your API key)gulp javascript
- concat, minify JavaScript files with Browserify so you can create JS modules and bundle up itgulp watch-js
- watcher forgulp javascript
gulp js-move
- copy final JS files fromsrc
directory todist
directorygulp build
- copy final all files fromsrc
directory todist
directorygulp ftp
- copy final all files fromdist
directory to FTP server (require your FTP passes)gulp default
- rungulp sass
,gulp watch
,gulp javascript
,gulp watch-js
-
First, create new JS entry file
main.js
, in main/src/js/
directory. -
Optionally you can create
tinypng_api_key.txt
text file in/dependencies/
directory with your TinyPNG API key. -
Optionally you can create
ftp_accesses.json
JSON file in/dependencies/
directory with your FTP passes.
JSON structure:
{
"host": "yourhost.net",
"user": "example",
"password": "verystrongpassword123",
"hostDirectory": "yourdirectory/anotherdirectory/"
}
- Install dependencies (you can use yarn also)
$ npm install
- Run Gulp default tasks or one task
$ gulp