generator-schwarzdavid-website v1.0.2
Website boilerplate generator for Yeoman
Generates a scaffold for a modern html 5 website with a working build system using gulp
Install
In order to use this generator properly, you need to have NodeJS
, Npm
and Git
installed aswell as bower
, yo
and gulp-cli
. Make sure you have all those dependencies installed by running npm i -g yo gulp-cli bower
. If you
already have those installed, you wont install them twice when you run this command.
When you have all dependencies installed, you can run
npm i -g generator-schwarzdavid-website
to install the package. Now go to your empty project directory and run
yo schwarzdavid-website
.
The boilerplate will be created in the directory you are currently in and a git project will be initialized and all dependencies installed.
All you have to do now is to run gulp serve
to build your website and start working.
Enjoy!
Features
- Automatic less to css compilation
- Minify all css and js files
- Autodetect bower dependencies and inject them into html
- Separate tasks for developing and production
- Automatic optimization of all .jpg and .png files
Commands
gulp serve
Runsgulp build
and add a watcher to all relevant files. Whenever one of those files change, the build will be updated.gulp build
Runsbuild:less
,build:js
,build:img
,build:vendor
andbuild:html
gulp build:less
Compiles your less-files to css, optionally concats them and outputs a minified main.min.css filegulp build:js
If in production mode, it concats, minifies all js-files and outputs main.min.jsgulp build:html
Injects all files into index.html, optionally minifies the code and removes commentsgulp build:img
If in production mode, minifies all images and removes meta informationgulp build:vendor
Concats and minifies all bower dependencies into vendor.min.js
Todos
- Add JSLint to
gulp build:dev:js
- Start Webserver at
gulp serve
- Handle all html-files - not only index.html
- Extend possible dependency options
- Write tests
- Add Modernizr support
- Add common files to .gitignore
- Add babel to
gulp build:js
- Write sourcemaps