D
D
Dmitry2016-09-26 10:45:36
Pug
Dmitry, 2016-09-26 10:45:36

gulp-inject not working in pug/jade?

Actually, in .html templates it works fine, but with pug it refuses.
pug comments:

//- build:css
  //- vendor:css
  //- endinject
  //- inject:css
  //- endinject
//- endbuild

config for html:
// html task options
html: {
    // build:html:inject options
    injectCss: {
        options: {
            relative: true,
            name: 'build',
            starttag: '//- build:css',
            endtag: '//- endbuild',
            removeTags: true
        }
    },
    injectJs: {
        options: {
            relative: true,
            name: 'build',
            starttag: '//- build:js',
            endtag: '//- endbuild',
            removeTags: true
        }
    }
},

config for pug:
// pug task options
pug: {
    // inject task options
    injectCss: {
        vendorOptions: {
            relative: true,
            name: 'vendor',
            starttag: '//- vendor:css',
            endtag: '//- endinject',
        },
        mainOptions: {
            relative: true,
        }
    },
    injectJs: {
        options: {
            relative: true,
            starttag: '//- inject:js',
            endtag: '//- endinject',
        }
    }
},

I can't figure out what the problem is.
The full environment is available at the link: https://github.com/gsup1/gulp-workflow
Ps This environment was taken as a basis https://github.com/mohamdio/gulp-workflow I'm just trying to modify it for myself, instead of the nunjucks template engine i am trying to use pug.
Thanks in advance for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Veselov, 2017-04-15
@yaxromo5oma

Did this recently
https://github.com/GoodNew5/src

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question