]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Merge remote-tracking branch 'upstream/v2.0-dev' into feature/unit-test 1424/head
authorEvert Timberg <evert.timberg@gmail.com>
Fri, 28 Aug 2015 23:09:39 +0000 (19:09 -0400)
committerEvert Timberg <evert.timberg@gmail.com>
Fri, 28 Aug 2015 23:09:39 +0000 (19:09 -0400)
Conflicts:
gulpfile.js

1  2 
gulpfile.js

diff --cc gulpfile.js
index 0a5b3d3b9ec6a52b1f556e3ab73e3847edc43e91,ba699af6b4107222edd876f3744de5247b0687cb..42fd09b092e0f08c56317946401b39a05b4aa65e
@@@ -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
        });