{"name":"art-template-loader","version":"0.1.4","description":"artTemplate loader for webpack","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/byends/art-template-loader.git"},"keywords":["artTemplate","loader","webpack"],"author":{"name":"Byends"},"license":"MIT","dependencies":{"art-template":"^3.0.3","loader-utils":"^0.2.15","lodash":"^4.13.1"},"gitHead":"1bf02fb0803d02fc665d764b1ffd2b3767e8d607","bugs":{"url":"https://github.com/byends/art-template-loader/issues"},"homepage":"https://github.com/byends/art-template-loader#readme","_id":"art-template-loader@0.1.4","_shasum":"d46863d465c15123c752149badd7a7e0b1909baa","_from":".","_npmVersion":"2.15.8","_nodeVersion":"4.4.7","_npmUser":{"name":"byends","email":"byends@gmail.com"},"dist":{"shasum":"d46863d465c15123c752149badd7a7e0b1909baa","tarball":"http://registry-npm.ywwl.com/art-template-loader/download/art-template-loader-0.1.4.tgz","integrity":"sha512-X/QcizVMedKUVY2iVac8A60cIVnpV7CNXd6/g65PdPZnofunfaDJ2FJ76RjVGdd4A3HqILnJ3/AEtg+pHR6j/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvLODsKFoioS0qIP7L1GF2ls0M16QotkH0itgvDORmVgIgGb/9gkgmGDUlQzxYHVBSgLRSfGnyNRFAzdnMfdiCyMs="}],"size":2086,"noattachment":false,"key":"/art-template-loader/-/art-template-loader-0.1.4.tgz"},"maintainers":[{"name":"byends","email":"byends@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/art-template-loader-0.1.4.tgz_1471483863599_0.20401183213107288"},"directories":{},"readme":"# art-template-loader\n\n[![NPM Version](https://img.shields.io/npm/v/art-template-loader.svg)](https://npmjs.org/package/art-template-loader)\n[![Node.js Version](https://img.shields.io/node/v/art-template-loader.svg)](http://nodejs.org/download/)\n\n[art-template](https://github.com/aui/art-template) loader for webpack\n\n## Install\n\n```shell\nnpm install art-template\nnpm install art-template-loader --save-dev\n```\n\n## Usage\n\nBy default every local `<img src=\"image.png\">` is required (`require('./image.png')`). You may need to specify loaders for images in your configuration (recommended `file-loader` or `url-loader`).\n\nYou can specify which attribute combination should be processed by this loader via the query parameter `htmlResourceRules`. (Default: `htmlResourceRules=[/\\bsrc=\"([^\"]*)\"/]`)\n\nTo completely disable tag-attribute processing (for instance, if you're handling image loading on the client side) you can pass in `htmlResourceRules=false`.\n\n## Examples\n\n```js\nmodule.exports = {\n    // ...\n    module: {\n        rules: [{\n            test: /\\.jpg$/,\n            loader: \"file-loader\"\n        }, {\n            test: /\\.png$/,\n            loader: \"url-loader?mimetype=image/png\"\n        }, {\n            test: /\\.art$/,\n            loader: \"art-template-loader\",\n            options: {\n                // art-template options (if necessary)\n                // @see https://github.com/aui/art-template\n            }\n        }]\n    },\n    // ...\n}\n```\n\n```html\n<% include('./header.art') %>\n\n<% if (user) { %>\n  <h2><%= user.name %></h2>\n  <p><img src=\"./octocat.png\" alt=\"octocat\"></p>\n<% } %>\n\n<% include('./footer.art') %>\n```\n\n[More](https://github.com/aui/art-template-loader/tree/master/example)\n\n## 'Root-relative' URLs\n\nFor urls that start with a `/`, the default behavior is to not translate them.\nIf a `htmlResourceRoot` query parameter is set, however, it will be prepended to the url\nand then translated.\n\nWith the same configuration as above:\n\n``` html\n<!-- file.art -->\n<img src=\"/image.jpg\">\n```\n\n```js\nrequire(\"html-loader!./file.art\");\n\n// => '<img  src=\"/image.jpg\">'\n```\n\n```js\nrequire(\"html-loader?htmlResourceRoot=.!./file.art\");\n\n// => '<img  src=\"http://cdn.example.com/49eba9f/a992ca.jpg\">'\n```\n\n## Filter\n\nAdd filter:\n\n```js\nvar runtime = require('art-template/lib/runtime');\nruntime.dateFormat = function(){ /*[...]*/ };\nvar html = require('./index.art');\n```\n\nUse filter:\n\n```html\n{{time | dateFormat 'yyyy-MM-dd hh:mm:ss'}}\n```\n\n## Debug\n\nSupport `SourceMap`:\n\n```shell\nwebpack --debug\n```\n\n![debug](https://cloud.githubusercontent.com/assets/1791748/25306107/55b2afba-27b9-11e7-903b-4700ac47a4d3.png)\n\n## Options\n\nYou can pass [art-template options](https://github.com/aui/art-template)\nusing standard webpack [loader options](https://webpack.js.org/configuration/module/#useentry).\n","publish_time":1471483865455,"_cnpm_publish_time":1471483865455,"dist-tags":{"latest":"1.4.3"}}