First time looking at gulp and having the project land on my lap, and of-course not getting it to work.
I need to get a version number on the files and not getting 'gulp-version-number' to work - the old code does, it just "jumps over" the versionNumber command.
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');
var minifycss = require('gulp-minify-css');
var versionNumber = require('gulp-version-number');
var jsDest = 'ui/dist/js/';
var versionConfig = {
value: '%MDS%',
append: {
key: 'v',
to: ['css', 'js']
},
output: {
file: 'version.json'
}
};
gulp.task('scripts', function () {
return gulp.src('ui/js/site/*.js')
.pipe(concat('site.js'))
.pipe(gulp.dest(jsDest))
.pipe(rename('site.min.js'))
.pipe(versionNumber(versionConfig)) //<-- not doing notin'
.pipe(uglify())
.pipe(gulp.dest(jsDest));
});
//and the same for SASS/CSS
Environment is Visual Studio 2015. Glad for any input!
(Next step is to modify the references to the files with version nbr...)