xslt-insert-html-webpack-plugin

1.0.2 • Public • Published

xslt-insert-html-webpack-plugin

A Webpack plugin to insert html tag in head

Getting Started

Install the plugin:

npm i -D xslt-insert-html-webpack-plugin

Examples

var xslData = {
  template: path.join(__dirname, '/xslt/jats2html.xsl'), //输入的xsl文件
  filename: 'jats2html.xsl', // 输出的xsl文件及路径
  path: 'xslt',
  data: { // 要创建节点的参数
    link: {
      href: "../css/journal-web.css",
      rel: "stylesheet",
      type: "text/css"
    },
    script: {
      src: "../js/journal-web.js",
      type: "text/javascript"
    }
  }
}
    var XsltInsertHtmlWebpackPlugin = require('xslt-insert-html-webpack-plugin');
    var path = require('path');
    
    module.exports = {
        context: path.join(__dirname, 'app'),
        plugins: [
            new XsltInsertHtmlWebpackPlugin({
                  file: xslData
            }),
        ]
    }

Package Sidebar

Install

npm i xslt-insert-html-webpack-plugin

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

169 kB

Total Files

17

Last publish

Collaborators

  • yubbaiyu