{"_id":"@abcfe/webpack-manifest","_rev":"2-b9509514091d7e25ba78188981fa51e7","name":"@abcfe/webpack-manifest","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@abcfe/webpack-manifest","description":"webpack plugin for generating asset manifests","main":"index.js","version":"1.0.0","author":{"name":"tony","email":"tony@abc360.com"},"dependencies":{"fs-extra":"^0.30.0","lodash":">=3.5 <5"},"devDependencies":{"codecov":"^2.2.0","css-loader":"^0.9.1","extract-text-webpack-plugin":"^0.5.0","file-loader":"^0.9.0","jasmine":"^2.2.1","memory-fs":"^0.2.0","nyc":"^10.3.2","rimraf":"^2.6.1","style-loader":"^0.8.3","webpack":"^1.7.3"},"gitHead":"c7b4cc3911a9d0f8d96bf11051178e38f8a146e5","_id":"@abcfe/webpack-manifest@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.4.0","_npmUser":{"name":"abcfe","email":"abc360_fe@163.com"},"dist":{"integrity":"sha512-ekRGdERaRUlCzJ1KKwKD/b3ZzF8LRQrinVo5eHOIU6TD0lGePzJWrQN1zfijDx4g+kdtFYd2/YLHsTigxDwuDA==","shasum":"9560b5259710ed2e12da39b7b790d80bafae7184","tarball":"https://registry.npmjs.org/@abcfe/webpack-manifest/-/webpack-manifest-1.0.0.tgz","fileCount":4,"unpackedSize":8433,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOpQ/P/fuPXIyFx4hsQbQ3rbY5IfEU8IqTr5ISK7tz/AiEAuGcHbebm2tV2bM7dH+YOJb5jO7yNoiVPA5AcCGLeKhA="}]},"maintainers":[{"name":"abcfe","email":"abc360_fe@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-manifest_1.0.0_1519892654406_0.02551569205862525"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-01T08:24:14.354Z","1.0.0":"2018-03-01T08:24:14.479Z","modified":"2022-04-04T10:57:57.835Z"},"maintainers":[{"name":"abcfe","email":"abc360_fe@163.com"}],"description":"webpack plugin for generating asset manifests","author":{"name":"tony","email":"tony@abc360.com"},"readme":"# Webpack Manifest Plugin \n\nWebpack plugin for generating an asset manifest.\n\n## Install\n\n```bash\nnpm install --save-dev abc-webpack-manifest\n```\n\n## Usage\n\nIn your `webpack.config.js`\n\n```javascript\nvar ManifestPlugin = require('abc-webpack-manifest');\n\nmodule.exports = {\n    // ...\n    plugins: [\n      new ManifestPlugin()\n    ]\n};\n```\n\nThis will generate a `manifest.json` file in your root output directory with a mapping of all source file names to their corresponding output file, for example:\n\n```json\n{\n  \"mods/alpha.js\": \"mods/alpha.1234567890.js\",\n  \"mods/omega.js\": \"mods/omega.0987654321.js\"\n}\n```\n\n\n## Configuration\n\nA manifest is configurable using constructor options:\n\n```javascript\nnew ManifestPlugin({\n  fileName: 'my-manifest.json',\n  basePath: '/app/'\n  seed: {\n    name: 'My Manifest'\n  }\n})\n```\n\n\n## Options:\n\n### `fileName`\n\nType: `String`<br>\nDefault: `manifest.json`\n\nThe manifest filename in your output directory.\n\n\n### `basePath`\n\nType: `String`\n\nA path prefix for all file references. Useful for including your output path in the manifest.\n\n\n### `publicPath`\n\nType: `String`\n\nA path prefix used only on output files, similar to Webpack's  [output.publicPath](https://github.com/webpack/docs/wiki/configuration#outputpublicpath). Ignored if `basePath` was also provided.\n\n\n### `stripSrc`\n\nType: `String`, `RegExp`\n\nRemoves unwanted strings from source filenames.\n\n\n### `writeToFileEmit`\n\nType: `Boolean`<br>\nDefault: `false`\n\nIf set to `true` will emit to build folder and memory in combination with `webpack-dev-server`\n\n\n### `seed`\n\nType: `Object`<br>\nDefault: `{}`\n\nA cache of key/value pairs to used to seed the manifest. This may include a set of [custom key/value](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json) pairs to include in your manifest, or may be used to combine manifests across compilations in [multi-compiler mode](https://github.com/webpack/webpack/tree/master/examples/multi-compiler). To combine manifests, pass a shared seed object to each compiler's ManifestPlugin instance.\n\n### `filter`\n\nType: `function`\n\nFilter out files. [more details](#hooks-options)\n\n\n### `map`\n\nType: `function`\n\nModify files details before the manifest is created. [more details](#hooks-options)\n\n\n### `reduce`\n\nType: `function`<br>\nDefault: `(manifest, {name, path}) => ({...manifest, [name]: path})`\n\nCreate the manifest. It can return anything as long as it's serialisable by `JSON.stringify`. Use the `seed` options to populate `manifest`. [more details](#hooks-options)\n\n\n### `extensions`\nDefault: `['.js', '.css']`\n\n增加了后缀名的过滤\n\n## Hooks Options\n\n`filter`, `map`, `reduce` takes as an input an Object with the following properties:\n\n### `path`\n\nType: `String`\n\n\n### `chunk`\n\nType: [`Chunk`](https://github.com/webpack/webpack/blob/master/lib/Chunk.js)\n\n\n### `name`\n\nType: `String`, `null`\n\n\n### `isChunk`\n\nType: `Boolean`\n\n\n### `isInitial`\n\nType: `Boolean`\n\nIs required to run you app. Cannot be `true` if `isChunk` is `false`.\n\n\n### `isAsset`\n\nType: `Boolean`\n\n\n### `isModuleAsset`\n\nType: `Boolean`\n\nIs required by a module. Cannot be `true` if `isAsset` is `false`.\n\n\n","readmeFilename":"README.md"}