Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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