jqtempl-loader

0.1.4 • Public • Published

JQuery-Template Webpack loader

Install with npm:

npm install --save-dev jqtempl-loader 

Webpack config

module.exports = {
   ...
    module: {
        loaders: [
            { test: /\.html/, loader:  'jqtempl-loader'}
        ]
    },
   ...
};

That make jquery template file with the name *.html. You can make other name for template files and change the test pattern

In Code

    
	var buttonTmpl = require('./tpl/tplButton.html');
	//invoke
	buttonTmpl($, {
    	'data': data
	});
	

Readme

Keywords

none

Package Sidebar

Install

npm i jqtempl-loader

Weekly Downloads

1

Version

0.1.4

License

MIT

Last publish

Collaborators

  • liuhan