gulp-package-number
v1.0.0
Published
Add package version numbers to your files
Downloads
6
Maintainers
Readme
Gulp Version Number
npm install --save gulp-package-number
Require this into your existing gulpfile and away you go. Example below:
var gulp = require('gulp');
var rename = require('gulp-rename');
var less = require('gulp-less');
var packageNumber = require('gulp-package-number');
var LessPluginCleanCSS = require('less-plugin-clean-css');
var cleancss = new LessPluginCleanCSS({ advanced: true });
var pathLess = [
'./brands/*/theme-deployment/*.less'
];
gulp.task('less', function() {
gulp.src(pathLess)
.pipe(packageNumber())
.pipe(less({
plugins: [cleancss]
}))
.pipe(rename({
extname: '.css',
suffix: versionNumber + '.min'
}))
.pipe(gulp.dest('dist/styles'));
});
gulp.task('default', ['less']);