├── app ├── template │ ├── src │ │ ├── js │ │ │ ├── main.js │ │ │ ├── vendor │ │ │ │ └── plugin-example.js │ │ │ └── plugins.js │ │ ├── styl │ │ │ ├── base │ │ │ │ ├── forms.styl │ │ │ │ ├── mixins.styl │ │ │ │ ├── generics.styl │ │ │ │ ├── variables.styl │ │ │ │ ├── reset.styl │ │ │ │ ├── fonts.styl │ │ │ │ └── base.styl │ │ │ ├── layout │ │ │ │ ├── form.styl │ │ │ │ ├── menu.styl │ │ │ │ ├── content.styl │ │ │ │ ├── footer.styl │ │ │ │ ├── header.styl │ │ │ │ └── layout.styl │ │ │ ├── state │ │ │ │ └── state.styl │ │ │ ├── module │ │ │ │ ├── button.styl │ │ │ │ ├── search.styl │ │ │ │ ├── slider.styl │ │ │ │ ├── pagination.styl │ │ │ │ └── module.styl │ │ │ ├── theme │ │ │ │ └── theme-abc.styl │ │ │ └── styles.styl │ │ ├── img │ │ │ ├── images │ │ │ └── sprites │ │ │ │ └── sprites │ │ ├── robots.txt │ │ ├── humans.txt │ │ └── index.html │ ├── .bowerrc │ ├── tasks │ │ ├── server.js │ │ ├── default.js │ │ ├── move.js │ │ ├── scripts.js │ │ ├── imagemin.js │ │ ├── sprites.js │ │ ├── styles.js │ │ └── browser-sync.js │ ├── .editorconfig │ ├── gulp.config.js │ ├── gulpfile.js │ ├── bower.json │ ├── package.json │ ├── LICENSE.txt │ └── .gitignore ├── index.js └── index.es5.js ├── .babelrc ├── .gitignore ├── gulpfile.js ├── tasks ├── default.js ├── watch.js └── lint.js ├── gulp.config.js ├── scripts ├── transpile └── test ├── .editorconfig ├── .travis.yml ├── .jshintrc ├── test └── unit │ ├── app.spec.es5.js │ └── app.spec.js ├── package.json └── README.md /app/template/src/js/main.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/base/forms.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/base/mixins.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/form.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/menu.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/state/state.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/base/generics.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/base/variables.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/content.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/footer.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/header.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/module/button.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/module/search.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/module/slider.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/template/src/styl/theme/theme-abc.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /app/template/src/styl/module/pagination.styl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | coverage/ 4 | -------------------------------------------------------------------------------- /app/template/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory":"src/assets/" 3 | } 4 | -------------------------------------------------------------------------------- /app/template/src/img/images: -------------------------------------------------------------------------------- 1 | Put your images here to minify and beautify they 2 | -------------------------------------------------------------------------------- /app/template/src/img/sprites/sprites: -------------------------------------------------------------------------------- 1 | Put your images here to transform in Sprites 2 | -------------------------------------------------------------------------------- /app/template/src/js/vendor/plugin-example.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | console.log('Hello! ;D'); 3 | })(); 4 | -------------------------------------------------------------------------------- /app/template/src/robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | 3 | # Allow crawling of all content 4 | User-agent: * 5 | Disallow: 6 | -------------------------------------------------------------------------------- /app/template/src/styl/module/module.styl: -------------------------------------------------------------------------------- 1 | @import "button" 2 | @import "pagination" 3 | @import "search" 4 | @import "slider" 5 | -------------------------------------------------------------------------------- /app/template/tasks/server.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | 5 | gulp.task('server', ['browser-sync']); 6 | -------------------------------------------------------------------------------- /app/template/src/styl/layout/layout.styl: -------------------------------------------------------------------------------- 1 | @import 'header' 2 | @import 'content' 3 | @import 'menu' 4 | @import 'form' 5 | @import 'footer' -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('./tasks/lint.js'); 4 | require('./tasks/watch.js'); 5 | require('./tasks/default.js'); 6 | -------------------------------------------------------------------------------- /tasks/default.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var tasks = [ 5 | 'lint', 6 | 'watch' 7 | ]; 8 | 9 | gulp.task('default', tasks); 10 | -------------------------------------------------------------------------------- /app/template/src/styl/styles.styl: -------------------------------------------------------------------------------- 1 | @import 'base/base' 2 | @import 'module/module' 3 | @import 'layout/layout' 4 | // @import 'state/state' 5 | // @import 'theme/theme-abc' 6 | -------------------------------------------------------------------------------- /gulp.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var config = { 4 | lintFiles: [ 5 | './*.js', 6 | './tasks/*.js' 7 | ] 8 | }; 9 | 10 | module.exports = config; 11 | -------------------------------------------------------------------------------- /scripts/transpile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | babel app/index.js --out-file app/index.es5.js; 6 | babel test/unit/app.spec.js --out-file test/unit/app.spec.es5.js; 7 | -------------------------------------------------------------------------------- /app/template/tasks/default.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | 5 | gulp.task('default', [ 6 | 'js', 7 | 'stylus', 8 | 'imagemin', 9 | 'move' 10 | ]); 11 | -------------------------------------------------------------------------------- /tasks/watch.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | 6 | gulp.task('watch', function() { 7 | gulp.watch(config.lintFiles, ['lint']); 8 | }); 9 | -------------------------------------------------------------------------------- /app/template/src/styl/base/reset.styl: -------------------------------------------------------------------------------- 1 | normalize() 2 | 3 | *, *:before, *:after 4 | -webkit-box-sizing: border-box 5 | -moz-box-sizing: border-box 6 | box-sizing: border-box 7 | 8 | // http://sergiolopes.org/css-box-sizing-border-box/ 9 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /app/template/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_size = 2 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /app/template/gulp.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var config = { 4 | dev: './src/', 5 | js: './src/js/', 6 | mainjs: 'main.js', 7 | styl: './src/styl/', 8 | sprites: './src/img/sprites/', 9 | dist: './dist/', 10 | img: './dist/img/' 11 | }; 12 | 13 | module.exports = config; 14 | -------------------------------------------------------------------------------- /app/template/gulpfile.js: -------------------------------------------------------------------------------- 1 | require('./tasks/scripts.js'); 2 | require('./tasks/styles.js'); 3 | require('./tasks/imagemin.js'); 4 | require('./tasks/sprites.js'); 5 | require('./tasks/move.js'); 6 | require('./tasks/browser-sync.js'); 7 | require('./tasks/server.js'); 8 | require('./tasks/default.js'); 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.12.9" 4 | - "4.2.1" 5 | - "5.3.0" 6 | env: 7 | - EXPORT_COVERAGE=1 CXX=g++-4.8 8 | addons: 9 | apt: 10 | sources: 11 | - ubuntu-toolchain-r-test 12 | packages: 13 | - g++-4.8 14 | branches: 15 | only: 16 | - master 17 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | node node_modules/.bin/istanbul cover _mocha -- --bail test/unit/app.spec.es5.js 6 | 7 | if [ ! -z "$EXPORT_COVERAGE" ]; then 8 | cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 9 | 10 | rm -rf ./coverage 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /app/template/src/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | -- -- 7 | 8 | # THANKS 9 | 10 | 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | CSS3, HTML5 15 | Gulp, Bower, Nodejs, Stylus, Normalize, Kouto-swiss 16 | -------------------------------------------------------------------------------- /app/template/tasks/move.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | 6 | var files = [ 7 | config.dev + '**/*.html', 8 | config.dev + '**/*.txt' 9 | ]; 10 | 11 | gulp.task('move', function() { 12 | gulp.src(files) 13 | .pipe(gulp.dest(config.dist)); 14 | }); 15 | -------------------------------------------------------------------------------- /app/template/src/styl/base/fonts.styl: -------------------------------------------------------------------------------- 1 | * 2 | font-family: 'Roboto', sans-serif 3 | font-weight: 400 4 | 5 | body 6 | text-align: center 7 | color: red 8 | filter: grayscale(50%) 9 | 10 | +tablet() 11 | color: yellow 12 | //https://github.com/jenius/rupture#tablet 13 | +desktop() 14 | color: blue 15 | //https://github.com/jenius/rupture#desktop 16 | -------------------------------------------------------------------------------- /app/template/src/styl/base/base.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Using: 3 | - Jeet (http://jeet.gs/) for Grid System 4 | - Kouto Swiss (http://kouto-swiss.io) for mixins 5 | - Rupture (http://jenius.github.io/rupture/) for media queries 6 | */ 7 | 8 | @import "jeet" 9 | @import "../../../node_modules/kouto-swiss" 10 | 11 | @import 'variables' 12 | @import 'mixins' 13 | @import 'reset' 14 | @import 'fonts' 15 | @import 'generics' 16 | @import 'forms' 17 | -------------------------------------------------------------------------------- /tasks/lint.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var gutil = require('gulp-util'); 5 | var jshint = require('gulp-jshint'); 6 | var stylish = require('jshint-stylish'); 7 | var config = require('../gulp.config.js'); 8 | 9 | gulp.task('lint', function() { 10 | gulp 11 | .src(config.lintFiles) 12 | .pipe(jshint()) 13 | .pipe(jshint.reporter(function() { 14 | gutil.beep(); 15 | })) 16 | .pipe(jshint.reporter(stylish)); 17 | }); 18 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "bitwise": true, 4 | "camelcase": true, 5 | "curly": true, 6 | "eqeqeq": true, 7 | "immed": true, 8 | "indent": 2, 9 | "latedef": true, 10 | "newcap": true, 11 | "noarg": true, 12 | "quotmark": "single", 13 | "regexp": true, 14 | "undef": true, 15 | "unused": true, 16 | "strict": true, 17 | "trailing": true, 18 | "smarttabs": true, 19 | "white": true, 20 | "globals": { 21 | "before": true, 22 | "it": true, 23 | "describe": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/template/tasks/scripts.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | var plumber = require('gulp-plumber'); 6 | var uglify = require('gulp-uglify'); 7 | var concat = require('gulp-concat'); 8 | 9 | // Uglify & Concat JS 10 | gulp.task('js', function () { 11 | gulp.src([config.js + '**/*.js']) 12 | .pipe(plumber()) 13 | //.pipe(concat('main.js')) if you need concat scripts 14 | .pipe(uglify()) 15 | .pipe(gulp.dest(config.dist + 'js/')); 16 | }); 17 | -------------------------------------------------------------------------------- /app/template/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kibe", 3 | "description": "A simple boilerplate for Gulp workflow", 4 | "main": "Gulpfile.js", 5 | "authors": [ 6 | "William de Oliveira Souza" 7 | ], 8 | "license": "MIT", 9 | "keywords": [ 10 | "Gulp", 11 | "Automation", 12 | "Front", 13 | "End" 14 | ], 15 | "homepage": "https://github.com/woliveiras/kibe", 16 | "moduleType": [ 17 | "node" 18 | ], 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "tests" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /app/template/tasks/imagemin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | var plumber = require('gulp-plumber'); 6 | var cache = require('gulp-cache'); 7 | var imagemin = require('gulp-imagemin'); 8 | 9 | var options = { 10 | optimizationLevel: 3, 11 | progressive: true, 12 | interlaced: true 13 | }; 14 | 15 | // Minify images 16 | gulp.task('imagemin', function () { 17 | gulp.src(config.img + '/**/*') 18 | .pipe(plumber()) 19 | .pipe(cache(imagemin(options))) 20 | .pipe(gulp.dest(config.img)); 21 | }); 22 | -------------------------------------------------------------------------------- /app/template/tasks/sprites.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | var spritesmith = require('gulp.spritesmith'); 6 | 7 | var options = { 8 | imgName: '../img/sprite.png', 9 | cssName: 'sprites.css', 10 | algorithm: 'binary-tree', 11 | }; 12 | 13 | // Create Sprites 14 | gulp.task('sprites', function() { 15 | var spriteData = gulp.src(config.sprites + '*.*') 16 | .pipe(spritesmith(options)); 17 | 18 | spriteData.img.pipe(gulp.dest(config.img)); 19 | spriteData.css.pipe(gulp.dest(config.dist + 'css/')); 20 | }); 21 | -------------------------------------------------------------------------------- /app/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let generators = require('yeoman-generator'); 4 | let path = require('path'); 5 | 6 | module.exports = generators.Base.extend({ 7 | constructor, 8 | template, 9 | dependencies 10 | }); 11 | 12 | function constructor() { 13 | generators.Base.apply(this, arguments); 14 | } 15 | 16 | function template() { 17 | this.sourceRoot(path.join(__dirname, 'template'), this); 18 | let source = this.templatePath(); 19 | let dest = this.destinationPath('.'); 20 | 21 | this.fs.copy(source, dest, {}); 22 | this.fs.copy(this.templatePath('.*'), dest, {}); 23 | } 24 | 25 | function dependencies() { 26 | this.installDependencies({ 27 | bower: true, 28 | npm: true, 29 | skipInstall: true 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /app/template/tasks/styles.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | var plumber = require('gulp-plumber'); 6 | var stylus = require('gulp-stylus'); 7 | var koutoSwiss = require('kouto-swiss'); 8 | var prefixer = require('autoprefixer-stylus'); 9 | var jeet = require('jeet'); 10 | var rupture = require('rupture'); 11 | 12 | var options = { 13 | use:[ 14 | koutoSwiss(), 15 | prefixer(), 16 | jeet(), 17 | rupture() 18 | ], 19 | compress: true 20 | }; 21 | 22 | // Compile Stylus 23 | gulp.task('stylus', function () { 24 | gulp.src(config.styl + 'styles.styl') 25 | .pipe(plumber()) 26 | .pipe(stylus(options)) 27 | .pipe(gulp.dest(config.dist + 'css/')); 28 | }); 29 | -------------------------------------------------------------------------------- /app/template/tasks/browser-sync.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var config = require('../gulp.config.js'); 5 | var browserSync = require('browser-sync').create(); 6 | 7 | var files = [ 8 | 'dist/**/*.html', 9 | 'dist/css/**/*.css', 10 | 'dist/js/**/*.js' 11 | ]; 12 | 13 | var options = { 14 | open: false, 15 | server: { 16 | baseDir: config.dist 17 | } 18 | }; 19 | 20 | // Reload Browsers 21 | gulp.task('browser-sync', function () { 22 | browserSync.init(files, options); 23 | 24 | gulp.watch(config.js + '**/*.js', ['js']); 25 | gulp.watch(config.styl + '**/*.styl', ['stylus']); 26 | gulp.watch([config.dev + '**/*.html', config.dev + '**/*.txt'], ['move']); 27 | gulp.watch(files).on('change', browserSync.reload); 28 | }); 29 | -------------------------------------------------------------------------------- /app/index.es5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var generators = require('yeoman-generator'); 4 | var path = require('path'); 5 | 6 | module.exports = generators.Base.extend({ 7 | constructor: constructor, 8 | template: template, 9 | dependencies: dependencies 10 | }); 11 | 12 | function constructor() { 13 | generators.Base.apply(this, arguments); 14 | } 15 | 16 | function template() { 17 | this.sourceRoot(path.join(__dirname, 'template'), this); 18 | var source = this.templatePath(); 19 | var dest = this.destinationPath('.'); 20 | 21 | this.fs.copy(source, dest, {}); 22 | this.fs.copy(this.templatePath('.*'), dest, {}); 23 | } 24 | 25 | function dependencies() { 26 | this.installDependencies({ 27 | bower: true, 28 | npm: true, 29 | skipInstall: true 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /test/unit/app.spec.es5.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var helpers = require('yeoman-test'); 4 | var assert = require('yeoman-assert'); 5 | var generator = process.env.PWD + '/app'; 6 | 7 | describe('kibe application', scaffolding); 8 | 9 | function scaffolding() { 10 | before(function (done) { 11 | helpers.run(generator).on('end', done); 12 | }); 13 | 14 | it('scaffolding', function () { 15 | assert.file(['bower.json', '.editorconfig', '.gitignore', 'LICENSE.txt', 'bower.json', 'gulp.config.js', 'gulpfile.js', 'package.json', 'src/humans.txt', 'src/humans.txt', 'src/index.html', 'src/robots.txt', 'src/img', 'src/js', 'src/styl', './tasks/scripts.js', './tasks/styles.js', './tasks/imagemin.js', './tasks/sprites.js', './tasks/move.js', './tasks/browser-sync.js', './tasks/server.js', './tasks/default.js']); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /app/template/src/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /app/template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kibe", 3 | "version": "0.0.0", 4 | "description": "A simple boilerplate for Gulp workflow", 5 | "main": "Gulpfile.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/woliveiras/kibe.git" 12 | }, 13 | "keywords": [ 14 | "Gulp", 15 | "Automation", 16 | "Front", 17 | "End" 18 | ], 19 | "author": "William de Oliveira Souza", 20 | "license": "MIT", 21 | "bugs": { 22 | "url": "https://github.com/woliveiras/kibe/issues" 23 | }, 24 | "devDependencies": { 25 | "jeet": "~6.1.2", 26 | "rupture": "~0.6.1", 27 | "autoprefixer-stylus": "~0.8.0", 28 | "gulp-concat": "~2.6.0", 29 | "gulp-plumber": "~1.0.1", 30 | "gulp": "~3.9.0", 31 | "gulp-stylus": "~2.1.0", 32 | "gulp-uglify": "~1.4.2", 33 | "browser-sync": "~2.9.11", 34 | "kouto-swiss": "~0.11.13", 35 | "gulp-imagemin": "~2.3.0", 36 | "gulp-cache": "~0.3.0", 37 | "gulp.spritesmith": "~4.2.2" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/unit/app.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | let helpers = require('yeoman-test'); 4 | let assert = require('yeoman-assert'); 5 | let generator = `${process.env.PWD}/app`; 6 | 7 | describe('kibe application', scaffolding); 8 | 9 | function scaffolding() { 10 | before(function (done) { 11 | helpers 12 | .run(generator) 13 | .on('end', done); 14 | }); 15 | 16 | it('scaffolding', function () { 17 | assert.file([ 18 | 'bower.json', 19 | '.editorconfig', 20 | '.gitignore', 21 | 'LICENSE.txt', 22 | 'bower.json', 23 | 'gulp.config.js', 24 | 'gulpfile.js', 25 | 'package.json', 26 | 'src/humans.txt', 27 | 'src/humans.txt', 28 | 'src/index.html', 29 | 'src/robots.txt', 30 | 'src/img', 31 | 'src/js', 32 | 'src/styl', 33 | './tasks/scripts.js', 34 | './tasks/styles.js', 35 | './tasks/imagemin.js', 36 | './tasks/sprites.js', 37 | './tasks/move.js', 38 | './tasks/browser-sync.js', 39 | './tasks/server.js', 40 | './tasks/default.js' 41 | ]); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /app/template/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) William de Oliveira Souza (http://www.woliveiras.com.br) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-kibe", 3 | "version": "0.0.3", 4 | "description": "Start projects with the most common tasks of my workflow, using Gulp", 5 | "main": "app/index.es5.js", 6 | "scripts": { 7 | "transpile": "scripts/transpile", 8 | "pretest": "npm run transpile", 9 | "test": "scripts/test" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/woliveiras/kibe.git" 14 | }, 15 | "keywords": [ 16 | "kibe", 17 | "pastel", 18 | "gulp", 19 | "html", 20 | "css", 21 | "javascript", 22 | "stylus", 23 | "rupture", 24 | "koutu-swiss", 25 | "nodejs", 26 | "smacss", 27 | "sprites", 28 | "front-end", 29 | "Babel", 30 | "Generator" 31 | ], 32 | "author": "William Oliveira (https://github.com/woliveiras)", 33 | "contributors": [ 34 | "Darlan Mendonça (http://github.com/darlanmendonca)" 35 | ], 36 | "license": "MIT", 37 | "bugs": { 38 | "url": "https://github.com/woliveiras/kibe/issues" 39 | }, 40 | "homepage": "https://github.com/woliveiras/kibe#readme", 41 | "dependencies": { 42 | "yeoman-generator": "^0.22.1" 43 | }, 44 | "devDependencies": { 45 | "coveralls": "^2.11.6", 46 | "gulp": "^3.9.0", 47 | "gulp-jshint": "^1.11.2", 48 | "gulp-util": "^3.0.7", 49 | "istanbul": "^0.4.1", 50 | "jshint-stylish": "^2.1.0", 51 | "mocha": "^2.3.4", 52 | "yeoman-assert": "^2.1.1", 53 | "yeoman-test": "^1.0.0", 54 | "babel-cli": "^6.6.5", 55 | "babel-core": "^6.7.0", 56 | "babel-preset-es2015": "^6.6.0" 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/template/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Kibe, a simple Gulp Boilerplate 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 |

