0.0.3 • Published 5 years ago

simplite-loader v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

simplite loader

load simplite template and compile

install
npm install simplite-loader --save-dev
let tpl = import tpl from ('./path/xxx/index.tpl')
domNode.innerHTML = tpl(data)

if you use webpack, you can use it at webpack.config.js:

  module: {
    rules: [
      {
        test: /\.tpl$/,
        exclude: /node_modules/,
        use: {
          loader: 'simplite-loader'
        }
      }
    ]
  }

simplite template

a webpack+es6+simplite+simplite-loader demo