0
When writing a file .html, .css or .js we use its flat form, but when playing in production we use preferably minified files, usually named .min css., .min js....
The question that brings me here is: in my development environment I use the Gulp to carry out the build process of the files. In the files . html is referencing *.min.css files, as only scanned when applying a gulp build
, in the development tasks I simply take the files from the source repository and rename them to *.min.css and *.min.js
See an example of a development task:
gulp.task('scss-to-css', function () {
return gulp.src(paths.styles.src)
.pipe(autoprefixer())
.pipe(sass().on('error', sass.logError))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(paths.styles.dest));
});
gulp.task('js', function () {
return gulp.src(paths.scripts.src)
.pipe(gulpif(prod, uglify()))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(paths.scripts.dest));
});
This is the conventional way of working?