{"bin":{"build-optimizer":"src/build-optimizer/cli.js"},"bugs":{"url":"https://github.com/angular/angular-cli/issues"},"dist":{"shasum":"0bbc1e796346d1c1319600d7603b17290336baf2","tarball":"https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.900.0-rc.12.tgz","fileCount":34,"integrity":"sha512-8qIMlxsN5MhjsEJcGEaQ4IRgaxdbQIz0mr0yez8B7sJbhTeoy11iZayunEdPHqtGc9mpyVHGJIoDA0+SJUtbNQ==","signatures":[{"sig":"MEUCIQCQMxGZsRvdYQgEfe/xSXijwMT99fyhrO2Zyy4VqZQGvQIgdONdMfNtokn3YnUnSMCzcIOiRHa2VI39rKcXNetZnpg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":94149,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeM4EuCRA9TVsSAnZWagAA+e4P/j3/Q/i4rNnvXNTaxb1c\n+z3y1SjsdBtt7ZzKpoQqg3+zIHAtt01h4lJay3q9TdPeW4Y5+FqI1nDnf7ob\nHNUR5xOx8jkHR+EsLma1I+E7kEYmOkp4O9rcZHasJsn3UOwlqme5sN95Y6s0\n26xrGs61v7I8/l38vUtm9fFuXS/mgtsVj3Wbx2HO9M/utTsD0lpkBvaz19Y+\n09UOY3czeLEEKgs1jPf/6Zvp+Wh0mYONpakxAosJbraIsOR6ou83qlO03rWA\nYdxtKLe0SbKT+QLh8ZsJffyx17POy9cgoBwA04+7gOeg4gCN3DasRcXH8w/B\n2AYD1k4pJedW6HWQA9dy9FkcyIlV9717F7j9lx8nte2+EMV79420inPXzYK0\n1uWswcf+4TisvaSBTWsQl4qBH6pK4OH8L7kh+3RE19qeSgtILDOTopRkMHnC\nbIyKMjI5QnA8o0+KDKeiK+EDnT08AuB2fNaTc5WbYtoH1MLUgUZJbPUgCYrp\n3mrtsfbxEeNJBYlfRHD9rLAo+gahHwbglZ9ic8m02pU0hxNqo1gSinLxSYL1\ngC7ybTyvIDcXGbSGg58V4rmVE/b8gxQEHWVCeUBsxpMVEGzsC9OtZpwlZZB7\nUBA5Kutaesj0KRUYllt0m/JvoolvvpdTvnFtIJ/G+mULAm3JETSACdYbauvN\nncQM\r\n=1bj2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"@angular-devkit/build-optimizer","husky":{"hooks":{"pre-push":"node ./bin/devkit-admin hooks/pre-push"}},"author":{"name":"Angular Authors"},"readme":"# Angular Build Optimizer\n\nAngular Build Optimizer contains Angular optimizations applicable to JavaScript code as a TypeScript transform pipeline.\n\n\n## Available optimizations\n\nTransformations applied depend on file content:\n\n- [Class fold](#class-fold), [Scrub file](#scrub-file) and [Prefix functions](#prefix-functions): applied to Angular apps and libraries.\n- [Import tslib](#import-tslib): applied when TypeScript helpers are found.\n\nSome of these optimizations add `/*@__PURE__*/` comments.\nThese are used by JS optimization tools to identify pure functions that can potentially be dropped.\n\n\n### Class fold\n\nStatic properties are folded into ES5 classes:\n\n```typescript\n// input\nvar Clazz = (function () { function Clazz() { } return Clazz; }());\nClazz.prop = 1;\n\n// output\nvar Clazz = (function () { function Clazz() { } Clazz.prop = 1; return Clazz; }());\n```\n\n\n### Scrub file\n\nAngular decorators, property decorators and constructor parameters are removed, while leaving non-Angular ones intact.\n\n```typescript\n// input\nimport { Injectable, Input, Component } from '@angular/core';\nimport { NotInjectable, NotComponent, NotInput } from 'another-lib';\nvar Clazz = (function () { function Clazz() { } return Clazz; }());\nClazz.decorators = [{ type: Injectable }, { type: NotInjectable }];\nClazz.propDecorators = { 'ngIf': [{ type: Input }] };\nClazz.ctorParameters = function () { return [{type: Injector}]; };\nvar ComponentClazz = (function () {\n  function ComponentClazz() { }\n  __decorate([\n    Input(),\n    __metadata(\"design:type\", Object)\n  ], Clazz.prototype, \"selected\", void 0);\n  __decorate([\n    NotInput(),\n    __metadata(\"design:type\", Object)\n  ], Clazz.prototype, \"notSelected\", void 0);\n  ComponentClazz = __decorate([\n    NotComponent(),\n    Component({\n        selector: 'app-root',\n        templateUrl: './app.component.html',\n        styleUrls: ['./app.component.css']\n    })\n  ], ComponentClazz);\n  return ComponentClazz;\n}());\n\n// output\nimport { Injectable, Input, Component } from '@angular/core';\nimport { NotInjectable, NotComponent } from 'another-lib';\nvar Clazz = (function () { function Clazz() { } return Clazz; }());\nClazz.decorators = [{ type: NotInjectable }];\nvar ComponentClazz = (function () {\n  function ComponentClazz() { }\n  __decorate([\n    NotInput(),\n    __metadata(\"design:type\", Object)\n  ], Clazz.prototype, \"notSelected\", void 0);\n  ComponentClazz = __decorate([\n    NotComponent()\n  ], ComponentClazz);\n  return ComponentClazz;\n}());\n```\n\n\n### Prefix functions\n\nAdds `/*@__PURE__*/` comments to top level downleveled class declarations and instantiation.\n\nWarning: this transform assumes the file is a pure module. It should not be used with unpure modules.\n\n```typescript\n// input\nvar Clazz = (function () { function Clazz() { } return Clazz; }());\nvar newClazz = new Clazz();\nvar newClazzTwo = Clazz();\n\n// output\nvar Clazz = /*@__PURE__*/ (function () { function Clazz() { } return Clazz; }());\nvar newClazz = /*@__PURE__*/ new Clazz();\nvar newClazzTwo = /*@__PURE__*/ Clazz();\n```\n\n\n### Prefix Classes\n\nAdds `/*@__PURE__*/` to downleveled TypeScript classes.\n\n```typescript\n// input\nvar ReplayEvent = (function () {\n    function ReplayEvent(time, value) {\n        this.time = time;\n        this.value = value;\n    }\n    return ReplayEvent;\n}());\n\n// output\nvar ReplayEvent = /*@__PURE__*/ (function () {\n    function ReplayEvent(time, value) {\n        this.time = time;\n        this.value = value;\n    }\n    return ReplayEvent;\n}());\n```\n\n\n### Import tslib\n\nTypeScript helpers (`__extends/__decorate/__metadata/__param`) are replaced with `tslib` imports whenever found.\n\n```typescript\n// input\nvar __extends = (this && this.__extends) || function (d, b) {\n  for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};\n\n// output\nimport { __extends } from \"tslib\";\n```\n\n### Wrap enums\n\nWrap downleveled TypeScript enums in a function, and adds `/*@__PURE__*/` comment.\n\n```typescript\n// input\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n\n// output\nvar ChangeDetectionStrategy = /*@__PURE__*/ (function () {\n  var ChangeDetectionStrategy = {};\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n  ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n  return ChangeDetectionStrategy;\n})();\n```\n\n\n## Library Usage\n\n```typescript\nimport { buildOptimizer } from '@angular-devkit/build-optimizer';\n\nconst transpiledContent = buildOptimizer({ content: input }).content;\n```\n\nAvailable options:\n```typescript\nexport interface BuildOptimizerOptions {\n  content?: string;\n  inputFilePath?: string;\n  outputFilePath?: string;\n  emitSourceMap?: boolean;\n  strict?: boolean;\n  isSideEffectFree?: boolean;\n}\n```\n\n\n## Webpack loader usage:\n\n```typescript\nimport { BuildOptimizerWebpackPlugin } from '@angular-devkit/build-optimizer';\n\nmodule.exports = {\n  plugins: [\n    new BuildOptimizerWebpackPlugin(),\n  ]\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        loader: '@angular-devkit/build-optimizer/webpack-loader',\n        options: {\n          sourceMap: false\n        }\n      }\n    ]\n  }\n}\n```\n\n\n## CLI usage\n\n```bash\nbuild-optimizer input.js\nbuild-optimizer input.js output.js\n```\n","engines":{"npm":">= 6.11.0","node":">= 10.13.0","yarn":">= 1.13.0"},"license":"MIT","typings":"src/index.d.ts","_npmUser":{"name":"angular","email":"devops+npm@angular.io"},"homepage":"https://github.com/angular/angular-cli","keywords":["angular","Angular CLI","devkit","sdk","Angular DevKit"],"repository":{"url":"git+https://github.com/angular/angular-cli.git","type":"git"},"_npmVersion":"6.13.7","description":"Angular Build Optimizer","directories":{},"maintainers":[{"name":"angular","email":"devops+npm@angular.io"},{"name":"angular-devkit","email":"hansl@google.com"},{"name":"google-wombot","email":"node-team-npm+wombot@google.com"}],"_nodeVersion":"12.0.0","dependencies":{"tslib":"1.10.0","source-map":"0.7.3","typescript":"3.6.4","loader-utils":"1.2.3","webpack-sources":"1.4.3"},"experimental":true,"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/build-optimizer_0.900.0-rc.12_1580433709992_0.3434206832446858","host":"s3://npm-registry-packages"},"_id":"@angular-devkit/build-optimizer@0.900.0-rc.12","version":"0.900.0-rc.12"}