Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update index.html file name #200

Open
smurfyuen opened this issue Mar 3, 2019 · 1 comment
Open

How to update index.html file name #200

smurfyuen opened this issue Mar 3, 2019 · 1 comment

Comments

@smurfyuen
Copy link

Hi,
I have an output of app.js.
gulp-rev-all seems can't rename file name in index.html.

May I know how to fix this?

<script src="app.js"></script>

.pipe(concat('app.js'))
.pipe(RevAll.revision())
.pipe(gulp.dest('public'))
.pipe(RevAll.manifestFile())
.pipe(gulp.dest('public'))
.pipe(RevAll.versionFile())
.pipe(gulp.dest('public'));

@dpilafian
Copy link

You need to make sure that all the necessary files (including the index.html file) are part of your Gulp task source.

For example, your gulpfile.js should contain something like:

const revAll = () => {
   return gulp.src('target/minified/**/*')
      .pipe(RevAll.revision({ dontRenameFile: ['.html'] }))
      .pipe(gulp.dest('dist'));
   };
gulp.task('revision', revAll);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants