0

I have multiple apps in one project, so I have this task:

gulp.task('usemin', function() {
  return gulp.src('/app1/index.html')
    .pipe(usemin({
      js: [ uglify(), rev() ]
    }))
    .pipe(gulp.dest('app1/build/'));
});

And this is the index.html:

<!-- build:js app.js -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/d3/d3.min.js"></script>
.
.
.
<!-- endbuild -->

The task runs without issues but generates no file!

ilyo
  • 35,851
  • 46
  • 106
  • 159

2 Answers2

0

You're using an absolute path here:

return gulp.src('/app1/index.html')

You probably want to use a project relative path:

return gulp.src('app1/index.html')
Sven Schoenung
  • 30,224
  • 8
  • 65
  • 70
0

Have you tried appending to relative path on gulp.src?

return gulp.src('./app1/index.html')

Read the Doc for more details.