{"name":"@vxna/mini-html-webpack-template","version":"1.0.0","description":"Minimum viable template for mini-html-webpack-plugin","author":{"name":"@vxna"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/vxna/mini-html-webpack-template.git"},"keywords":["webpack","mini-html-webpack-plugin"],"engines":{"node":">= 6.9.0"},"scripts":{"pretest":"npm run lint","test":"npm run test:jest","test:jest":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","posttest":"npm run format","lint":"eslint . --cache --fix","format":"prettier --write **/*.{js,md}","precommit":"lint-staged"},"dependencies":{"common-tags":"^1.8.0"},"devDependencies":{"@webpack-contrib/test-utils":"^0.1.3","css-loader":"^2.1.1","eslint":"^5.15.3","eslint-config-tamia":"^6.0.2","husky":"^1.3.1","jest":"^24.5.0","lint-staged":"^8.1.5","mini-css-extract-plugin":"^0.5.0","mini-html-webpack-plugin":"^0.2.3","prettier":"^1.16.4","semantic-release":"^15.13.3","webpack":"^4.29.6"},"publishConfig":{"access":"public"},"eslintConfig":{"extends":"tamia"},"prettier":{"singleQuote":true,"semi":false},"lint-staged":{"*.js":["eslint --fix","prettier --write","git add"],"*.md":["prettier --write","git add"]},"gitHead":"9c27238479e90fd0ec9b33446e15d5758349016b","bugs":{"url":"https://github.com/vxna/mini-html-webpack-template/issues"},"homepage":"https://github.com/vxna/mini-html-webpack-template#readme","_id":"@vxna/mini-html-webpack-template@1.0.0","_npmVersion":"6.5.0","_nodeVersion":"9.11.2","_npmUser":{"name":"vxna","email":"vxna@tuta.io"},"dist":{"integrity":"sha512-cwlmP9CoWyZYtI33DUKOjS6Hyn3yNrXZQtP+QxPjaRpYNYcbrg+u7EZQZmvB/Mi7qwiDbeTU7UtMT0C5ouRTNA==","shasum":"66ce883b6e6678e1242ab51da04be21d3f1001bc","tarball":"http://registry-npm.ywwl.com/@vxna/mini-html-webpack-template/download/@vxna/mini-html-webpack-template-1.0.0.tgz","fileCount":4,"unpackedSize":9496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnHNvCRA9TVsSAnZWagAArXMP/AwZ7BACpm4I4EY7f2LL\nAI4F8awuqiPdpCaugoiJeuNwzMjLindb3H+qZdTpFEwKr69DrDeYHC/eXVoN\n7dTD9i7ZrQ21dtov4iix4C0hB2aUag8nrn4LQvHK1H1PnY7y9BERcXE7a9XE\nii07QsejcCtowhXHdpcEEeXKD52JNTJ52w5nE2+4ndHM+JvNNUhrit4QLymx\n+5mwkgcOFMSw0ZTpK40c6suj4JbYK/cRZyZqGZvjYeTjJSR6rMD+VKczr3wh\n8aTCzLDsodHIjxuo9+0xCUCIQHsCcmTtk/d9hQHM1BD8L9uu67PTdhQC9NjA\n7YNQlW8hWSYV7uz/v9UN4pX/TYU52+RLZtMTAWJB6x2uSZ+rUNm7tWSbOfXO\nZNAFrVWOCgf0RmOh6InPUv1gnR/p0yRPc7pAj1R7ct0+8iT4+9pq3XHocXon\nbKe25kFK/wmYllb+j1XmsLwys1+xzw37VwR1874s1iCBLJKZmYeLCTnsaBMF\nSlhemogY6qIrGNHAipqfz2Ke9VvyoTX2wf6LG2PWX/A5K+8JwLA0YitodOAB\nf4/mbBRNRTQH69KEG9Y5JX6O7Rwe/ZyuhuPQ8JcvxT1ZIZNo1sPiK/VRopwl\n2ASwc50OpT1nF1XLYLCIxd+6WCx58oUKQ3TEOCQTHmWCLtkjlLEpK6b/R+ju\ncSon\r\n=wq1F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZOIqfwe7qIFtHj2/LiNg1laZgDnZdMxGgRqEXTMzKIgIgUNqTsKbbSS2Ounowx22YapJwHWAtvG5ejzzGkGr3uE8="}],"size":3519,"noattachment":false,"key":"/@vxna/mini-html-webpack-template/-/@vxna/mini-html-webpack-template-1.0.0.tgz"},"maintainers":[{"name":"vxna","email":"vxna@tuta.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mini-html-webpack-template_1.0.0_1553757038749_0.9547224656233464"},"_hasShrinkwrap":false,"readme":"# @vxna/mini-html-webpack-template\r\n\r\n[![Build Status](https://travis-ci.com/vxna/mini-html-webpack-template.svg)](https://travis-ci.com/vxna/mini-html-webpack-template) [![npm](https://img.shields.io/npm/v/@vxna/mini-html-webpack-template.svg)](https://www.npmjs.com/package/@vxna/mini-html-webpack-template)\r\n\r\nTemplate for [mini-html-webpack-plugin](https://github.com/bebraw/mini-html-webpack-plugin) that extends default features with useful subset of options\r\n\r\n## Warning\r\n\r\nIt does not work with [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)\r\n\r\n## Common usage\r\n\r\n**webpack.config.js**\r\n\r\n```js\r\nconst MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin')\r\n\r\nmodule.exports = {\r\n  plugins: [\r\n    new MiniHtmlWebpackPlugin({\r\n      context: {\r\n        title: 'common-usage',\r\n        favicon: 'https://assets-cdn.github.com/favicon.ico',\r\n        container: 'root',\r\n        trimWhitespace: true\r\n      },\r\n      template: require('@vxna/mini-html-webpack-template')\r\n    })\r\n  ]\r\n}\r\n```\r\n\r\n## Common options\r\n\r\n| Name                 | Type        | Default        | Description                        |\r\n| -------------------- | ----------- | -------------- | ---------------------------------- |\r\n| **`lang`**           | `{String}`  | `undefined`    | Set document language              |\r\n| **`title`**          | `{String}`  | `'sample-app'` | Set document title                 |\r\n| **`favicon`**        | `{String}`  | `undefined`    | Set document favicon               |\r\n| **`container`**      | `{String}`  | `undefined`    | Set application mount point        |\r\n| **`trimWhitespace`** | `{Boolean}` | `undefined`    | Safe document whitespace reduction |\r\n\r\n## Extended usage\r\n\r\n**webpack.config.js**\r\n\r\n```js\r\nconst MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin')\r\n\r\nmodule.exports = {\r\n  plugins: [\r\n    new MiniHtmlWebpackPlugin({\r\n      context: {\r\n        title: 'extended-usage',\r\n        head: {\r\n          meta: [\r\n            {\r\n              name: 'description',\r\n              content: 'mini-html-webpack-template'\r\n            }\r\n          ]\r\n        },\r\n        body: {\r\n          raw: '<div id=\"root\"></div>'\r\n        },\r\n        attrs: {\r\n          js: {\r\n            async: '',\r\n            type: 'text/javascript'\r\n          }\r\n        }\r\n      },\r\n      template: require('@vxna/mini-html-webpack-template')\r\n    })\r\n  ]\r\n}\r\n```\r\n\r\n## Extended options\r\n\r\n| Name               | Type              | Default     | Description                               |\r\n| ------------------ | ----------------- | ----------- | ----------------------------------------- |\r\n| **`head.meta`**    | `{Array}`         | `undefined` | Array of objects with key + value pairs   |\r\n| **`head.links`**   | `{Array}`         | `undefined` | Array of objects with key + value pairs   |\r\n| **`head.scripts`** | `{Array}`         | `undefined` | Array of objects with key + value pairs   |\r\n| **`head.raw`**     | `{Array\\|String}` | `undefined` | Generates raw document markup             |\r\n| **`body.scripts`** | `{Array}`         | `undefined` | Array of objects with key + value pairs   |\r\n| **`body.raw`**     | `{Array\\|String}` | `undefined` | Generates raw document markup             |\r\n| **`attrs.js`**     | `{Object}`        | `undefined` | Applies html attributes to webpack output |\r\n| **`attrs.css`**    | `{Object}`        | `undefined` | Applies html attributes to webpack output |\r\n\r\n## Advanced minification\r\n\r\nFor custom needs [html-minifier](https://github.com/kangax/html-minifier) middleware and all of it's [options](https://github.com/kangax/html-minifier#options-quick-reference) could be used\r\n\r\n**webpack.config.js**\r\n\r\n```js\r\nconst { minify } = require('html-minifier')\r\nconst MiniHtmlWebpackPlugin = require('mini-html-webpack-plugin')\r\n\r\nmodule.exports = {\r\n  plugins: [\r\n    new MiniHtmlWebpackPlugin({\r\n      context: {\r\n        title: 'advanced-minification'\r\n      },\r\n      template: ctx =>\r\n        minify(require('@vxna/mini-html-webpack-template')(ctx), {\r\n          collapseWhitespace: true,\r\n          minifyCSS: true,\r\n          minifyJS: true\r\n        })\r\n    })\r\n  ]\r\n}\r\n```\r\n\r\n## Complex security features\r\n\r\n[SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) is out of scope of this project and it's recommended to use [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) with it's ecosystem tools.\r\n\r\n## Inspired by\r\n\r\n[html-webpack-template](https://github.com/jaketrent/html-webpack-template)\r\n\r\n## License\r\n\r\nMIT (http://www.opensource.org/licenses/mit-license.php)\r\n","publish_time":1553757038900,"_cnpm_publish_time":1553757038900,"dist-tags":{"latest":"2.0.0"}}