How to use gulp-xml-transformer - 1 common examples

To help you get started, we’ve selected a few gulp-xml-transformer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RadonApp / radon-extension-firefox / src / tasks / hybrid / manifest.js View on Github external
// Read package manifest
        let manifest = {
            hasEmbeddedWebExtension: true,

            permissions: {
                multiprocess: false
            },

            ...JSON.parse(Filesystem.readFileSync(Path.join(
                destinationPath, 'package.json'
            )))
        };

        // Create install manifest
        return Gulp.src(sourcePath)
            .pipe(GulpXmlTransformer([
                {path: '//em:id', text: manifest.id},
                {path: '//em:version', text: Extension.getVersion(environment)},

                {path: '//em:name', text: Extension.manifest.title},
                {path: '//em:description', text: Extension.manifest.description},
                {path: '//em:creator', text: manifest.author},

                {path: '//em:multiprocessCompatible', text: manifest.permissions.multiprocess},
                {path: '//em:hasEmbeddedWebExtension', text: manifest.hasEmbeddedWebExtension},

                // Firefox
                {
                    path: (
                        '//em:targetApplication' +
                        '/rdf:Description[em:id = \'{ec8030f7-c20a-464f-9b0e-13a3a9e97384}\']' +
                        '/em:minVersion'

gulp-xml-transformer

Gulp plugin for transforming xml content

MIT
Latest version published 7 months ago

Package Health Score

57 / 100
Full package analysis

Popular gulp-xml-transformer functions