[Website & app scaffolding](# Website & app scaffolding) is boilerplate & tools for websites and web apps development.
Inspired by below boilerplate & tools.
- HTML5 Boilerplate
- Mobile Boilerplate
- Yeoman Web app generator
- Yeoman Generator Mobile
- Google Web Starter Kit
- Ruby & Node version management (rbenv & ndenv)
- Ruby gems version management (bundler)
- Javascript package management (bower)
- Built-in preview server with LiveReload (grunt)
- Build automation (grunt)
- HTML minify
- CSS/JS unify & minify
- Image Optimization
- File revisioning all static files
- Sass/Compass folder structure best practices (app/styles/sass/styleguide.md)
- KSS styleguide template (http://htanjo.github.io/kss-node-template/)
- Deployment to GitHub Pages
+- app
| +- images
| |
| +- styles
| | +- sass
| | | +- modules
| | | +- partials
| | | +- vendor
| | | +- styleguide.md
| | | |
| | | +- main.scss
| | +- main.css
| |
| +- styleguide
| |
| +- bower_components
| +- scripts
| | +- vendor
| | +- plugins
| | +- main.js
| |
| +- index.html
|
+- dist
+- styleguide-template
You first need to install Node.js and Ruby.
- Install rbenv (https://github.com/sstephenson/rbenv#installation)
- Install ruby-build (https://github.com/sstephenson/ruby-build#readme)
- Install ruby (version of described in
.ruby-version
)
$ rbenv install
$ rbenv rehash # Rehash
Bundler is powerful gem management tool.
$ gem install bundler
$ rbenv rehash # Rehash
- Install ndenv (https://github.com/riywo/ndenv#install)
- Install node-build (https://github.com/riywo/node-build#install)
- Install node (version of described in
.node-version
)
$ ndenv install
$ ndenv rehash # Rehash
Install ruby gems described in Gemfile
.
$ bundler install
Install node modules described in package.json
.
$ npm install
$ npm install -g grunt-cli
$ ndenv rehash # Rehash
npm install -g bower
$ ndenv rehash # Rehash
Install bower packages described in bower.json
.
$ bower install
Launch preview server with LiveReload.
$ grunt serve
Build for front-end source code.
$ grunt build
Launch preview server for build version.
$ grunt serve:dist
Generate styleguide. (app/styleguide
)
$ grunt shell:styleguide
Deploying to Github Pages.
CAUTION: User or organization site using master
branch for Github Page. Change the default branch to develop (or whatever).
- GitHub.com ->
http://{user-name(or organization-name)}.github.io/
- GitHub Enterprise ->
http://{github-domain}/pages/{user-name(or organization-name)}/{user-name(or organization-name)}/
$ git push origin :master # if push rejected
$ git subtree push --prefix dist origin master
- GitHub.com ->
http://{user-name}.github.io/{repository-name}/
- GitHub Enterprise ->
http://{github-domain}/pages/{user-name}/{repository-name}/
$ git push origin :gh-pages # if push rejected
$ git subtree push --prefix dist origin gh-pages