When writing a .html , .css or .js file, we use its flat form, but when playing in production we prefer to use Minimal files, usually named .min.css , .min.js ...
The question that brings me here is: in my development environment I use gulp to perform the process of building the files. In the .html files I'm referring to * .min.css files, as only mined when applying a gulp build
, in development tasks I simply get the files from the source and rename repository to * .min.css and * .min .js
See an example 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));
});
Is this the conventional way of working?