4.0.1 • Published 9 years ago
generator-lb v4.0.1
Generator LB
Yeoman generator for creating static website/templates using Sass, Rollup, Pug, and Gulp, used by Lighting Beetle.
Prereqisities
(sudo) npm install -g yo
(sudo) npm install -g gulp
Built-in tools
- Gulp (Task Manager)
- Sass (LibSass) (CSS Preprocessor)
- Pug (HTML templating)
- ES2016 compilation to ES5 using Babel
- ES2015 modules bundling with Rollup.js
- Bootstrap (Frontend framework) (Sass version) (optional)
- Foundation (Frontend framework) (optional)
- Modernizr (HTML5/CSS3 features detection) (optional)
- jQuery 2.x/3.x(feature-rich JavaScript library) (optional)
- LightingFly (SCSS mixins library) (optional)
Built-in features
- CSS autoprefixing (autoprefixer)
- Webserver with liverelaod (browserSync)
- Pug compilation
- Sass compilation
- YAML/JSON data sources for templates
- CSS/JS concating and minification (cssnano)
- JS linting (eslint with airbnb config)
- ES2016 transpiling (babel)
- ES2015 modules bundling (rollup)
- Image optimaliztion (imagemin)
- Lean Modernizr builds
- Improved file caching
- Deploying via rsync/sftp
- Multi-language templates support (optional)
- Advanced routing in development
Installation guide
- Install via npm
(sudo) npm install -g generator-lb
- Create folder for your project and run inside:
yo lb
- Complete installation
- ?
- Profit
Usage
Gulpfile contains some useful tasks:
gulp serve
for development with livereloadgulp build
for building from source todist
foldergulp serve:dist
for build previewgulp deploy
for deploying on dev server via sftp (config is in .env file)gulp deploy:prod
for deploying on prod server via sftp (config is in .env file)gulp help
for information about other tasks
Folder structure
.
+-- app
+-- fonts
+-- icons
+-- images
+-- scripts
+-- external
+-- jquery.js
+-- modules
+-- plugins
+-- main.js
+-- styles
+-- modules
+-- plugins
+-- main.scss
+-- views
+-- data
+-- index.[json/yaml]
+-- helpers
+-- layouts
+-- _default.jade
+-- modules
+-- _footer.jade
+-- _header.jade
+-- index.jade
+-- .htaccess
+-- favicon.ico
+-- robots.txt
+-- bower_components
+-- dist
+-- gulp
+-- tasks
+-- browserSync.js
+-- build.js
+-- clean.js
+-- copy.js
+-- default.js
+-- deploy.js
+-- images.js
+-- modernizr.js (optional)
+-- rev.js
+-- scripts.js
+-- serve.js
+-- styles.js
+-- templates.js
+-- watch.js
+-- utils
+-- buildHelper.js
+-- handleError.js
+-- config.js
+-- node_modules
+-- .babelrc
+-- .editorconfig
+-- .env
+-- .gitattributes
+-- .gitignore
+-- .eslintrc
+-- .yo-rc.json
+-- gulpfile.js
+-- package.json
Notes
- Gulp tasks can be configured inside
config.js
file ingulp
folder. - Data for jade templates can by stored as YAML/JSON objects inside.
app/views/data/
- Build can be forced with
gulp build --force
Contributors
- Adam Močkoř (mockor@lbstudio.sk)
4.0.1
9 years ago
4.0.0
9 years ago
3.2.2
9 years ago
3.2.1
9 years ago
3.2.0
9 years ago
3.1.3
9 years ago
3.1.2
9 years ago
3.1.1
9 years ago
3.1.0
9 years ago
3.0.2
9 years ago
3.0.1
10 years ago
3.0.0
10 years ago
2.3.2
10 years ago
2.3.1
10 years ago
2.3.0
10 years ago
2.2.0
10 years ago
2.1.0
10 years ago
2.0.0
10 years ago
2.0.0-beta3
10 years ago
2.0.0-beta2
10 years ago
2.0.0-beta
10 years ago
1.3.0
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago