Skip to content

Instantly share code, notes, and snippets.

@jermspeaks
Forked from itsananderson/gulpfile.js
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jermspeaks/3e3323ce106896481606 to your computer and use it in GitHub Desktop.
Save jermspeaks/3e3323ce106896481606 to your computer and use it in GitHub Desktop.
var paths = require('./paths');
gulp.task('lint', function() {
gulp.src(paths.app.concat(paths.test))
.pipe(lint());
});
gulp.task('minify', function() {
gulp.src(paths.app)
.pipe(minify());
});
gulp.task('test', function() {
gulp.src(paths.test)
.pipe(test());
});
gulp.task('karma', function() {
gulp.src(paths.karma)
.pipe(karma({ configFile: 'karma.conf.js' }));
});
// karma.conf.js
var paths = require('./paths');
module.exports = function (config) {
config.set({
files: paths.karma,
reporters: ['spec'],
autoWatch: true,
frameworks: ['jasmine'],
browsers: ['PhantomJS'],
plugins: [
'karma-jasmine',
'karma-spec-reporter',
'karma-phantomjs-launcher'
],
});
};
var app = ['app/*.js'];
var test = ['test/*.js'];
var vendor = ['vendor/angular.js'];
module.exports = {
app: app,
test: test,
vendor: vendor,
karma: vendor.concat(app).concat(test)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment