Skip to content

Replace with file contents. #4

Description

@willfarrell

Hi, I'm trying to replace a script include with an inline script of it's contents.

gulp.task('replace-inline', ['minify'], function() {
  return gulp.src(paths.distRoot+'index.web.html')
    .pipe(replace('<script src="js/async.min.js"></script>', '<script><%= gulp.file.read(paths.distRoot+\'/js/async.min.js\') %></script>'))
    .pipe(gulp.dest(paths.distRoot+'index.web.html'));
});

Not too sure about gulps inner working, idea how I might be able to do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions