{
	"name": "@endiliey/static-site-generator-webpack-plugin",
	"versions": {
		"3.4.2": {
			"name": "@endiliey/static-site-generator-webpack-plugin",
			"version": "3.4.2",
			"description": "Minimal, unopinionated static site generator powered by webpack",
			"main": "index.js",
			"scripts": {
				"test": "jest test",
				"coverage": "jest --coverage",
				"coveralls": "jest --coverage --coverageReporters=text-lcov | coveralls"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/endiliey/static-site-generator-webpack-plugin.git"
			},
			"author": {
				"name": "Mark Dalgleish"
			},
			"license": "MIT",
			"bugs": {
				"url": "https://github.com/endiliey/static-site-generator-webpack-plugin/issues"
			},
			"homepage": "https://github.com/endiliey/static-site-generator-webpack-plugin",
			"dependencies": {
				"bluebird": "^3.7.1",
				"cheerio": "^0.22.0",
				"eval": "^0.1.4",
				"url": "^0.11.0",
				"webpack-sources": "^1.4.3"
			},
			"devDependencies": {
				"@babel/core": "^7.6.4",
				"@babel/preset-env": "^7.6.3",
				"async": "^2.0.1",
				"babel-loader": "^8.0.0",
				"compression-webpack-plugin": "^3.0.0",
				"coveralls": "^3.0.2",
				"dir-compare": "^1.4.0",
				"ejs": "^2.3.4",
				"es6-promisify": "^6.0.0",
				"glob": "^7.0.3",
				"jest": "^24.9.0",
				"node-dir": "^0.1.17",
				"rimraf": "^2.4.4",
				"webpack": "^4.41.2",
				"webpack-stats-plugin": "^0.3.0"
			},
			"gitHead": "29007846893adb31662c852d3ef970ad0ed08ffb",
			"_id": "@endiliey/static-site-generator-webpack-plugin@3.4.2",
			"_nodeVersion": "8.11.3",
			"_npmVersion": "6.9.0",
			"dist": {
				"integrity": "sha512-tHJUKKjoQ2LaBZEqqHdYq+erbRZwhXAZw1ZVsdBZSbISBuQqJx/PWY+RKnaTcN3LbBkITSGqFB/g64MDZZJAiw==",
				"shasum": "8b05fbf38f27ffc13612c176cc27e8479ac66826",
				"tarball": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-3.4.2.tgz",
				"fileCount": 18,
				"unpackedSize": 110058,
				"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtb0iCRA9TVsSAnZWagAATEAP/20yNo60GS5lNAVOJ8Py\nLqyxa9yiZRCkog4eTq/H8ldkCerib9rQQ/XW/SvXroWogH0NqeUAd4XdG7GJ\np4SX+bDbUh3uxmcyYAX7sIt3v8fhf7MZHjkZcklwtdRRLlTxmZhC9XQUiJTi\nvd4VRHJ/nQAE45ConeYXz3MBlbhdF7U+K6SFg/2WOSQcDJQk9zsIuz4CXC3E\nl9ROgBnFHlkUn9578he8mdZi0+TJGXlPcX8FNV5JM+RMQ34LhM388VtUJZDY\ncL3fu6vF+RCaXD/2ZBrhAuXPPNffSDnk3FvoXlDeGa+Ym+g8aeVCIoMxKRSZ\nsNUoESzMulyydQmw2mPamEe/0MqHlP12w/nFRjigsGrRhNFhJcrXeCS1mlGt\nsaQ7F+h5TagdajZQ1rYj6GuV25EDZzUsV2sxF1iRk7pp96Ild0J4dGCX/uHj\ntjv/9/E2jMXoe6a6RbFCWsR8OsBu27jNU14ep44GHHQCaenrnHOjJwwiI4eU\nQnxx2ZeG2Ii6k9C8FeUaxH9TXLt5b4taKu51kLUO8XesSn+8pd02YFDAMsN+\n/mPucckiZaKuBjKWxvB2/ZuDOi7GUKmh9q8HoBu83/Xzz5+htaWAKXku8H5G\nE+APlOh6/lKWiItblt5pkNengjIymoOYIfGMyfrGKAeLnQEZVXoYvMYAodSA\n3LQE\r\n=YbS4\r\n-----END PGP SIGNATURE-----\r\n"
			},
			"maintainers": [
				{
					"name": "endiliey",
					"email": "endiliey@gmail.com"
				}
			],
			"_npmUser": {
				"name": "endiliey",
				"email": "endiliey@gmail.com"
			},
			"directories": {},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/static-site-generator-webpack-plugin_3.4.2_1572191522403_0.8434043877243398"
			},
			"_hasShrinkwrap": false,
			"contributors": []
		},
		"4.0.0": {
			"name": "@endiliey/static-site-generator-webpack-plugin",
			"version": "4.0.0",
			"description": "Minimal, unopinionated static site generator powered by webpack",
			"main": "index.js",
			"scripts": {
				"test": "jest test",
				"coverage": "jest --coverage",
				"coveralls": "jest --coverage --coverageReporters=text-lcov | coveralls"
			},
			"repository": {
				"type": "git",
				"url": "git+https://github.com/endiliey/static-site-generator-webpack-plugin.git"
			},
			"author": {
				"name": "Mark Dalgleish"
			},
			"license": "MIT",
			"bugs": {
				"url": "https://github.com/endiliey/static-site-generator-webpack-plugin/issues"
			},
			"homepage": "https://github.com/endiliey/static-site-generator-webpack-plugin",
			"dependencies": {
				"bluebird": "^3.7.1",
				"cheerio": "^0.22.0",
				"eval": "^0.1.4",
				"url": "^0.11.0",
				"webpack-sources": "^1.4.3"
			},
			"devDependencies": {
				"@babel/core": "^7.6.4",
				"@babel/preset-env": "^7.6.3",
				"async": "^2.0.1",
				"babel-loader": "^8.0.0",
				"compression-webpack-plugin": "^3.0.0",
				"coveralls": "^3.0.2",
				"dir-compare": "^1.4.0",
				"ejs": "^2.3.4",
				"es6-promisify": "^6.0.0",
				"glob": "^7.0.3",
				"jest": "^24.9.0",
				"node-dir": "^0.1.17",
				"rimraf": "^2.4.4",
				"webpack": "^4.41.2",
				"webpack-stats-plugin": "^0.3.0"
			},
			"gitHead": "cd502af2291b950d67fb247175046961b3356c1f",
			"_id": "@endiliey/static-site-generator-webpack-plugin@4.0.0",
			"_nodeVersion": "8.11.3",
			"_npmVersion": "6.9.0",
			"dist": {
				"integrity": "sha512-3MBqYCs30qk1OBRC697NqhGouYbs71D1B8hrk/AFJC6GwF2QaJOQZtA1JYAaGSe650sZ8r5ppRTtCRXepDWlng==",
				"shasum": "94bfe58fd83aeda355de797fcb5112adaca3a6b1",
				"tarball": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz",
				"fileCount": 18,
				"unpackedSize": 110058,
				"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdtb2BCRA9TVsSAnZWagAAYlwP/3j02coA4UrA6ZXqr5vK\n5V4NrBL/d++FRjzRFmeSTrDAs4p1npIdaEQDNPY0VscNFZx1W8lrr3gb5QAq\nks//7BzzsosbsJjdC7GlXBJvpsviKwg+YmUB724HvjPatdwmx7vQ+WpDTyuS\nS1PsX0x4ZMCBFlQfnd/QBMyzpJw9s+SiYgknOmj+XjhKNB1PauvIekjM72Qh\na3v5ZUNVA3kwQM2E+cl0pcj0wIdN9PVMS9SAwmgtKOSR3Stg+69riND9C8MN\n/QgFqR91lBSZeZGOiZHoMKMl2J/TkRst2O25SJe0qYeU9haidxO82j7s+KrI\n3aqfQFcecuy1nZd715wwYI1gApbRP+WtpXsK8Pu+Mr8cSCQh6Ue+hgCgYwob\nCh/ui+gSk/PsGRPag4BA9YWu+Y8OliXSrUxFz9ONW3aAjH+88Fe15jbsqyP/\njEBh4v0RBpwQJl9sC3nV92SM4CU3W0vCv5DkaLGOVqCFxi2qTiCuPX53H6hz\n+V7pdELGJ6FUztw7yPAaNuJzerdvMmQn9SASy3aFjEbwy2uB/d+CzNzmtuGJ\n6C/seKyipd1D0ynjlX4f8kED3fMND3wqE6/VfvNDmmn+RBJ5FfHRC9ZXoGKx\nTCFQAGZX9NLX5YG46cxAv/YtWNCQAPx0MddoM1Vg9EFvXV0jDw4p7Qsen2iy\nTSjE\r\n=sv01\r\n-----END PGP SIGNATURE-----\r\n"
			},
			"maintainers": [
				{
					"name": "endiliey",
					"email": "endiliey@gmail.com"
				}
			],
			"_npmUser": {
				"name": "endiliey",
				"email": "endiliey@gmail.com"
			},
			"directories": {},
			"_npmOperationalInternal": {
				"host": "s3://npm-registry-packages",
				"tmp": "tmp/static-site-generator-webpack-plugin_4.0.0_1572191616962_0.5216386431836733"
			},
			"_hasShrinkwrap": false,
			"contributors": []
		}
	},
	"time": {
		"created": "2019-10-27T15:52:02.179Z",
		"3.4.2": "2019-10-27T15:52:02.589Z",
		"modified": "2019-10-27T15:53:41.057Z",
		"4.0.0": "2019-10-27T15:53:37.060Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "4.0.0"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"ec46dacbf6360d21fc6c7f56840e383f\"",
			"fetched": 1600679285813
		}
	},
	"_distfiles": {
		"static-site-generator-webpack-plugin-3.4.2.tgz": {
			"url": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-3.4.2.tgz",
			"sha": "8b05fbf38f27ffc13612c176cc27e8479ac66826",
			"registry": "npmjs"
		},
		"static-site-generator-webpack-plugin-4.0.0.tgz": {
			"url": "https://registry.npmjs.org/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz",
			"sha": "94bfe58fd83aeda355de797fcb5112adaca3a6b1",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"static-site-generator-webpack-plugin-4.0.0.tgz": {
			"shasum": "94bfe58fd83aeda355de797fcb5112adaca3a6b1"
		}
	},
	"_rev": "2-cd457e3007570f29",
	"_id": "@endiliey/static-site-generator-webpack-plugin",
	"readme": "[![Build Status](https://img.shields.io/travis/endiliey/static-site-generator-webpack-plugin/master.svg?style=flat-square)](http://travis-ci.org/endiliey/static-site-generator-webpack-plugin) [![Coverage Status](https://img.shields.io/coveralls/endiliey/static-site-generator-webpack-plugin/master.svg?style=flat-square)](https://coveralls.io/r/endiliey/static-site-generator-webpack-plugin) [![Dependency Status](https://img.shields.io/david/endiliey/static-site-generator-webpack-plugin.svg?style=flat-square)](https://david-dm.org/endiliey/static-site-generator-webpack-plugin) [![npm](https://img.shields.io/npm/v/static-site-generator-webpack-plugin.svg?style=flat-square)](https://npmjs.org/package/static-site-generator-webpack-plugin)\n\n# static site generator webpack plugin\n\nMinimal, unopinionated static site generator powered by webpack.\n\nBring the world of server rendering to your static build process. Either provide an array of paths to be rendered, or *crawl your site automatically*, and a matching set of `index.html` files will be rendered in your output directory by executing your own custom, webpack-compiled render function.\n\nThis plugin works particularly well with universal libraries like [React](https://github.com/facebook/react) and [React Router](https://github.com/rackt/react-router) since it allows you to pre-render your routes at build time, rather than requiring a Node server in production.\n\n## Install\n\n```bash\n$ npm install --save-dev static-site-generator-webpack-plugin\n```\n\n## Usage\n\nEnsure you have webpack installed, e.g. `npm install -g webpack`\n\n### webpack.config.js\n\n```js\nconst StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');\n\nmodule.exports = {\n\n  entry: './index.js',\n\n  output: {\n    filename: 'index.js',\n    path: 'dist',\n    /* IMPORTANT!\n     * You must compile to UMD or CommonJS\n     * so it can be required in a Node context: */\n    libraryTarget: 'umd'\n  },\n\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      paths: [\n        '/hello/',\n        '/world/'\n      ],\n      locals: {\n        // Properties here are merged into `locals`\n        // passed to the exported render function\n        greet: 'Hello'\n      }\n    })\n  ]\n\n};\n```\n\n### index.js\n\nSync rendering:\n\n```js\nmodule.exports = function render(locals) {\n  return '<html>' + locals.greet + ' from ' + locals.path + '</html>';\n};\n```\n\nAsync rendering via callbacks:\n\n```js\nmodule.exports = function render(locals, callback) {\n  callback(null, '<html>' + locals.greet + ' from ' + locals.path + '</html>');\n};\n```\n\nAsync rendering via promises:\n\n```js\nmodule.exports = function render(locals) {\n  return Promise.resolve('<html>' + locals.greet + ' from ' + locals.path + '</html>');\n};\n```\n\n## Multi rendering\n\nIf you need to generate multiple files per render, or you need to alter the path, you can return an object instead of a string, where each key is the path, and the value is the file contents:\n\n```js\nmodule.exports = function render() {\n  return {\n    '/': '<html>Home</html>',\n    '/hello': '<html>Hello</html>',\n    '/world': '<html>World</html>'\n  };\n};\n```\n\nNote that this will still be executed for each entry in your `paths` array in your plugin config.\n\n## Default locals\n\n```js\n// The path currently being rendered:\nlocals.path;\n\n// An object containing all assets:\nlocals.assets;\n\n// Advanced: Webpack's stats object:\nlocals.webpackStats;\n```\n\nAny additional locals provided in your config are also available.\n\n## Crawl mode\n\nRather than manually providing a list of paths, you can use the `crawl` option to automatically crawl your site. This will follow all relative links and iframes, executing your render function for each:\n\n```js\nmodule.exports = {\n\n  ...\n\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      crawl: true\n    })\n  ]\n};\n```\n\nNote that this can be used in conjunction with the `paths` option to allow multiple crawler entry points:\n\n```js\nmodule.exports = {\n\n  ...\n\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      crawl: true,\n      paths: [\n        '/',\n        '/uncrawlable-page/'\n      ]\n    })\n  ]\n};\n```\n\n## Custom file names\n\nBy providing paths that end in `.html`, you can generate custom file names other than the default `index.html`. Please note that this may break compatibility with your router, if you're using one.\n\n```js\nmodule.exports = {\n\n  ...\n\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      paths: [\n        '/index.html',\n        '/news.html',\n        '/about.html'\n      ]\n    })\n  ]\n};\n```\n\n## Globals\n\nIf required, you can provide an object that will exist in the global scope when executing your render function. This is particularly useful if certain libraries or tooling you're using assumes a browser environment.\n\nFor example, when using Webpack's `require.ensure`, which assumes that `window` exists:\n\n```js\nmodule.exports = {\n  ...,\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      globals: {\n        window: {}\n      }\n    })\n  ]\n}\n```\n\n## Asset support\n\ntemplate.ejs\n```ejs\n<% css.forEach(function(file){ %>\n<link href=\"<%- file %>\" rel=\"stylesheet\">\n<% }); %>\n\n<% js.forEach(function(file){ %>\n<script src=\"<%- file %>\" async></script>\n<% }); %>\n```\n\nindex.js\n```js\nif (typeof global.document !== 'undefined') {\n  const rootEl = global.document.getElementById('outlay');\n  React.render(\n    <App />,\n    rootEl,\n  );\n}\n\nexport default (data) => {\n  const assets = Object.keys(data.webpackStats.compilation.assets);\n  const css = assets.filter(value => value.match(/\\.css$/));\n  const js = assets.filter(value => value.match(/\\.js$/));\n  return template({ css, js, ...data});\n}\n```\n\n## Specifying entry\n\nThis plugin defaults to the first chunk found. While this should work in most cases, you can specify the entry name if needed:\n\n```js\nmodule.exports = {\n  ...,\n  plugins: [\n    new StaticSiteGeneratorPlugin({\n      entry: 'main'\n    })\n  ]\n}\n```\n\n## Compression support\n\nGenerated files can be compressed with [compression-webpack-plugin](https://github.com/webpack/compression-webpack-plugin), but first ensure that this plugin appears before compression-webpack-plugin in your plugins array:\n\n```js\nconst StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');\nconst CompressionPlugin = require('compression-webpack-plugin');\n\nmodule.exports = {\n  ...\n\n  plugins: [\n    new StaticSiteGeneratorPlugin(...),\n    new CompressionPlugin(...)\n  ]\n};\n```\n\n## Related projects\n\n- [react-router-to-array](https://github.com/alansouzati/react-router-to-array) - useful for avoiding hardcoded lists of routes to render\n- [gatsby](https://github.com/gatsbyjs/gatsby) - opinionated static site generator built on top of this plugin\n\n## License\n\n[MIT License](http://markdalgleish.mit-license.org)"
}