1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/schematics/src/ng-add/index.ts"],"names":[],"mappings":";;AAAA,yDAKoC;AACpC,yDAAuE;AAEvE,SAAS,0BAA0B,CAAC,IAAU;IAC5C,IAAM,SAAS,GAAG,IAAA,8BAAY,EAAC,IAAI,CAAC,CAAC;IACrC,IAAM,IAAI,GAAG,IAAA,kCAAgB,EAAC,IAAI,CAAC,CAAC;IAEpC,SAAS,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC;IACpC,SAAS,CAAC,GAAG,CAAC,oBAAoB,GAAG,SAAS,CAAC,GAAG,CAAC,oBAAoB,IAAI,EAAE,CAAC;IAC9E,IAAI,SAAS,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACpC,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACzE,OAAO,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACzC,CAAC;IACD,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAE5D,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,kBAAkB;IACzB,OAAO,UAAC,IAAU;QAChB,0BAA0B,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAED;IACE,OAAO,UAAC,IAAU,EAAE,OAAyB;QAC3C,OAAO,IAAA,kBAAK,EAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AAJD,4BAIC","sourcesContent":["import {\n chain,\n Rule,\n SchematicContext,\n Tree,\n} from '@angular-devkit/schematics';\nimport { getWorkspace, getWorkspacePath } from '../../schematics-core';\n\nfunction updateSchematicCollections(host: Tree) {\n const workspace = getWorkspace(host);\n const path = getWorkspacePath(host);\n\n workspace.cli = workspace.cli || {};\n workspace.cli.schematicCollections = workspace.cli.schematicCollections || [];\n if (workspace.cli.defaultCollection) {\n workspace.cli.schematicCollections.push(workspace.cli.defaultCollection);\n delete workspace.cli.defaultCollection;\n }\n workspace.cli.schematicCollections.push('@ngrx/schematics');\n\n host.overwrite(path, JSON.stringify(workspace, null, 2));\n}\n\nfunction updateWorkspaceCli() {\n return (host: Tree) => {\n updateSchematicCollections(host);\n return host;\n };\n}\n\nexport default function (): Rule {\n return (host: Tree, context: SchematicContext) => {\n return chain([updateWorkspaceCli()])(host, context);\n };\n}\n"]} |