chartjs-plugin-doughnutlabel
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,5 +6,8 @@ 'use strict'; | ||
var rename = require('gulp-rename'); | ||
var replace = require('gulp-replace'); | ||
var streamify = require('gulp-streamify'); | ||
var uglify = require('gulp-uglify'); | ||
var gutil = require('gulp-util'); | ||
var zip = require('gulp-zip'); | ||
var merge = require('merge2'); | ||
var path = require('path'); | ||
@@ -62,1 +65,22 @@ var rollup = require('rollup-stream'); | ||
}); | ||
gulp.task('samples', function() { | ||
// since we moved the dist files one folder up (package root), we need to rewrite | ||
// samples src="../dist/ to src="../ and then copy them in the /samples directory. | ||
var out = path.join(argv.output, argv.samplesDir); | ||
return gulp.src('samples/**/*', {base: 'samples'}) | ||
.pipe(streamify(replace(/src="((?:\.\.\/)+)dist\//g, 'src="$1', {skipBinary: true}))) | ||
.pipe(gulp.dest(out)); | ||
}); | ||
gulp.task('package', ['build', 'samples'], function() { | ||
var out = argv.output; | ||
var streams = merge( | ||
gulp.src(path.join(out, argv.samplesDir, '**/*'), {base: out}), | ||
gulp.src([path.join(out, '*.js'), 'LICENSE.md']) | ||
); | ||
return streams | ||
.pipe(zip(pkg.name + '.zip')) | ||
.pipe(gulp.dest(out)); | ||
}); |
{ | ||
"name": "chartjs-plugin-doughnutlabel", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Chart.js plugin for doughnut chart to display lines of text in the center", | ||
@@ -21,5 +21,8 @@ "main": "dist/chartjs-plugin-doughnutlabel.js", | ||
"gulp-rename": "^1.2.3", | ||
"gulp-replace": "^1.0.0", | ||
"gulp-streamify": "^1.0.2", | ||
"gulp-uglify": "^3.0.0", | ||
"gulp-util": "^3.0.8", | ||
"gulp-zip": "^4.1.0", | ||
"merge2": "^1.2.2", | ||
"path": "^0.12.7", | ||
@@ -26,0 +29,0 @@ "rollup-stream": "^1.24.1", |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
659
2
55752
15
15