Skip to content

Instantly share code, notes, and snippets.

@itsananderson
Created August 16, 2014 08:29
Show Gist options
  • Save itsananderson/61bad88e4470679a4f13 to your computer and use it in GitHub Desktop.
Save itsananderson/61bad88e4470679a4f13 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