This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var plumber = require('gulp-plumber'); | |
var watch = require('gulp-watch'); | |
var less = require('gulp-less'); | |
gulp.task('watch:src', function() { | |
watch({glob: 'styles/**/*.less'}, function(files) { | |
return gulp.start('styles:src'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bh = new (require('bh').BH)(); | |
bh.match('button', function(ctx) { | |
ctx.mix({block: 'i-global'}); | |
}); | |
bh.match('button', function(ctx) { | |
return [ | |
'2', | |
ctx.json(), | |
ctx.json(), | |
ctx.json(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Controller = function (name) { | |
if (!name) { | |
return new Error('Controller name is not defined!'); | |
} | |
var controller = this.controller = require('./' + name); | |
Object.keys(controller).forEach(function (method) { | |
this.setMethod(method); | |
}.bind(this)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
jscs = require('gulp-jscs'), | |
jshint = require('gulp-jshint'), | |
tslint = require('gulp-tslint'), | |
typedoc = require('gulp-typedoc'), | |
react = require('gulp-react'), | |
typescript = require('gulp-tsc'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
tslint = require('gulp-tslint'), | |
typescript = require('gulp-tsc'), | |
watch = require('gulp-watch'), | |
plumber = require('gulp-plumber'), | |
//livereloadEmbed = require('gulp-embedlr'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include gulp | |
var gulp = require('gulp'); | |
// Include plugins | |
var watch = require('gulp-watch'); | |
var plumber = require('gulp-plumber'); | |
var sass = require('gulp-sass'); | |
var prefix = require('gulp-autoprefixer'); | |
var minifycss = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do `npm i gaze` before running this | |
var gaze = require('gaze'); | |
// Watch all .js files/dirs in process.cwd() | |
gaze('src/images/**/*', function(err, watcher) { | |
this.on('all', function(event, filepath) { | |
console.log(filepath + ' was ' + event); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Joi = require('joi'); | |
function attrs (keys) { | |
return Joi.object().keys({ | |
__attr: Joi.compile(keys).required() | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var watch = require('gulp-watch'), | |
inject = require('gulp-inject'), | |
sass = require('gulp-sass'), | |
gulp = require('gulp'), | |
es = require('event-stream'); | |
gulp.task('default', function () { | |
watch({glob: 'sass/*.scss'}, function(scss) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onError = function (err) { | |
gutil.beep(); | |
console.log(err); | |
}; | |
gulp.task('styles', function () { | |
gulp.src('scss/style.scss') | |
.pipe(plumber(onError) | |
.pipe(rubysass()) | |
.pipe(gulp.dest('dist/')); |