Hello world! This is Kibe.

22 | 23 | 24 | 25 | 26 | 27 | 28 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/woliveiras/kibe.svg)](https://travis-ci.org/woliveiras/kibe) 2 | [![Coverage Status](https://coveralls.io/repos/woliveiras/kibe/badge.svg?branch=master&service=github)](https://coveralls.io/github/woliveiras/kibe?branch=master) 3 | 4 | # kibe 5 | 6 | A substitute for the [Pastel](https://github.com/woliveiras/pastel). 7 | 8 | Kibe is a simple Yeoman Generator to start projects with the most common tasks of my workflow using Gulp. 9 | 10 | **I use:** 11 | 12 | - [NodeJS](http://nodejs.org/) 13 | - [Babel](https://babeljs.io/) 14 | - [Gulpjs](http://gulpjs.com/) 15 | - [Bower](http://bower.io/) 16 | - [Stylus](https://learnboost.github.io/stylus/) 17 | - [Kouto-swiss](http://kouto-swiss.io/) 18 | - [Rupture](http://jenius.github.io/rupture/) 19 | - [Vendor prefixes](https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix) - [Look here to ;)](http://shouldiprefix.com/) 20 | - [SMACSS](https://smacss.com/) 21 | - [Image sprites](https://css-tricks.com/css-sprites/) 22 | - [CSS, JS and Images minify](https://developers.google.com/speed/docs/insights/MinifyResources) 23 | 24 | ### Operational System dependencies 25 | 26 | - [NodeJS](http://nodejs.org/) 27 | 28 | ## How to use? 29 | 30 | ### Instalation 31 | 32 | Install [Yeoman](http://yeoman.io/) if you don't have installed on your system: 33 | 34 | ``` 35 | npm i -g yo 36 | ``` 37 | 38 | Install Kibe on your project: 39 | 40 | ``` 41 | npm i generator-kibe 42 | ``` 43 | 44 | Wait and enjoy!!! 45 | 46 | ## The tasks 47 | 48 | ### Configs on Gulp 49 | 50 | In the `gulp.config.js` file have the variables: 51 | 52 | ``` 53 | { 54 | dev : './src/', 55 | js : './src/js/', 56 | mainjs : 'main.js', 57 | styl : './src/styl/', 58 | sprites : './src/img/sprites/', 59 | dist : './dist/', 60 | img : './dist/img/' 61 | } 62 | ``` 63 | 64 | ### On end of your project 65 | 66 | Run: 67 | 68 | ``` 69 | gulp 70 | ``` 71 | 72 | Simple, not? 73 | 74 | ### To development 75 | 76 | Run `gulp` one time to prepare the `dist` folder. 77 | 78 | ``` 79 | gulp server 80 | ``` 81 | 82 | Write your code on `scr` folder. 83 | 84 | When finish your work the `dist` folder already exists and is solemnly send to production! 85 | 86 | ## All tasks 87 | 88 | ### Uglify & Concat JS 89 | 90 | Concat and minify JS files. 91 | 92 | Run: 93 | 94 | ``` 95 | gulp js 96 | ``` 97 | 98 | The concat option on this task is commented to you active if is needed concatenate JS files on your project. 99 | 100 | ### Compile Stylus (<3) 101 | 102 | Compile Stylus and execute `koutoSwiss`, `prefixer`, `jeet` and `rupture` plugins. 103 | 104 | Run: 105 | 106 | ``` 107 | gulp stylus 108 | ``` 109 | 110 | ### Minify images 111 | 112 | Optimize images with the options: 113 | 114 | ``` 115 | { 116 | optimizationLevel: 3, 117 | progressive: true, 118 | interlaced: true 119 | } 120 | ``` 121 | 122 | Run: 123 | 124 | ``` 125 | gulp imagemin 126 | ``` 127 | 128 | ### Create image Sprites 129 | 130 | Get images on `./src/img/sprites/` and create a image sprite on `/img/sprite.png`. 131 | 132 | Run: 133 | 134 | ``` 135 | gulp sprites 136 | ``` 137 | 138 | ### Reload Browsers 139 | 140 | Watch files `[html, css, js]` on `dist` and reload browsers when you save changes on your editor. 141 | 142 | Run: 143 | 144 | ``` 145 | gulp browser-sync 146 | ``` 147 | 148 | Thanks [@darlanmendonca](http://twitter.com/darlanmendonca) 149 | -------------------------------------------------------------------------------- /app/template/.gitignore: -------------------------------------------------------------------------------- 1 | ###Python### 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | build/ 12 | dist/ 13 | develop-eggs/ 14 | downloads/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # PyInstaller 26 | *.manifest 27 | *.spec 28 | 29 | # Installer logs 30 | pip-log.txt 31 | pip-delete-this-directory.txt 32 | 33 | # Unit test / coverage reports 34 | htmlcov/ 35 | .tox/ 36 | .coverage 37 | .cache 38 | nosetests.xml 39 | coverage.xml 40 | 41 | # Translations 42 | *.mo 43 | *.pot 44 | 45 | # Django stuff: 46 | *.log 47 | 48 | # Sphinx documentation 49 | docs/_build/ 50 | 51 | # PyBuilder 52 | target/ 53 | 54 | ###Django### 55 | 56 | *.log 57 | *.pot 58 | *.pyc 59 | local_settings.py 60 | 61 | ###SASS### 62 | 63 | .sass-cache 64 | *.css.map 65 | 66 | ###JetBrains### 67 | 68 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 69 | 70 | /*.iml 71 | 72 | ## Directory-based project format: 73 | .idea/ 74 | # if you remove the above rule, at least ignore the following: 75 | 76 | # User-specific stuff: 77 | # .idea/workspace.xml 78 | # .idea/tasks.xml 79 | # .idea/dictionaries 80 | 81 | # Sensitive or high-churn files: 82 | # .idea/dataSources.ids 83 | # .idea/dataSources.xml 84 | # .idea/sqlDataSources.xml 85 | # .idea/dynamic.xml 86 | # .idea/uiDesigner.xml 87 | 88 | # Gradle: 89 | # .idea/gradle.xml 90 | # .idea/libraries 91 | 92 | # Mongo Explorer plugin: 93 | # .idea/mongoSettings.xml 94 | 95 | ## File-based project format: 96 | *.ipr 97 | *.iws 98 | 99 | ## Plugin-specific files: 100 | 101 | # IntelliJ 102 | out/ 103 | 104 | # mpeltonen/sbt-idea plugin 105 | .idea_modules/ 106 | 107 | # JIRA plugin 108 | atlassian-ide-plugin.xml 109 | 110 | # Crashlytics plugin (for Android Studio and IntelliJ) 111 | com_crashlytics_export_strings.xml 112 | 113 | ###SublimeText### 114 | 115 | *.tmlanguage.cache 116 | *.tmPreferences.cache 117 | *.stTheme.cache 118 | 119 | # workspace files are user-specific 120 | *.sublime-workspace 121 | 122 | # project files should be checked into the repository, unless a significant 123 | # proportion of contributors will probably not be using SublimeText 124 | # *.sublime-project 125 | 126 | # sftp configuration file 127 | sftp-config.json 128 | 129 | ###Windows### 130 | 131 | # Windows image file caches 132 | Thumbs.db 133 | ehthumbs.db 134 | 135 | # Folder config file 136 | Desktop.ini 137 | 138 | # Recycle Bin used on file shares 139 | $RECYCLE.BIN/ 140 | 141 | # Windows Installer files 142 | *.cab 143 | *.msi 144 | *.msm 145 | *.msp 146 | 147 | # Windows shortcuts 148 | *.lnk 149 | 150 | ###Node### 151 | 152 | # Logs 153 | logs 154 | *.log 155 | npm-debug.log 156 | 157 | # Runtime data 158 | pids 159 | *.pid 160 | *.seed 161 | 162 | # Directory for instrumented libs generated by jscoverage/JSCover 163 | lib-cov 164 | 165 | # Coverage directory used by tools like istanbul 166 | coverage 167 | 168 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 169 | .grunt 170 | 171 | # Compiled binary addons (http://nodejs.org/api/addons.html) 172 | build/Release 173 | 174 | # Dependency directory 175 | # Commenting this out is preferred by some people, see 176 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 177 | node_modules 178 | 179 | # Users Environment Variables 180 | .lock-wscript 181 | 182 | ###KIBE### 183 | 184 | src/assets 185 | app/assets 186 | --------------------------------------------------------------------------------