Created
August 16, 2014 08:29
-
-
Save itsananderson/61bad88e4470679a4f13 to your computer and use it in GitHub Desktop.
Final result from http://willi.am/blog/2014/08/16/gulp-automation-path-abstraction/
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 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' })); | |
}); |
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
// 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' | |
], | |
}); | |
}; |
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 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