a suit-css starter kit for static pages – powered by gulp
npm installgulp- open
index.htmlin your favorite browser
Notice: due to heavy load you have to run gulp images manually whenever you add new image ressources.
gulp clean– deletes all processed files fromdist/gulp watch– starts watcher forjsandcsstaskgulp build– cleans first and then builds using every standalone taskgulp– run build task once, then watch
gulp assets– copy everything fromsrc/assetstodist/assetsgulp js– copy everything fromsrc/jstodist/jsexcept for files insrc/js/bundlethose will get concatinated intodist/js/bundle.min.jsgulp css– compile suitcss usingsuitcss-preprocessorand bundle intodist/index.cssgulp images– optimize images and copy them todist/img/
this serves as a starter kit for static html/css/js pages.
-
dist/– the output, copy this to your server once you are done-
**/*.(html|php)– your page's structure, this works with html and php as well, but be consistent (notice known issue) -
disabled.htaccess– this comes pre-packed with a htaccess to get you up and running fast, for more info refer to the .htaccess section the comments in the file itself
-
-
gulpfile.js/– the tooling, feel free to dive in (gulpjs.com) -
src/– here is where it all comes from, this folder lives in your repo-
assets/– everything BUT images, place anything from fonts to downloadable PDFs right here -
css– all the styles, this is using SUITCSS, make sure every css file you want to use is imported intocss/index.css -
img/– put all images here, they will be optimized using imagemin -
img/uncompressed– any images you do not want to process using imagemin can go here (e.g. animated PNGs will be stripped of their animation when using imagemin).⚠️ ATTENTION: this will be merged into images without theuncompressedfolder so keep an eye on your file/folder naming in any case where it'll overwrite files with the same name the uncompressed version will be chosen -
js/bundle/– all js files in here will be concatinated to one bigbundle.min.js -
js/– everything not placed injs/bundlewill be simply copied
-
// TODO
- by deactivating apache's trailing slashes you might encouter situations where referencing (e.g) images or other ressources cause a 404. You then have to reference them absolutely from the page's root directory