{"bugs":{"url":"https://github.com/ampproject/rollup-plugin-closure-compiler/issues"},"dist":{"shasum":"f6c7c7fdef9b82030153f96b81ce34fffba537db","tarball":"https://registry.npmjs.org/@ampproject/rollup-plugin-closure-compiler/-/rollup-plugin-closure-compiler-0.9.0-beta.3.tgz","fileCount":6,"integrity":"sha512-tJvM/N/69VoVW9/qrmkVpwYfNkNrf4Tcx1hwfXugjjy0kypfHHrM7/0NIqfCseFMXKanmYMktWtzGKiQvcsedQ==","signatures":[{"sig":"MEUCIQDjO/UN1gFdUoL2kapYXSvs/PeoT9fJI9h0lnmfX+SA7AIgSsJzypwcQFxuAJ8d2QlkR8gQvplrM9hM6g3NofOHPgo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6H+DCRA9TVsSAnZWagAAwyQP+gKdKo1uQ2bc4Zmw1eU7\n8qAkY9NfGqYVd9+haeiQ/lRuefjDAnVS2VWusSdFNXNpXpon86SnyBBRDU2K\nJXlRXyUatoE2HKwAbhn9O3Kqrb1MCz32fRAF1CS+GfsF7UkSam03ZVvanE3B\n6KgDeXZ++qtDIAPG8sMAlzhYFmlu9oKJS1H8g4vl8R03GWTAg49Jf7uTZuev\nKas7iblww3UFiHIvMtZNFD7hks7+0IF0He19Aijc+MgEEY5e62oNKxaMDN7w\nH/y5epbDXjYVq0HmKOQoc9NcKVtTg/bd/XezKNi2eBH/3BQtV2FRBzNQ7T0a\nDg8aMDYrD/ywP/DXRTZ7irVg4JeLx8ivsDyp80mKHiW04btLRO1T1wry8DNz\nkfYRv/64bvhfirFGeyYacAZnohQD2PLdTmFvBeVC4Z3jBN836ai7grlJ1Adp\nsdcGxmql0S+XMP5Kv3LKQxFtE3HAZ/yMk+kXG0aoqQW1ord+7qNFZtXDSLsC\nRAXOzIVJmeudApxLltRaiZyDVi/lgZDVdhVovmDm4iIPGNuzbzceScqJS99G\ng/KBIAoTtaYTxENNvyQfkgf/6J+Xzxytsq6gH5ddgyhNzJGWoK+BHIGCDT7J\nwq+lAp/+TF97p9ljKYeAET/vyjGyyKDbaoCB8VQanoYNaah7csqIV0817mFn\nFbRX\r\n=Vn3Y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","name":"@ampproject/rollup-plugin-closure-compiler","husky":{"hooks":{"pre-push":"npm run test && npm run build","pre-commit":"lint-staged"}},"author":{"name":"The AMP HTML Authors"},"readme":"# rollup-plugin-closure-compiler\n\nLeverage [Closure Compiler](https://developers.google.com/closure/compiler/) to minify and optimize JavaScript with [Rollup](https://rollupjs.org/guide/en).\n\nGenerally Closure Compiler will produce superior minification than other projects, but historically has been more difficult to use. The goal of this plugin is to reduce this friction.\n\n## Installation\n\n```bash\nnpm install @ampproject/rollup-plugin-closure-compiler --save-dev\n```\n\n## Usage\n\nInvoke Closure Compiler from your Rollup configuration.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'iife',\n  },\n  plugins: [\n    compiler(),\n  ],\n}\n```\n\nIf you would like to provide additional [flags and options](https://github.com/google/closure-compiler/wiki/Flags-and-Options) to Closure Compiler, pass them via key-value pairs.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'iife',\n  },\n  plugins: [\n    compiler({\n      formatting: 'PRETTY_PRINT'\n    }),\n  ],\n}\n```\n\n### Code Splitting via Dynamic Imports\n\nThis plugin supports code splitting with Rollup's `experimentalCodeSplitting` feature. Enable code splitting in your Rollup configuration and each output bundle will be minified by Closure Compiler.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    dir: 'public/module',\n    format: 'es',\n  },\n  experimentalCodeSplitting: true,\n  plugins: [\n    compiler(),\n  ],\n}\n```\n\n### Automatic Closure Configuration\n\nThis plugin will modify the enable the `assume_function_wrapper` output option for Closure Compiler when `es` format is specifed to Rollup. **Note**: This is overrideable via passed flags and options.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'es',\n  },\n  plugins: [\n    compiler(),\n  ],\n}\n```\n\nIf your Rollup configuration outputs an IIFE format bundle with a specified name, this plugin will add an extern to ensure the name does not get mangled. **Note**: This is overrideable via passed flags and options.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'iife',\n    name: 'MyAwesomeThing'\n  },\n  plugins: [\n    compiler(),\n  ],\n}\n```\n\n### Additional Mangle Protection\n\nIf your source uses reserved words for identifiers or declarations, you can supply the list of words you would like to ensure are mangled before compilation, and renewed if they are used in an import or export statement.\n\n```js\n// rollup.config.js\nimport compiler from '@ampproject/rollup-plugin-closure-compiler';\n\nexport default {\n  input: 'main.js',\n  output: {\n    file: 'bundle.js',\n    format: 'es',\n  },\n  plugins: [\n    compiler({}, {\n      mangleReservedWords: ['Plugin', 'Storage'],\n    }),\n  ],\n}\n```\n\n## Security disclosures\n\nThe AMP Project accepts responsible security disclosures through the [Google Application Security program](https://www.google.com/about/appsecurity/).\n\n## Code of conduct\n\nThe AMP Project strives for a positive and growing project community that provides a safe environment for everyone.  All members, committers and volunteers in the community are required to act according to the [code of conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nrollup-plugin-closure-compiler is licensed under the [Apache License, Version 2.0](LICENSE).","engines":{"node":">=8"},"gitHead":"522396dd336e7d07cc0123e0bf17f5fb7abcae89","license":"Apache-2.0","scripts":{"lint":"tslint -c tslint.json -p tsconfig.json","test":"ava -v test/**/*.js","build":"rimraf dist transpile && tsc -p tsconfig.json & wait","pretest":"rimraf dist transpile && tsc -p tsconfig.test.json & wait","postbuild":"rollup --config rollup.config.js"},"_npmUser":{"name":"kristoferbaxter","email":"kbax@me.com"},"homepage":"https://github.com/ampproject/rollup-plugin-closure-compiler#readme","keywords":["rollup-plugin"],"repository":{"url":"git+https://github.com/ampproject/rollup-plugin-closure-compiler.git","type":"git"},"_npmVersion":"5.6.0","description":"Rollup + Google Closure Compiler","directories":{},"jsnext:main":"dist/index.mjs","lint-staged":{"*.ts":["npm run lint --fix","prettier --config .prettierrc --write","git add"]},"maintainers":[{"name":"ampproject-admin","email":"admin@ampproject.org"},{"name":"jridgewell","email":"justin+npm@ridgewell.name"},{"name":"kristoferbaxter","email":"kbax@me.com"},{"name":"sepandparhami","email":"sparhami@google.com"}],"_nodeVersion":"8.11.3","dependencies":{"acorn":"6.0.4","acorn-walk":"6.1.0","temp-write":"3.4.0","magic-string":"0.25.1","acorn-dynamic-import":"4.0.0","google-closure-compiler":"20181028.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"1.0.0-rc.1","husky":"1.1.3","rimraf":"2.6.2","rollup":"0.67.0","tslint":"5.11.0","builtins":"2.0.0","prettier":"1.15.1","typescript":"3.1.6","lint-staged":"8.0.4","@types/acorn":"4.0.3","@types/estree":"0.0.39","@types/temp-write":"3.3.0","rollup-plugin-copy":"0.2.3"},"peerDependencies":{"rollup":">= 0.66.6"},"_npmOperationalInternal":{"tmp":"tmp/rollup-plugin-closure-compiler_0.9.0-beta.3_1541963650281_0.9223632682140348","host":"s3://npm-registry-packages"},"_id":"@ampproject/rollup-plugin-closure-compiler@0.9.0-beta.3","version":"0.9.0-beta.3"}