Questions tagged [gulp-usemin]

gulp-usemin is a gulp plugin that can replace references to non-optimized JavaScript or CSS files in a set of HTML files.

gulp-usemin is a gulp plugin that can replace references to non-optimized (e.g., non-minified) JavaScript or CSS files in a set of HTML files (views, templates).

Example of usage:

var usemin = require('gulp-usemin');
var uglify = require('gulp-uglify');
var minifyHtml = require('gulp-minify-html');
var minifyCss = require('gulp-minify-css');
var rev = require('gulp-rev');

gulp.task('usemin', function () {
  return gulp.src('./*.html')
    .pipe(usemin({
      css: [minifyCss(), 'concat'],
      html: [minifyHtml({empty: true})],
      js: [uglify(), rev()]
    }))
    .pipe(gulp.dest('./build/'));
});
23 questions
6
votes
2 answers

Usemin and multiple build configurations

Following is the sample usemin build configuration in my index.html file
rubik
  • 8,814
  • 9
  • 58
  • 88
0
votes
1 answer

Combine js files into one and make it inline script

How can i combine multiple JavaScript files into one and make it inline script. Currently I can combine into one file using gulp usemin but i can't do it as inline script . I want to solve render blocking request issue. My question is following is…
0
votes
1 answer

production folder build issue with gulp

I'm trying to figure out why my animation-name style I added in my css is not copying over from my development environment to my production environment. This is the code that is in my production environment. @keyframes a { 0% { …
demond611
  • 35
  • 5
1
2