2015-12-10 16:22:20 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var path = require('path');
|
|
|
|
var gulp = require('gulp');
|
|
|
|
var conf = require('./conf');
|
|
|
|
|
|
|
|
var browserSync = require('browser-sync');
|
|
|
|
|
|
|
|
var $ = require('gulp-load-plugins')();
|
|
|
|
|
2015-12-14 18:22:38 +00:00
|
|
|
|
|
|
|
gulp.task('scripts-reload', function() {
|
|
|
|
return buildScripts()
|
|
|
|
.pipe(browserSync.stream());
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('scripts', function() {
|
|
|
|
return buildScripts();
|
|
|
|
});
|
|
|
|
|
|
|
|
function buildScripts() {
|
2015-12-10 16:22:20 +00:00
|
|
|
return gulp.src(path.join(conf.paths.src, '/app/**/*.js'))
|
|
|
|
.pipe($.eslint())
|
|
|
|
.pipe($.eslint.format())
|
|
|
|
.pipe($.size())
|
2015-12-14 18:22:38 +00:00
|
|
|
};
|