{"name":"art-template-loader","version":"0.2.0","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":["webpack-loader","artTemplate","art-template-loader"],"author":{"name":"Byends"},"license":"MIT","dependencies":{"art-template":"^3.1.3","loader-utils":"^0.2.15","lodash":"^4.17.4"},"gitHead":"d13db27c119094f1c9bf8bd1a16a5dfaa25ec938","bugs":{"url":"https://github.com/byends/art-template-loader/issues"},"homepage":"https://github.com/byends/art-template-loader#readme","_id":"art-template-loader@0.2.0","_shasum":"f92c90dd379dfbf66bb96616604fbe20c892a970","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"byends","email":"byends@gmail.com"},"dist":{"shasum":"f92c90dd379dfbf66bb96616604fbe20c892a970","tarball":"http://registry-npm.ywwl.com/art-template-loader/download/art-template-loader-0.2.0.tgz","integrity":"sha512-G0xQ1a6wGJZth/lEiyfbZfBhgNXtJUV7vqije56nOBZZIYMQfrLeXRTSA1NZ7fXWG4FnD1A8Nu39+WFuNOOymg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOZCx9nPvjFu2MPc4uisEM4l7JN7KeQj4Xp7959yV5WwIgaI0MtRyZSQPPJk+1doFI9vkYe9uUS6LkvnEzt8qLpdg="}],"size":2880,"noattachment":false,"key":"/art-template-loader/-/art-template-loader-0.2.0.tgz"},"maintainers":[{"name":"byends","email":"byends@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/art-template-loader-0.2.0.tgz_1489570556484_0.8034836864098907"},"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":1489570556707,"_cnpm_publish_time":1489570556707,"dist-tags":{"latest":"1.4.3"}}