From: Evert Timberg Date: Fri, 28 Aug 2015 23:09:39 +0000 (-0400) Subject: Merge remote-tracking branch 'upstream/v2.0-dev' into feature/unit-test X-Git-Tag: 2.0.0-alpha4~37^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1424%2Fhead;p=thirdparty%2FChart.js.git Merge remote-tracking branch 'upstream/v2.0-dev' into feature/unit-test Conflicts: gulpfile.js --- 7fed38f1abe18922512416aa2c74b8046837b6f6 diff --cc gulpfile.js index 0a5b3d3b9,ba699af6b..42fd09b09 --- a/gulpfile.js +++ b/gulpfile.js @@@ -24,19 -24,39 +24,40 @@@ var testDir = './test/' */ var srcFiles = [ - './src/core/core.js', - './src/core/core.helpers.js', - './src/core/core.chart.js', - './src/core/core.element.js', - './src/core/**', - './src/controllers/**', - './src/scales/**', - './src/elements/**', - './src/charts/**', - './node_modules/color/dist/color.min.js' - ]; - - gulp.task('build', function() { + './src/core/core.js', + './src/core/core.helpers.js', + './src/core/core.chart.js', + './src/core/core.element.js', + './src/core/**', + './src/controllers/**', + './src/scales/**', + './src/elements/**', + './src/charts/**', + './node_modules/color/dist/color.min.js' + ]; + + + gulp.task('build', buildTask); ++gulp.task('coverage', coverageTask); + gulp.task('watch', watchTask); + gulp.task('bump', bumpTask); + gulp.task('release', ['build'], releaseTask); + gulp.task('jshint', jshintTask); + gulp.task('test', ['jshint', 'validHTML', 'unittest']); + gulp.task('size', ['library-size', 'module-sizes']); + gulp.task('server', serverTask); + gulp.task('validHTML', validHTMLTask); + gulp.task('unittest', unittestTask); + gulp.task('unittestWatch', unittestWatchTask); + gulp.task('library-size', librarySizeTask); + gulp.task('module-sizes', moduleSizesTask); + gulp.task('_open', _openTask); + gulp.task('dev', ['server', 'default']); + + gulp.task('default', ['build', 'watch']); + + + function buildTask() { var isCustom = !!(util.env.types), outputDir = (isCustom) ? 'custom' : '.'; @@@ -109,20 -143,9 +144,20 @@@ function unittestWatchTask() configFile: 'karma.conf.js', action: 'watch' })); - }); + } - gulp.task('coverage', function() { ++function coverageTask() { + var files = srcFiles.slice(); + files.push(testDir + '*.js'); + + return gulp.src(files) + .pipe(karma({ + configFile: 'karma.coverage.conf.js', + action: 'run' + })); - }); ++} + - gulp.task('library-size', function() { + function librarySizeTask() { return gulp.src('Chart.min.js') .pipe(size({ gzip: true @@@ -138,19 -161,16 +173,13 @@@ function moduleSizesTask() showFiles: true, gzip: true })); - }); - - gulp.task('watch', function() { - gulp.watch('./src/**', ['build', 'unittest']); - }); + } - gulp.task('test', ['jshint', 'valid', 'unittest']); - + function watchTask() { + gulp.watch('./src/**', ['build', 'unittest', 'unittestWatch']); + } - gulp.task('size', ['library-size', 'module-sizes']); -- - gulp.task('default', ['build', 'watch']); -- - gulp.task('server', function() { + function serverTask() { connect.server({ port: 8000 });