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

working with html.twig (php templates) file #65

Open
AakashGfude opened this issue Aug 16, 2016 · 1 comment
Open

working with html.twig (php templates) file #65

AakashGfude opened this issue Aug 16, 2016 · 1 comment

Comments

@AakashGfude
Copy link

AakashGfude commented Aug 16, 2016

Hi,

My revreplace task is ::-

gulp.task("revreplace", ["revision"], function(){
var manifest = gulp.src("web/public/assets/javascript-build/rev-manifest.json");

return gulp.src("src/Webmuch/HomeBundle/Resources/views/Index/index.html.twig")
.pipe(debug({title: 'unicorn:'}))
.pipe(revReplace({manifest: manifest,replaceInExtensions: ['.html.twig']}))
.pipe(gulp.dest("web/public/assets/javascript-build"));
});

when i work with .html files, it replaces the script tags correctly, but not in .html.twig files . How to achieve that ?

@BrunoViera
Copy link

BrunoViera commented Oct 3, 2016

Hi! I use this configuration and works for me. Let me know if I can help you

gulp.task("revreplace", ["revision"], function() {
    var manifest = gulp.src("web/public/assets/javascript-build/rev-manifest.json");
    return gulp.src("path/to/my/file/Index/index.html.twig")
        .pipe(debug({title: 'unicorn:'}))
        .pipe(revReplace({manifest: manifest, replaceInExtensions: '.twig'}))
        .pipe(gulp.dest("web/public/assets/javascript-build/"));
});

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