├── .nvmrc ├── .prettierignore ├── benchmark └── aio │ └── .gitignore ├── .bazelignore ├── Dockerfile ├── tests ├── legacy-cli │ ├── e2e │ │ ├── assets │ │ │ ├── 1.0-project │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.css │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── app.module.ts │ │ │ │ │ ├── styles.css │ │ │ │ │ ├── environments │ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ │ └── environment.ts │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── typings.d.ts │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ ├── index.html │ │ │ │ │ ├── main.ts │ │ │ │ │ └── tsconfig.spec.json │ │ │ │ ├── e2e │ │ │ │ │ ├── tsconfig.e2e.json │ │ │ │ │ ├── app.po.ts │ │ │ │ │ └── app.e2e-spec.ts │ │ │ │ ├── .editorconfig │ │ │ │ └── tsconfig.json │ │ │ ├── 1.7-project │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.css │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── app.module.ts │ │ │ │ │ ├── styles.css │ │ │ │ │ ├── environments │ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ │ └── environment.ts │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── typings.d.ts │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ ├── index.html │ │ │ │ │ ├── tsconfig.spec.json │ │ │ │ │ └── main.ts │ │ │ │ ├── e2e │ │ │ │ │ ├── app.po.ts │ │ │ │ │ ├── tsconfig.e2e.json │ │ │ │ │ └── app.e2e-spec.ts │ │ │ │ ├── .editorconfig │ │ │ │ └── tsconfig.json │ │ │ ├── 7.0-project │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.css │ │ │ │ │ │ ├── lazy │ │ │ │ │ │ │ ├── lazy-comp │ │ │ │ │ │ │ │ ├── lazy-comp.component.css │ │ │ │ │ │ │ │ ├── lazy-comp.component.html │ │ │ │ │ │ │ │ └── lazy-comp.component.ts │ │ │ │ │ │ │ ├── lazy.module.ts │ │ │ │ │ │ │ └── lazy-routing.module.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ ├── app-routing.module.ts │ │ │ │ │ │ └── app.module.ts │ │ │ │ │ ├── styles.css │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── favicon.ico │ │ │ │ │ ├── tsconfig.app.json │ │ │ │ │ ├── tsconfig.spec.json │ │ │ │ │ ├── index.html │ │ │ │ │ ├── tslint.json │ │ │ │ │ ├── main.ts │ │ │ │ │ └── browserslist │ │ │ │ ├── e2e │ │ │ │ │ ├── src │ │ │ │ │ │ └── app.po.ts │ │ │ │ │ └── tsconfig.e2e.json │ │ │ │ ├── .editorconfig │ │ │ │ └── tsconfig.json │ │ │ ├── webpack │ │ │ │ ├── test-app-weird │ │ │ │ │ ├── webpack.flags.json │ │ │ │ │ ├── aotplugin.config.json │ │ │ │ │ └── not │ │ │ │ │ │ └── so │ │ │ │ │ │ └── source │ │ │ │ │ │ ├── app │ │ │ │ │ │ ├── main.jit.ts │ │ │ │ │ │ ├── app.component.scss │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── feature │ │ │ │ │ │ │ └── feature.module.ts │ │ │ │ │ │ └── index.html │ │ │ │ ├── test-app │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.scss │ │ │ │ │ │ ├── app.component.html │ │ │ │ │ │ ├── main.ts │ │ │ │ │ │ ├── injectable.ts │ │ │ │ │ │ ├── app.component.ts │ │ │ │ │ │ └── feature │ │ │ │ │ │ │ └── feature.module.ts │ │ │ │ │ └── index.html │ │ │ │ └── test-server-app │ │ │ │ │ ├── app │ │ │ │ │ ├── main.commonjs.ts │ │ │ │ │ ├── app.component.scss │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── injectable.ts │ │ │ │ │ ├── main.ts │ │ │ │ │ ├── app.component.ts │ │ │ │ │ └── feature │ │ │ │ │ │ └── feature.module.ts │ │ │ │ │ ├── index.html │ │ │ │ │ └── index.js │ │ │ ├── add-collection │ │ │ │ ├── index.js │ │ │ │ ├── package.json │ │ │ │ └── collection.json │ │ │ ├── add-collection.tgz │ │ │ ├── images │ │ │ │ └── spectrum.png │ │ │ ├── add-collection-peer-bad │ │ │ │ ├── index.js │ │ │ │ ├── collection.json │ │ │ │ └── package.json │ │ │ └── add-collection-peer-good │ │ │ │ ├── index.js │ │ │ │ ├── collection.json │ │ │ │ └── package.json │ │ ├── tests │ │ │ ├── misc │ │ │ │ ├── npm-audit.ts │ │ │ │ ├── update-help.ts │ │ │ │ ├── different-file-format.ts │ │ │ │ ├── update-git-clean.ts │ │ │ │ ├── workspace-verification.ts │ │ │ │ └── multiple-targets.ts │ │ │ ├── commands │ │ │ │ ├── help │ │ │ │ │ ├── help-option-command.ts │ │ │ │ │ ├── help.ts │ │ │ │ │ ├── help-option.ts │ │ │ │ │ └── help-json.ts │ │ │ │ ├── add │ │ │ │ │ ├── dir.ts │ │ │ │ │ ├── file.ts │ │ │ │ │ ├── add-material.ts │ │ │ │ │ ├── add.ts │ │ │ │ │ └── add-version.ts │ │ │ │ ├── new │ │ │ │ │ ├── new-routing.ts │ │ │ │ │ ├── new-skip-tests.ts │ │ │ │ │ ├── existing-directory.ts │ │ │ │ │ ├── new-skip-commit.ts │ │ │ │ │ └── new-style.ts │ │ │ │ ├── config │ │ │ │ │ └── config-set-serve-port.ts │ │ │ │ └── unknown-configuration.ts │ │ │ ├── generate │ │ │ │ ├── generate-name-error.ts │ │ │ │ ├── generate-error.ts │ │ │ │ ├── pipe │ │ │ │ │ ├── pipe-module-fail.ts │ │ │ │ │ ├── pipe-module-export.ts │ │ │ │ │ └── pipe-in-existing-module-dir.ts │ │ │ │ ├── directive │ │ │ │ │ ├── directive-module-fail.ts │ │ │ │ │ ├── directive-module-export.ts │ │ │ │ │ └── directive-in-existing-module-dir.ts │ │ │ │ ├── component │ │ │ │ │ ├── component-module-fail.ts │ │ │ │ │ ├── component-module-export.ts │ │ │ │ │ └── component-in-existing-module-dir.ts │ │ │ │ ├── application │ │ │ │ │ └── application-basic.ts │ │ │ │ ├── library │ │ │ │ │ └── library-basic.ts │ │ │ │ ├── interface.ts │ │ │ │ └── class.ts │ │ │ ├── build │ │ │ │ ├── no-implicit-any.ts │ │ │ │ ├── config-file-fallback.ts │ │ │ │ ├── barrel-file.ts │ │ │ │ ├── module-id.ts │ │ │ │ ├── base-href.ts │ │ │ │ ├── extract-licenses.ts │ │ │ │ ├── no-entry-module.ts │ │ │ │ └── json.ts │ │ │ ├── basic │ │ │ │ ├── test.ts │ │ │ │ └── aot.ts │ │ │ ├── experimental │ │ │ │ └── bep.ts │ │ │ ├── lint │ │ │ │ ├── lint-with-non-project.ts │ │ │ │ └── lint.ts │ │ │ └── test │ │ │ │ └── test-fail-single-run.ts │ │ ├── utils │ │ │ ├── env.ts │ │ │ └── version.ts │ │ └── setup │ │ │ └── 015-build.ts │ └── run_e2e.js ├── angular_devkit │ ├── build_webpack │ │ ├── angular-app │ │ │ ├── src │ │ │ │ ├── assets │ │ │ │ │ └── .gitkeep │ │ │ │ ├── app │ │ │ │ │ ├── app.component.css │ │ │ │ │ └── app.component.ts │ │ │ │ ├── styles.css │ │ │ │ ├── tsconfig.app.json │ │ │ │ └── environments │ │ │ │ │ └── environment.prod.ts │ │ │ └── tsconfig.json │ │ └── basic-app │ │ │ ├── src │ │ │ └── main.js │ │ │ └── webpack.config.js │ ├── build_angular │ │ └── hello-world-app │ │ │ ├── src │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── app │ │ │ │ ├── app.component.css │ │ │ │ └── app.component.ts │ │ │ ├── styles.css │ │ │ ├── favicon.ico │ │ │ ├── spectrum.png │ │ │ ├── tsconfig.app.json │ │ │ ├── environments │ │ │ │ └── environment.prod.ts │ │ │ ├── tsconfig.spec.json │ │ │ ├── index.html │ │ │ ├── typings.d.ts │ │ │ ├── tsconfig.server.json │ │ │ └── main.server.ts │ │ │ ├── browserslist │ │ │ ├── .gitignore │ │ │ ├── e2e │ │ │ ├── tsconfig.e2e.json │ │ │ └── app.po.ts │ │ │ ├── .editorconfig │ │ │ └── tsconfig.json │ ├── schematics │ │ └── tools │ │ │ └── file-system-engine-host │ │ │ ├── extends-deep │ │ │ └── collection.json │ │ │ ├── file-tasks │ │ │ ├── file-task.js │ │ │ └── collection.json │ │ │ ├── extends-multiple │ │ │ └── collection.json │ │ │ ├── works │ │ │ └── collection.json │ │ │ ├── extends-basic-string │ │ │ └── collection.json │ │ │ ├── extends-circular │ │ │ └── collection.json │ │ │ ├── extends-basic │ │ │ └── collection.json │ │ │ ├── extends-replace │ │ │ └── collection.json │ │ │ ├── extends-circular-deep │ │ │ └── collection.json │ │ │ ├── extra-properties │ │ │ └── collection.json │ │ │ ├── null-factory.ts │ │ │ ├── extends-circular-middle │ │ │ └── collection.json │ │ │ ├── extends-circular-multiple │ │ │ └── collection.json │ │ │ ├── aliases │ │ │ └── collection.json │ │ │ ├── invalid-aliases │ │ │ └── collection.json │ │ │ ├── aliases-many │ │ │ └── collection.json │ │ │ ├── aliases-dupe │ │ │ └── collection.json │ │ │ ├── invalid-aliases-2 │ │ │ └── collection.json │ │ │ ├── hidden-schematics │ │ │ └── collection.json │ │ │ └── private-schematics │ │ │ └── collection.json │ ├── build_ng_packagr │ │ └── ng-packaged │ │ │ ├── projects │ │ │ └── lib │ │ │ │ ├── ng-package.json │ │ │ │ ├── package.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── src │ │ │ │ ├── public-api.ts │ │ │ │ └── lib │ │ │ │ ├── lib.service.ts │ │ │ │ └── lib.module.ts │ │ │ └── tsconfig.json │ └── core │ │ └── json │ │ └── schema │ │ └── serializers │ │ └── 0.schema.json ├── schematics │ └── update │ │ └── packages │ │ ├── update-base │ │ └── package.json │ │ ├── update-peer-dependencies-1 │ │ └── package.json │ │ ├── update-migrations │ │ ├── migrations.json │ │ ├── package.json │ │ └── v1_5.js │ │ ├── update-peer-dependencies-angular-5 │ │ └── package.json │ │ ├── update-peer-dependencies-2 │ │ └── package.json │ │ ├── update-package-group-1 │ │ └── package.json │ │ ├── update-package-group-2 │ │ └── package.json │ │ ├── update-migrations-external │ │ └── package.json │ │ ├── update-peer-dependencies-angular-5-2 │ │ └── package.json │ │ └── README.md └── README.md ├── packages ├── angular_devkit │ ├── benchmark │ │ ├── src │ │ │ ├── test │ │ │ │ ├── exit-code-one.js │ │ │ │ ├── fibonacci.js │ │ │ │ └── test-script.js │ │ │ └── index.ts │ │ └── package.json │ ├── architect │ │ ├── README.md │ │ ├── builders │ │ │ ├── noop-schema.json │ │ │ ├── true.ts │ │ │ └── false.ts │ │ ├── node │ │ │ └── index.ts │ │ ├── testing │ │ │ └── index.ts │ │ ├── package.json │ │ └── src │ │ │ └── index.ts │ ├── build_angular │ │ ├── README.md │ │ ├── src │ │ │ ├── angular-cli-files │ │ │ │ ├── models │ │ │ │ │ ├── es5-jit-polyfills.js │ │ │ │ │ ├── jit-polyfills.js │ │ │ │ │ └── webpack-configs │ │ │ │ │ │ └── index.ts │ │ │ │ ├── utilities │ │ │ │ │ ├── strip-bom.ts │ │ │ │ │ └── is-directory.ts │ │ │ │ └── plugins │ │ │ │ │ └── raw-css-loader.ts │ │ │ ├── transforms.ts │ │ │ └── utils │ │ │ │ └── default-progress.ts │ │ └── plugins │ │ │ └── karma.ts │ ├── build_ng_packagr │ │ ├── README.md │ │ ├── src │ │ │ └── index.ts │ │ └── builders.json │ ├── build_optimizer │ │ ├── webpack-loader │ │ │ └── package.json │ │ ├── src │ │ │ └── _golden-api.ts │ │ └── package.json │ ├── core │ │ ├── src │ │ │ ├── workspace │ │ │ │ ├── json │ │ │ │ │ └── test │ │ │ │ │ │ └── cases │ │ │ │ │ │ ├── Empty.json │ │ │ │ │ │ ├── Extensions1.json │ │ │ │ │ │ ├── ProjectEmpty.json │ │ │ │ │ │ ├── ObjectReplace2.json │ │ │ │ │ │ ├── ObjectReplace3.json │ │ │ │ │ │ ├── ArrayReplace2.json │ │ │ │ │ │ ├── ArrayPop.json │ │ │ │ │ │ ├── ArraySplice1.json │ │ │ │ │ │ ├── ObjectReplace1.json │ │ │ │ │ │ ├── ArrayDeleteLast.json │ │ │ │ │ │ ├── ArrayShift.json │ │ │ │ │ │ ├── ArrayDeleteInner.json │ │ │ │ │ │ ├── ArrayDeleteZero.json │ │ │ │ │ │ ├── ArraySort.json │ │ │ │ │ │ ├── Retain.json │ │ │ │ │ │ ├── ArrayDeleteLastAdd.json │ │ │ │ │ │ ├── ArrayIndexInner.json │ │ │ │ │ │ ├── ArrayIndexLast.json │ │ │ │ │ │ ├── ArrayIndexZero.json │ │ │ │ │ │ ├── ArrayReplace1.json │ │ │ │ │ │ ├── Extensions2.json │ │ │ │ │ │ ├── ArrayDeleteInnerAdd.json │ │ │ │ │ │ ├── ArrayPush.json │ │ │ │ │ │ ├── ArrayUnshift.json │ │ │ │ │ │ ├── AddArrayEmpty.json │ │ │ │ │ │ ├── ArraySplice2.json │ │ │ │ │ │ ├── AddArrayPush.json │ │ │ │ │ │ ├── AddProject1.json │ │ │ │ │ │ └── ArrayValues.json │ │ │ │ └── index.ts │ │ │ ├── exception │ │ │ │ └── index.ts │ │ │ ├── terminal │ │ │ │ └── index.ts │ │ │ ├── experimental │ │ │ │ ├── workspace │ │ │ │ │ └── index.ts │ │ │ │ └── jobs │ │ │ │ │ └── index.ts │ │ │ ├── virtual-fs │ │ │ │ └── index.ts │ │ │ ├── json │ │ │ │ ├── index.ts │ │ │ │ └── schema │ │ │ │ │ └── index.ts │ │ │ ├── utils │ │ │ │ ├── array.ts │ │ │ │ └── priority-queue_spec.ts │ │ │ ├── logger │ │ │ │ └── index.ts │ │ │ ├── experimental.ts │ │ │ └── analytics │ │ │ │ └── noop.ts │ │ ├── node │ │ │ ├── experimental │ │ │ │ ├── jobs │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── third_party │ │ │ └── github.com │ │ │ │ ├── chalk │ │ │ │ └── supports-color │ │ │ │ │ ├── LOCAL_MODS.md │ │ │ │ │ └── BUILD │ │ │ │ └── sindresorhus │ │ │ │ └── has-flag │ │ │ │ ├── index.js │ │ │ │ └── BUILD │ │ └── package.json │ ├── schematics │ │ ├── tasks │ │ │ ├── tslint-fix │ │ │ │ └── test │ │ │ │ │ └── collection.json │ │ │ ├── run-schematic │ │ │ │ └── options.ts │ │ │ └── index.ts │ │ ├── testing │ │ │ └── index.ts │ │ ├── src │ │ │ ├── workflow │ │ │ │ └── index.ts │ │ │ ├── engine │ │ │ │ └── index.ts │ │ │ ├── _golden-api.ts │ │ │ ├── tree │ │ │ │ └── empty.ts │ │ │ └── rules │ │ │ │ └── url.ts │ │ └── package.json │ └── build_webpack │ │ └── src │ │ ├── index.ts │ │ ├── webpack │ │ └── schema.json │ │ └── webpack-dev-server │ │ └── schema.json ├── schematics │ ├── angular │ │ ├── application │ │ │ ├── files │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep.template │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts.template │ │ │ │ │ ├── styles.__style__.template │ │ │ │ │ ├── favicon.ico.template │ │ │ │ │ └── index.html.template │ │ │ │ ├── tsconfig.spec.json.template │ │ │ │ ├── tslint.json.template │ │ │ │ ├── tsconfig.app.json.template │ │ │ │ └── browserslist.template │ │ │ └── other-files │ │ │ │ └── app.module.ts.template │ │ ├── component │ │ │ └── files │ │ │ │ └── __name@dasherize@if-flat__ │ │ │ │ ├── __name@dasherize__.component.__style__.template │ │ │ │ └── __name@dasherize__.component.html.template │ │ ├── enum │ │ │ └── files │ │ │ │ └── __name@dasherize__.enum.ts.template │ │ ├── class │ │ │ └── files │ │ │ │ ├── __name@dasherize____type__.ts.template │ │ │ │ └── __name@dasherize____type__.spec.ts.template │ │ ├── interface │ │ │ └── files │ │ │ │ └── __name@dasherize____type__.ts.template │ │ ├── e2e │ │ │ ├── e2e-long.md │ │ │ └── files │ │ │ │ ├── src │ │ │ │ └── app.po.ts.template │ │ │ │ └── tsconfig.json.template │ │ ├── workspace │ │ │ └── files │ │ │ │ ├── angular.json.template │ │ │ │ └── __dot__editorconfig.template │ │ ├── web-worker │ │ │ └── files │ │ │ │ ├── worker │ │ │ │ └── __name@dasherize__.worker.ts.template │ │ │ │ └── worker-tsconfig │ │ │ │ └── tsconfig.worker.json.template │ │ ├── library │ │ │ ├── files │ │ │ │ ├── package.json.template │ │ │ │ ├── ng-package.json.template │ │ │ │ ├── src │ │ │ │ │ └── __entryFile__.ts.template │ │ │ │ ├── tsconfig.spec.json.template │ │ │ │ └── tslint.json.template │ │ │ └── library-long.md │ │ ├── service │ │ │ └── files │ │ │ │ └── __name@dasherize@if-flat__ │ │ │ │ ├── __name@dasherize__.service.ts.template │ │ │ │ └── __name@dasherize__.service.spec.ts.template │ │ ├── directive │ │ │ └── files │ │ │ │ └── __name@dasherize@if-flat__ │ │ │ │ ├── __name@dasherize__.directive.ts.template │ │ │ │ └── __name@dasherize__.directive.spec.ts.template │ │ ├── utility │ │ │ └── test │ │ │ │ ├── index.ts │ │ │ │ └── get-file-content.ts │ │ ├── pipe │ │ │ └── files │ │ │ │ └── __name@dasherize@if-flat__ │ │ │ │ ├── __name@dasherize__.pipe.spec.ts.template │ │ │ │ └── __name@dasherize__.pipe.ts.template │ │ ├── universal │ │ │ └── files │ │ │ │ ├── src │ │ │ │ ├── __main@stripTsExtension__.ts.template │ │ │ │ └── app │ │ │ │ │ └── __rootModuleFileName__.template │ │ │ │ └── root │ │ │ │ └── __tsconfigFileName__.json.template │ │ ├── package.json │ │ ├── third_party │ │ │ └── github.com │ │ │ │ └── Microsoft │ │ │ │ └── TypeScript │ │ │ │ └── BUILD.bazel │ │ ├── guard │ │ │ └── files │ │ │ │ └── __name@dasherize__.guard.spec.ts.template │ │ └── migrations │ │ │ └── update-8 │ │ │ └── remove-angular-http.ts │ ├── schematics │ │ ├── schematic │ │ │ ├── files │ │ │ │ ├── src │ │ │ │ │ ├── my-full-schematic │ │ │ │ │ │ ├── files │ │ │ │ │ │ │ ├── test__INDEX__ │ │ │ │ │ │ │ └── test2 │ │ │ │ │ │ └── schema.json │ │ │ │ │ └── my-schematic │ │ │ │ │ │ └── index_spec.ts │ │ │ │ └── __dot__gitignore │ │ │ └── schema.json │ │ ├── blank │ │ │ ├── project-files │ │ │ │ ├── __dot__npmignore.template │ │ │ │ ├── src │ │ │ │ │ └── collection.json.template │ │ │ │ └── __dot__gitignore.template │ │ │ ├── schematic-files │ │ │ │ └── src │ │ │ │ │ └── __name@dasherize__ │ │ │ │ │ └── index.ts.template │ │ │ └── schema.json │ │ ├── package.json │ │ └── collection.json │ └── update │ │ └── collection.json ├── _ │ ├── devkit │ │ ├── package │ │ │ └── project-files │ │ │ │ └── __path__ │ │ │ │ ├── README.md │ │ │ │ ├── src │ │ │ │ └── index.ts │ │ │ │ └── package.json │ │ ├── collection.json │ │ └── package.json │ └── benchmark │ │ ├── src │ │ └── index.ts │ │ └── package.json ├── angular │ ├── cli │ │ ├── bin │ │ │ └── postinstall │ │ │ │ ├── script.js │ │ │ │ └── analytics-prompt.js │ │ ├── commands │ │ │ ├── e2e-long.md │ │ │ ├── help-long.md │ │ │ ├── test-long.md │ │ │ ├── lint-long.md │ │ │ ├── easter-egg.json │ │ │ ├── add.md │ │ │ ├── version.json │ │ │ ├── update-long.md │ │ │ ├── deprecated.json │ │ │ ├── help.json │ │ │ ├── test.json │ │ │ ├── xi18n.json │ │ │ └── e2e.json │ │ ├── plugins │ │ │ └── karma.js │ │ ├── utilities │ │ │ └── INITIAL_COMMIT_MESSAGE.txt │ │ └── models │ │ │ └── error.ts │ └── pwa │ │ ├── pwa │ │ └── files │ │ │ └── assets │ │ │ └── icons │ │ │ ├── icon-72x72.png │ │ │ ├── icon-96x96.png │ │ │ ├── icon-128x128.png │ │ │ ├── icon-144x144.png │ │ │ ├── icon-152x152.png │ │ │ ├── icon-192x192.png │ │ │ ├── icon-384x384.png │ │ │ └── icon-512x512.png │ │ ├── collection.json │ │ └── package.json ├── ngtools │ └── webpack │ │ └── src │ │ ├── type_checker_bootstrap.js │ │ ├── index.ts │ │ └── utils_spec.ts └── README.md ├── .circleci ├── npm_token └── github_token ├── .prettierrc ├── etc ├── cli.angular.io │ ├── .firebaserc │ ├── favicon.ico │ ├── firebase.json │ └── README.md ├── rules │ ├── README.md │ └── tsconfig.json ├── README.md └── api │ └── angular_devkit │ └── core │ └── node │ └── testing │ └── index.d.ts ├── docs └── documentation │ ├── _Sidebar.md │ ├── help.md │ ├── version.md │ ├── add.md │ ├── eject.md │ ├── 1-x │ ├── stories │ │ ├── autocompletion.md │ │ └── include-angular-material.md │ └── generate │ │ └── enum.md │ └── run.md ├── scripts └── templates │ ├── user-analytics-table.ejs │ └── changelog-special-thanks.ejs ├── .gitattributes ├── .bazelrc ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md └── ISSUE_TEMPLATE │ ├── 4-security-issue-disclosure.md │ ├── 6-angular-framework.md │ ├── 7-angular-material.md │ ├── 3-docs-bug.md │ └── 5-support-request.md ├── .gitignore ├── bin ├── ng ├── architect ├── build-optimizer └── schematics ├── third_party ├── github.com │ └── bazelbuild │ │ └── bazel │ │ └── src │ │ └── main │ │ ├── protobuf │ │ └── BUILD │ │ └── java │ │ └── com │ │ └── google │ │ └── devtools │ │ └── build │ │ └── lib │ │ └── buildeventstream │ │ └── proto │ │ └── BUILD └── README.md ├── BUILD ├── tools └── yarn │ └── check-yarn.js └── tsconfig-test.json /.nvmrc: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | /etc/api 2 | -------------------------------------------------------------------------------- /benchmark/aio/.gitignore: -------------------------------------------------------------------------------- 1 | angular/ -------------------------------------------------------------------------------- /.bazelignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10.12 2 | ENTRYPOINT [ "sh" ] 3 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/angular_devkit/benchmark/src/test/exit-code-one.js: -------------------------------------------------------------------------------- 1 | process.exit(1); -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/src/assets/.gitkeep.template: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/README.md: -------------------------------------------------------------------------------- 1 | # Angular Build Facade 2 | 3 | WIP 4 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/basic-app/src/main.js: -------------------------------------------------------------------------------- 1 | console.log('hello world'); -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/lazy/lazy-comp/lazy-comp.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/README.md: -------------------------------------------------------------------------------- 1 | # Angular Webpack Build Facade 2 | 3 | WIP -------------------------------------------------------------------------------- /.circleci/npm_token: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/.circleci/npm_token -------------------------------------------------------------------------------- /packages/angular_devkit/build_ng_packagr/README.md: -------------------------------------------------------------------------------- 1 | # Angular Build Architect for ng-packagr 2 | 3 | WIP -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

2 | {{title}} 3 |

4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/webpack.flags.json: -------------------------------------------------------------------------------- 1 | { 2 | "DEBUG": false 3 | } 4 | -------------------------------------------------------------------------------- /.circleci/github_token: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/.circleci/github_token -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "singleQuote": true, 4 | "trailingComma": "all" 5 | } 6 | -------------------------------------------------------------------------------- /etc/cli.angular.io/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "cli-angular-io" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/_/devkit/package/project-files/__path__/README.md: -------------------------------------------------------------------------------- 1 | # <%= displayName %> 2 | 3 | Work in progress 4 | -------------------------------------------------------------------------------- /etc/rules/README.md: -------------------------------------------------------------------------------- 1 | # TsLint Rules 2 | 3 | This folder contains custom TsLint rules specific to this repository. 4 | -------------------------------------------------------------------------------- /packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.__style__.template: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/app.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | background-color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/main.commonjs.ts: -------------------------------------------------------------------------------- 1 | export { AppModule } from './app.module'; 2 | -------------------------------------------------------------------------------- /etc/cli.angular.io/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/etc/cli.angular.io/favicon.ico -------------------------------------------------------------------------------- /packages/schematics/angular/enum/files/__name@dasherize__.enum.ts.template: -------------------------------------------------------------------------------- 1 | export enum <%= classify(name) %> { 2 | } 3 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/app.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | background-color: blue; 3 | } 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/run_e2e.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | require('../../lib/bootstrap-local'); 3 | require('./e2e_runner.ts'); 4 | -------------------------------------------------------------------------------- /etc/README.md: -------------------------------------------------------------------------------- 1 | # `/etc` Folder 2 | 3 | This folder is for files that doesn't fit in other directories in the root folder. 4 | -------------------------------------------------------------------------------- /packages/schematics/angular/class/files/__name@dasherize____type__.ts.template: -------------------------------------------------------------------------------- 1 | export class <%= classify(name) %> { 2 | } 3 | -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/files/src/my-full-schematic/files/test__INDEX__: -------------------------------------------------------------------------------- 1 | 2 | This is test #<%= INDEX %>. 3 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/lazy/lazy-comp/lazy-comp.component.html: -------------------------------------------------------------------------------- 1 |

2 | lazy-comp works! 3 |

4 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_optimizer/webpack-loader/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../src/build-optimizer/webpack-loader.js" 3 | } 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /docs/documentation/_Sidebar.md: -------------------------------------------------------------------------------- 1 | * [Angular CLI](home) 2 | * [Generate](generate) 3 | * [Stories](stories) 4 | * [Angular CLI 1.x wiki](1-x/home) -------------------------------------------------------------------------------- /packages/angular_devkit/architect/builders/noop-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "type": "object" 4 | } -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection/index.js: -------------------------------------------------------------------------------- 1 | exports.default = (options) => tree => tree.create(options.name || 'empty-file', ''); 2 | -------------------------------------------------------------------------------- /packages/schematics/angular/interface/files/__name@dasherize____type__.ts.template: -------------------------------------------------------------------------------- 1 | export interface <%= prefix %><%= classify(name) %> { 2 | } 3 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /packages/schematics/schematics/blank/project-files/__dot__npmignore.template: -------------------------------------------------------------------------------- 1 | # Ignores TypeScript files, but keeps definitions. 2 | *.ts 3 | !*.d.ts 4 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/src/environments/environment.prod.ts.template: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.component.html.template: -------------------------------------------------------------------------------- 1 |

<%= dasherize(name) %> works!

2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/legacy-cli/e2e/assets/add-collection.tgz -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/images/spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/legacy-cli/e2e/assets/images/spectrum.png -------------------------------------------------------------------------------- /packages/angular_devkit/benchmark/src/test/fibonacci.js: -------------------------------------------------------------------------------- 1 | const fib = (n) => n > 1 ? fib(n - 1) + fib(n - 2) : n; 2 | console.log(fib(parseInt(process.argv[2]))); -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/src/styles.__style__.template: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-bad/index.js: -------------------------------------------------------------------------------- 1 | exports.default = (options) => tree => tree.create(options.name || 'empty-file-peer-bad', ''); 2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-good/index.js: -------------------------------------------------------------------------------- 1 | exports.default = (options) => tree => tree.create(options.name || 'empty-file-peer-good', ''); 2 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "empty-app", 3 | "version": "0.0.1", 4 | "schematics": "./collection.json" 5 | } 6 | -------------------------------------------------------------------------------- /packages/angular/cli/bin/postinstall/script.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | require('./ng-update-message'); 5 | require('./analytics-prompt'); 6 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/e2e-long.md: -------------------------------------------------------------------------------- 1 | Must be executed from within a workspace directory. 2 | When a project name is not supplied, it will execute for all projects. -------------------------------------------------------------------------------- /packages/schematics/angular/e2e/e2e-long.md: -------------------------------------------------------------------------------- 1 | The e2e tests are created in a separate app in the `projects` folder of the workspace, 2 | next to the project being tested. -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/legacy-cli/e2e/assets/1.0-project/src/favicon.ico -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/legacy-cli/e2e/assets/1.7-project/src/favicon.ico -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/legacy-cli/e2e/assets/7.0-project/src/favicon.ico -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/aotplugin.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "tsConfigPath": "./not/so/source/tsconfig.json", 3 | "mainPath": "app/main.jit.ts" 4 | } -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-72x72.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-96x96.png -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-base", 3 | "version": "1.1.0", 4 | "description": "Tests" 5 | } 6 | -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-128x128.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-144x144.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-152x152.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-192x192.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-384x384.png -------------------------------------------------------------------------------- /packages/angular/pwa/pwa/files/assets/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/angular/pwa/pwa/files/assets/icons/icon-512x512.png -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/Empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "projects": {} 5 | } -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-deep/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-deep", 3 | "extends": "extends-basic", 4 | "schematics": {} 5 | } 6 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/angular_devkit/build_angular/hello-world-app/src/favicon.ico -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/spectrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/tests/angular_devkit/build_angular/hello-world-app/src/spectrum.png -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |

hello world

3 | lazy 4 | 5 |
6 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/help-long.md: -------------------------------------------------------------------------------- 1 | For help with individual commands, use the `--help` or `-h` option with the command. 2 | 3 | For example, 4 | 5 | ```sh 6 | ng help serve 7 | ``` 8 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/src/favicon.ico.template: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodAffection/angular-cli/master/packages/schematics/angular/application/files/src/favicon.ico.template -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |

hello world

3 | lazy 4 | 5 |
6 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/npm-audit.ts: -------------------------------------------------------------------------------- 1 | import { npm } from '../../utils/process'; 2 | 3 | 4 | export default async function() { 5 | try { 6 | await npm('audit'); 7 | } catch {} 8 | } 9 | -------------------------------------------------------------------------------- /packages/schematics/schematics/blank/project-files/src/collection.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json", 3 | "schematics": { 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-peer-dependencies-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-peer-dependencies-1", 3 | "version": "1.1.0", 4 | "description": "Tests" 5 | } 6 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "ng-add": { 4 | "factory": "./index.js", 5 | "description": "Add empty file to your application." 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/Extensions1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": {} 6 | } -------------------------------------------------------------------------------- /packages/schematics/angular/workspace/files/angular.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "<%= newProjectRoot %>", 5 | "projects": {} 6 | } -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/files/src/my-full-schematic/files/test2: -------------------------------------------------------------------------------- 1 | 2 | <% if (name) { %> 3 | Hello <%= name %>, I'm a schematic. 4 | <% } else { %> 5 | Why don't you give me your name with --name? 6 | <% } %> 7 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/test-long.md: -------------------------------------------------------------------------------- 1 | Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file. 2 | When a project name is not supplied, it will execute for all projects. -------------------------------------------------------------------------------- /packages/angular_devkit/benchmark/src/test/test-script.js: -------------------------------------------------------------------------------- 1 | console.log("stdout start"); 2 | console.error("stderr start"); 3 | 4 | setTimeout(() => { 5 | console.log("stdout end"); 6 | console.error("stderr end"); 7 | }, 1000); 8 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/browserslist: -------------------------------------------------------------------------------- 1 | # We want to run tests large with ever green browser so that 2 | # we never trigger differential loading as this will slow down the tests. 3 | 4 | last 2 Chrome versions -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/file-task.js: -------------------------------------------------------------------------------- 1 | function default_1() { 2 | return async () => { 3 | throw new Error('task exception'); 4 | } 5 | } 6 | 7 | exports.default = default_1; -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-bad/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "ng-add": { 4 | "factory": "./index.js", 5 | "description": "Add empty file to your application." 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-good/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "ng-add": { 4 | "factory": "./index.js", 5 | "description": "Add empty file to your application." 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-migrations/migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "1": { 4 | "factory": "./v1_5.js", 5 | "version": "1.5", 6 | "description": "Test." 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Don't ignore node_modules, this project is not meant to be installed. 2 | # Also, ~ import path in styles does only looks in the first node_modules found. 3 | # /node_modules 4 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-multiple/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-multiple", 3 | "extends": [ 4 | "extends-basic", 5 | "extends-replace" 6 | ], 7 | "schematics": {} 8 | } 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-bad/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "add-collection-peer-bad", 3 | "version": "0.0.1", 4 | "schematics": "./collection.json", 5 | "peerDependencies": { 6 | "typescript": "2.x" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/help/help-option-command.ts: -------------------------------------------------------------------------------- 1 | import {silentNg} from '../../../utils/process'; 2 | 3 | 4 | export default function() { 5 | return Promise.resolve() 6 | .then(() => silentNg('--help', 'build')); 7 | } 8 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/add-collection-peer-good/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "add-collection-peer-good", 3 | "version": "0.0.1", 4 | "schematics": "./collection.json", 5 | "peerDependencies": { 6 | "@angular/cli": "*" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/works/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "works", 3 | "schematics": { 4 | "schematic1": { 5 | "description": "1", 6 | "factory": "../null-factory" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-migrations/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-migrations", 3 | "version": "1.6.0", 4 | "description": "Tests", 5 | "ng-update": { 6 | "migrations": "./migrations.json" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ProjectEmpty.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "projects": { 5 | "my-app": { 6 | "root": "projects/my-app" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../../../../../../node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "../../dist/lib", 4 | "lib": { 5 | "entryFile": "src/public-api.ts" 6 | } 7 | } -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lib", 3 | "version": "0.0.1", 4 | "peerDependencies": { 5 | "@angular/common": "^6.0.0-rc.0 || ^6.0.0", 6 | "@angular/core": "^6.0.0-rc.0 || ^6.0.0" 7 | } 8 | } -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/file-tasks/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "file-tasks", 3 | "schematics": { 4 | "schematic-1": { 5 | "description": "1", 6 | "factory": "./factory" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /packages/schematics/angular/web-worker/files/worker/__name@dasherize__.worker.ts.template: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | addEventListener('message', ({ data }) => { 4 | const response = `worker response to ${data}`; 5 | postMessage(response); 6 | }); 7 | -------------------------------------------------------------------------------- /packages/angular/cli/plugins/karma.js: -------------------------------------------------------------------------------- 1 | throw new Error( 2 | 'In Angular CLI >6.0 the Karma plugin is now exported by "@angular-devkit/build-angular" instead.\n' 3 | + 'Please replace "@angular/cli" with "@angular-devkit/build-angular" in your "karma.conf.js" file.' 4 | ); 5 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/injectable.ts: -------------------------------------------------------------------------------- 1 | import {Injectable, Inject} from '@angular/core'; 2 | import {DOCUMENT} from '@angular/common'; 3 | 4 | 5 | @Injectable() 6 | export class MyInjectable { 7 | constructor(@Inject(DOCUMENT) public doc) {} 8 | } 9 | -------------------------------------------------------------------------------- /scripts/templates/user-analytics-table.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | %>| Id | Flag | Type | 3 | |:---:|:---|:---| 4 | <% for (const flag of flags) { 5 | if (flag === undefined) { 6 | continue; 7 | } 8 | %>| <%= flag.userAnalytics %> | `<%= flag.name %>` | `<%= flag.type %>` | 9 | <%}%> 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/main.ts: -------------------------------------------------------------------------------- 1 | import 'core-js/proposals/reflect-metadata'; 2 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 3 | import {AppModule} from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-peer-dependencies-angular-5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-peer-dependencies-angular-5", 3 | "version": "1.0.0", 4 | "description": "Tests", 5 | "peerDependencies": { 6 | "@angular/core": "^5.0.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/_/benchmark/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './benchmark'; 9 | -------------------------------------------------------------------------------- /packages/schematics/angular/library/files/package.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= dasherize(packageName) %>", 3 | "version": "0.0.1", 4 | "peerDependencies": { 5 | "@angular/common": "^<%= angularLatestVersion %>", 6 | "@angular/core": "^<%= angularLatestVersion %>" 7 | } 8 | } -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "types": [] 6 | }, 7 | "exclude": [ 8 | "test.ts", 9 | "**/*.spec.ts" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # JS and TS files must always use LF for tools to work 5 | *.js eol=lf 6 | *.ts eol=lf 7 | *.json eol=lf 8 | *.css eol=lf 9 | *.scss eol=lf 10 | *.less eol=lf 11 | *.html eol=lf 12 | *.svg eol=lf 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ObjectReplace2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": {}, 11 | "x-bar": 5, 12 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ObjectReplace3.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": null, 11 | "x-bar": 5, 12 | } -------------------------------------------------------------------------------- /packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.ts.template: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | @Injectable({ 4 | providedIn: 'root' 5 | }) 6 | export class <%= classify(name) %>Service { 7 | 8 | constructor() { } 9 | } 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/help/help.ts: -------------------------------------------------------------------------------- 1 | import {silentNg} from '../../../utils/process'; 2 | 3 | 4 | export default function() { 5 | return Promise.resolve() 6 | .then(() => silentNg('help')) 7 | .then(() => process.chdir('/')) 8 | .then(() => silentNg('help')); 9 | } 10 | -------------------------------------------------------------------------------- /packages/_/devkit/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "package": { 4 | "factory": "./package/factory", 5 | "schema": "./package/schema.json", 6 | "description": "Create an empty schematic project or add a blank schematic to the current project." 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/angular/pwa/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "ng-add": { 4 | "factory": "./pwa", 5 | "description": "Update an application with PWA defaults.", 6 | "schema": "./pwa/schema.json", 7 | "private": true, 8 | "hidden": true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/schematics/angular/library/files/ng-package.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "<%= relativePathToWorkspaceRoot %>/node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "<%= relativePathToWorkspaceRoot %>/<%= distRoot %>", 4 | "lib": { 5 | "entryFile": "src/<%= entryFile %>.ts" 6 | } 7 | } -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/app/main.jit.ts: -------------------------------------------------------------------------------- 1 | import 'core-js/proposals/reflect-metadata'; 2 | import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; 3 | import {AppModule} from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-peer-dependencies-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-peer-dependencies-2", 3 | "version": "1.1.0", 4 | "description": "Tests", 5 | "peerDependencies": { 6 | "@angular-devkit-tests/update-peer-dependencies-2": "1.0.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.bazelrc: -------------------------------------------------------------------------------- 1 | # Make TypeScript compilation fast, by keeping a few copies of the compiler 2 | # running as daemons, and cache SourceFile AST's to reduce parse time. 3 | build --strategy=TypeScriptCompile=worker 4 | 5 | # Performance: avoid stat'ing input files 6 | build --watchfs 7 | 8 | test --test_output=errors 9 | -------------------------------------------------------------------------------- /packages/schematics/angular/library/files/src/__entryFile__.ts.template: -------------------------------------------------------------------------------- 1 | /* 2 | * Public API Surface of <%= dasherize(name) %> 3 | */ 4 | 5 | export * from './lib/<%= dasherize(name) %>.service'; 6 | export * from './lib/<%= dasherize(name) %>.component'; 7 | export * from './lib/<%= dasherize(name) %>.module'; 8 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-basic-string/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-basic-string", 3 | "extends": "works", 4 | "schematics": { 5 | "schematic2": { 6 | "description": "2", 7 | "factory": "../null-factory" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types":[ 8 | "jasmine", 9 | "node" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/help/help-option.ts: -------------------------------------------------------------------------------- 1 | import {silentNg} from '../../../utils/process'; 2 | 3 | 4 | export default function() { 5 | return Promise.resolve() 6 | .then(() => silentNg('--help')) 7 | .then(() => process.chdir('/')) 8 | .then(() => silentNg('--help')); 9 | } 10 | -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | # `/tests` Folder 2 | 3 | Contains all e2e tests and test assets. 4 | 5 | ## `legacy-cli/` 6 | 7 | Contains all assets and all e2e tests from the legacy CLI repo. 8 | 9 | ## Others 10 | 11 | Other folders contain test assets related to the Package namespace folders matching their name. 12 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "types": [] 7 | }, 8 | "exclude": [ 9 | "test.ts", 10 | "**/*.spec.ts" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-circular/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-circular", 3 | "extends": "extends-circular", 4 | "schematics": { 5 | "schematic2": { 6 | "description": "2", 7 | "factory": "../null-factory" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app'; 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_ng_packagr/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './build'; 10 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/node/experimental/jobs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './job-registry'; 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayReplace2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": [] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/tasks/tslint-fix/test/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "custom-rule": { 4 | "description": ".", 5 | "factory": "./custom-rule" 6 | }, 7 | "run-task": { 8 | "description": ".", 9 | "factory": "./run-task" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/testing/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './schematic-test-runner'; 9 | -------------------------------------------------------------------------------- /packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template: -------------------------------------------------------------------------------- 1 | import { Directive } from '@angular/core'; 2 | 3 | @Directive({ 4 | selector: '[<%= selector %>]' 5 | }) 6 | export class <%= classify(name) %>Directive { 7 | 8 | constructor() { } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/basic-app/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | mode: 'development', 5 | entry: path.resolve(__dirname, './src/main.js'), 6 | output: { 7 | path: path.resolve(__dirname, './dist'), 8 | filename: 'bundle.js' 9 | } 10 | }; 11 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-basic/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-basic", 3 | "extends": [ 4 | "works" 5 | ], 6 | "schematics": { 7 | "schematic2": { 8 | "description": "2", 9 | "factory": "../null-factory" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, element, by } from 'protractor'; 2 | 3 | export class OneOhProjectPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /etc/rules/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This tsconfig is to help only build the tslint rules instead of the whole project. Makes 3 | // things faster. 4 | "extends": "../tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "../../dist/etc/rules", 7 | "baseUrl": "" 8 | }, 9 | "exclude": [ 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/node/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './node-modules-architect-host'; 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/exception/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './exception'; 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'app works!'; 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayPop.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArraySplice1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ObjectReplace1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "replacement": true 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/schematics/angular/class/files/__name@dasherize____type__.spec.ts.template: -------------------------------------------------------------------------------- 1 | import { <%= classify(name) %> } from './<%= dasherize(name) %><%= type %>'; 2 | 3 | describe('<%= classify(name) %>', () => { 4 | it('should create an instance', () => { 5 | expect(new <%= classify(name) %>()).toBeTruthy(); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-replace/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-replace", 3 | "extends": [ 4 | "works" 5 | ], 6 | "schematics": { 7 | "schematic1": { 8 | "description": "replaced", 9 | "factory": "../null-factory" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "baseUrl": "", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.css'] 7 | }) 8 | export class AppComponent { 9 | title = 'seven-oh-project'; 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/injectable.ts: -------------------------------------------------------------------------------- 1 | import {Injectable, Inject, ViewContainerRef} from '@angular/core'; 2 | import {DOCUMENT} from '@angular/common'; 3 | 4 | 5 | @Injectable() 6 | export class MyInjectable { 7 | constructor(public viewContainer: ViewContainerRef, @Inject(DOCUMENT) public doc) {} 8 | } 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_ng_packagr/builders.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../architect/src/builders-schema.json", 3 | "builders": { 4 | "build": { 5 | "implementation": "./src/build", 6 | "schema": "./src/build/schema.json", 7 | "description": "Build a library with ng-packagr." 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayDeleteLast.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayShift.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-circular-deep/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-circular-deep", 3 | "extends": "extends-circular-multiple", 4 | "schematics": { 5 | "schematic2": { 6 | "description": "2", 7 | "factory": "../null-factory" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/generate-name-error.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../utils/process'; 2 | import {expectToFail} from '../../utils/utils'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => expectToFail(() => 8 | ng('generate', 'component', '1my-component'))); 9 | } 10 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayDeleteInner.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayDeleteZero.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArraySort.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["awesome", "good", "great"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/Retain.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 10, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/files/__dot__gitignore: -------------------------------------------------------------------------------- 1 | # Outputs 2 | src/**/*.js 3 | src/**/*.js.map 4 | src/**/*.d.ts 5 | 6 | # IDEs 7 | .idea/ 8 | jsconfig.json 9 | .vscode/ 10 | 11 | # Misc 12 | node_modules/ 13 | npm-debug.log* 14 | yarn-error.log* 15 | 16 | # Mac OSX Finder files. 17 | **/.DS_Store 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/app/app.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | background-color: blue; 3 | } 4 | 5 | // @ifdef DEBUG 6 | :host::before { 7 | content: 'DEBUG_ONLY'; 8 | } 9 | // @endif 10 | 11 | // @ifndef DEBUG 12 | :host::before { 13 | content: 'PRODUCTION_ONLY'; 14 | } 15 | // @endif 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/no-implicit-any.ts: -------------------------------------------------------------------------------- 1 | import {updateTsConfig} from '../../utils/project'; 2 | import {ng} from '../../utils/process'; 3 | 4 | 5 | export default function() { 6 | return updateTsConfig(json => { 7 | json['compilerOptions']['noImplicitAny'] = true; 8 | }) 9 | .then(() => ng('build')); 10 | } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*.ts] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | insert_final_newline = true 10 | spaces_around_brackets = inside 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | insert_final_newline = false 15 | trim_trailing_whitespace = true 16 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-jit-polyfills.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import 'core-js/es/reflect'; 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayDeleteLastAdd.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "new"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayIndexInner.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "value", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayIndexLast.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "value"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayIndexZero.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["value", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayReplace1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": [ 12 | "value" 13 | ] 14 | }, 15 | "x-bar": 5, 16 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/Extensions2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "schematics": { 6 | "@schematics/angular:component": { 7 | "prefix": "app" 8 | } 9 | }, 10 | "projects": {} 11 | } -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extra-properties/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extra-properties", 3 | "schematics": { 4 | "schematic1": { 5 | "description": "1", 6 | "factory": "./factory", 7 | "extra": "extra-schematic" 8 | } 9 | }, 10 | "extra": "extra-collection" 11 | } 12 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/transforms.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export type ExecutionTransformer = (input: T) => T | Promise; 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayDeleteInnerAdd.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "new", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayPush.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome", "value"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayUnshift.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["value", "good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/src/workflow/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './base'; 9 | export * from './interface'; 10 | -------------------------------------------------------------------------------- /packages/schematics/schematics/blank/project-files/__dot__gitignore.template: -------------------------------------------------------------------------------- 1 | # Outputs 2 | src/**/*.js 3 | src/**/*.js.map 4 | src/**/*.d.ts 5 | 6 | # IDEs 7 | .idea/ 8 | jsconfig.json 9 | .vscode/ 10 | 11 | # Misc 12 | node_modules/ 13 | npm-debug.log* 14 | yarn-error.log* 15 | 16 | # Mac OSX Finder files. 17 | **/.DS_Store 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/generate-error.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../utils/process'; 2 | import {deleteFile} from '../../utils/fs'; 3 | import {expectToFail} from '../../utils/utils'; 4 | 5 | export default function() { 6 | return deleteFile('angular.json') 7 | .then(() => expectToFail(() => ng('generate', 'class', 'hello'))); 8 | } 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 2 | 3 | Please help us process issues more efficiently by filing an 4 | issue using one of the following templates: 5 | 6 | https://github.com/angular/angular-cli/issues/new/choose 7 | 8 | Thank you! 9 | 10 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/models/jit-polyfills.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import 'core-js/proposals/reflect-metadata'; 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/_/benchmark/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@_/benchmark", 3 | "version": "0.0.0", 4 | "description": "CLI tool for Angular", 5 | "main": "src/index.js", 6 | "typings": "src/index.d.ts", 7 | "scripts": { 8 | "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" 9 | }, 10 | "private": true 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/config-file-fallback.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../utils/process'; 2 | import {moveFile} from '../../utils/fs'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => ng('build')) 8 | .then(() => moveFile('angular.json', '.angular.json')) 9 | .then(() => ng('build')); 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/plugins/karma.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | module.exports = require('../src/angular-cli-files/plugins/karma'); 10 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/node/experimental/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import * as jobs from './jobs'; 9 | 10 | export { 11 | jobs, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/AddArrayEmpty.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | "x-array": [] 15 | } -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArraySplice2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "value1", "value2", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | } -------------------------------------------------------------------------------- /packages/schematics/angular/utility/test/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './create-app-module'; 9 | export * from './get-file-content'; 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/pipe/pipe-module-fail.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {expectToFail} from '../../../utils/utils'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => expectToFail(() => 8 | ng('generate', 'pipe', 'test-pipe', '--module', 'app.moduleXXX.ts'))); 9 | } 10 | -------------------------------------------------------------------------------- /packages/_/devkit/package/project-files/__path__/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | // TODO: Make this useful (and awesome). 10 | export default 1; 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/terminal/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './text'; 9 | export * from './caps'; 10 | export * from './colors'; 11 | -------------------------------------------------------------------------------- /packages/schematics/angular/e2e/files/src/app.po.ts.template: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('<%= rootSelector %> h1')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/add/dir.ts: -------------------------------------------------------------------------------- 1 | import { assetDir } from '../../../utils/assets'; 2 | import { expectFileToExist } from '../../../utils/fs'; 3 | import { ng } from '../../../utils/process'; 4 | 5 | 6 | export default async function () { 7 | await ng('add', assetDir('add-collection'), '--name=blah'); 8 | await expectFileToExist('blah'); 9 | } 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/directive/directive-module-fail.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {expectToFail} from '../../../utils/utils'; 3 | 4 | export default function() { 5 | return Promise.resolve() 6 | .then(() => expectToFail(() => 7 | ng('generate', 'directive', 'test-directive', '--module', 'app.moduleXXX.ts'))); 8 | } 9 | -------------------------------------------------------------------------------- /etc/cli.angular.io/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "public": "", 4 | "ignore": [ 5 | "firebase.json", 6 | "README.md", 7 | "**/.*" 8 | ], 9 | "rewrites": [ 10 | { 11 | "source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg))", 12 | "destination": "/index.html" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/third_party/github.com/chalk/supports-color/LOCAL_MODS.md: -------------------------------------------------------------------------------- 1 | * Added check for `env.MSYSTEM` in windows case, see https://github.com/angular/angular-cli/commit/b8d4e19fc4209ff6a52b6e6a151927f6fe34b60e 2 | * require the locally vendored has-flag rather than npm package 3 | * support browser runtimes by mocking out the process object if it doesn't exist 4 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 |

hello world

3 | lazy 4 | 5 |
6 | 7 | 8 |

DEBUG_ONLY

9 | 10 | 11 | 12 |

PRODUCTION_ONLY

13 | 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/add/file.ts: -------------------------------------------------------------------------------- 1 | import { assetDir } from '../../../utils/assets'; 2 | import { expectFileToExist } from '../../../utils/fs'; 3 | import { ng } from '../../../utils/process'; 4 | 5 | 6 | export default async function () { 7 | await ng('add', assetDir('add-collection.tgz'), '--name=blah'); 8 | await expectFileToExist('blah'); 9 | } 10 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/update-help.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | 3 | export default function () { 4 | return Promise.resolve() 5 | .then(() => ng('update', '--help')) 6 | .then(({ stdout }) => { 7 | if (!/next/.test(stdout)) { 8 | throw 'Update help should contain "next" option'; 9 | } 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Outputs 2 | bazel-* 3 | test-project-host-* 4 | dist/ 5 | dist-schema/ 6 | 7 | # IDEs 8 | .idea/ 9 | jsconfig.json 10 | .vscode/ 11 | 12 | # Typings file. 13 | typings/ 14 | 15 | # Misc 16 | coverage/ 17 | node_modules/ 18 | tmp/ 19 | npm-debug.log* 20 | yarn-error.log* 21 | .ng_pkg_build/ 22 | 23 | # Mac OSX Finder files. 24 | **/.DS_Store 25 | .DS_Store 26 | -------------------------------------------------------------------------------- /etc/api/angular_devkit/core/node/testing/index.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost { 2 | protected _root: Path; 3 | protected _sync: virtualFs.SyncDelegateHost; 4 | readonly files: Path[]; 5 | readonly root: Path; 6 | readonly sync: virtualFs.SyncDelegateHost; 7 | constructor(); 8 | } 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/experimental/workspace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './workspace'; 10 | export * from './workspace-schema'; 11 | -------------------------------------------------------------------------------- /packages/ngtools/webpack/src/type_checker_bootstrap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | require('../../../../lib/bootstrap-local'); 9 | require('./type_checker_worker.ts'); 10 | -------------------------------------------------------------------------------- /packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.spec.ts.template: -------------------------------------------------------------------------------- 1 | import { <%= classify(name) %>Pipe } from './<%= dasherize(name) %>.pipe'; 2 | 3 | describe('<%= classify(name) %>Pipe', () => { 4 | it('create an instance', () => { 5 | const pipe = new <%= classify(name) %>Pipe(); 6 | expect(pipe).toBeTruthy(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/schematics/angular/universal/files/src/__main@stripTsExtension__.ts.template: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | 3 | import { environment } from './environments/environment'; 4 | 5 | if (environment.production) { 6 | enableProdMode(); 7 | } 8 | 9 | export { <%= rootModuleClassName %> } from './app/<%= stripTsExtension(rootModuleFileName) %>'; 10 | -------------------------------------------------------------------------------- /packages/schematics/angular/workspace/files/__dot__editorconfig.template: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export const environment = { 9 | production: true 10 | }; 11 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/null-factory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export default function() { 10 | return () => {}; 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, ViewEncapsulation} from '@angular/core'; 2 | 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'], 8 | encapsulation: ViewEncapsulation.None 9 | }) 10 | export class AppComponent { } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_optimizer/src/_golden-api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './index'; 9 | export { default } from './build-optimizer/webpack-loader'; 10 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/src/engine/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './engine'; 9 | export * from './interface'; 10 | export * from './schematic'; 11 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export const environment = { 9 | production: true 10 | }; 11 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-circular-middle/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-circular-middle", 3 | "extends": [ 4 | "extends-multiple", 5 | "extends-circular-multiple" 6 | ], 7 | "schematics": { 8 | "schematic2": { 9 | "description": "2", 10 | "factory": "../null-factory" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/barrel-file.ts: -------------------------------------------------------------------------------- 1 | import { replaceInFile, writeFile } from '../../utils/fs'; 2 | import { ng } from '../../utils/process'; 3 | 4 | export default async function() { 5 | await writeFile('src/app/index.ts', `export { AppModule } from './app.module';`); 6 | await replaceInFile('src/main.ts', './app/app.module', './app'); 7 | await ng('build'); 8 | } 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/component/component-module-fail.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {expectToFail} from '../../../utils/utils'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => expectToFail(() => 8 | ng('generate', 'component', 'test-component', '--module', 'app.moduleXXX.ts'))); 9 | } 10 | -------------------------------------------------------------------------------- /docs/documentation/help.md: -------------------------------------------------------------------------------- 1 | 2 | **Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/help)**. 3 | 4 | 5 | # ng help 6 | 7 | ## Overview 8 | Help. 9 | 10 | ## Options 11 | None. 12 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/AddArrayPush.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | "x-array": [ 15 | "value" 16 | ] 17 | } -------------------------------------------------------------------------------- /packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template: -------------------------------------------------------------------------------- 1 | import { Pipe, PipeTransform } from '@angular/core'; 2 | 3 | @Pipe({ 4 | name: '<%= camelize(name) %>' 5 | }) 6 | export class <%= classify(name) %>Pipe implements PipeTransform { 7 | 8 | transform(value: any, ...args: any[]): any { 9 | return null; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/extends-circular-multiple/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "extends-circular-multiple", 3 | "extends": [ 4 | "extends-multiple", 5 | "extends-circular-middle" 6 | ], 7 | "schematics": { 8 | "schematic2": { 9 | "description": "2", 10 | "factory": "../null-factory" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/lint-long.md: -------------------------------------------------------------------------------- 1 | Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file. 2 | When a project name is not supplied, it will execute for all projects. 3 | 4 | The default linting tool is [TSLint](https://palantir.github.io/tslint/), and the default configuration is specified in the project's `tslint.json` file. -------------------------------------------------------------------------------- /packages/angular_devkit/architect/builders/true.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { createBuilder } from '../src'; 9 | 10 | export default createBuilder(() => ({ success: true })); 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/virtual-fs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './path'; 9 | 10 | import * as virtualFs from './host/index'; 11 | export { virtualFs }; 12 | -------------------------------------------------------------------------------- /packages/schematics/angular/library/library-long.md: -------------------------------------------------------------------------------- 1 | A library is a type of project that does not run independently. 2 | The library skeleton created by this command is placed by default in the `/projects` folder, and has `type` of "library". 3 | 4 | You can build a new library using the `ng build` command, run unit tests for it using the `ng test` command, 5 | and lint it using the `ng lint` command. -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-package-group-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-package-group-1", 3 | "version": "1.2.0", 4 | "description": "Tests", 5 | "ng-update": { 6 | "packageGroup": { 7 | "@angular-devkit-tests/update-package-group-1": "", 8 | "@angular-devkit-tests/update-package-group-2": "^2" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-package-group-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-package-group-2", 3 | "version": "2.0.0", 4 | "description": "Tests", 5 | "ng-update": { 6 | "packageGroup": { 7 | "@angular-devkit-tests/update-package-group-1": "^1", 8 | "@angular-devkit-tests/update-package-group-2": "" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/schematics/angular/e2e/files/tsconfig.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/aliases/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aliases", 3 | "schematics": { 4 | "schematic1": { 5 | "aliases": ["alias1"], 6 | "description": "1", 7 | "factory": "../null-factory" 8 | }, 9 | "schematic2": { 10 | "description": "2", 11 | "factory": "../null-factory" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/module-id.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { replaceInFile } from '../../utils/fs'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => replaceInFile('src/app/app.component.ts', 8 | '@Component({', 9 | '@Component({ moduleId: module.id,')) 10 | .then(() => ng('build')); 11 | } 12 | -------------------------------------------------------------------------------- /packages/schematics/angular/universal/files/root/__tsconfigFileName__.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./<%= tsConfigExtends %>", 3 | "compilerOptions": { 4 | "outDir": "<%= outDir %>-server" 5 | }, 6 | "angularCompilerOptions": { 7 | "entryModule": "./<%= rootInSrc ? '' : 'src/' %><%= appDir %>/<%= stripTsExtension(rootModuleFileName) %>#<%= rootModuleClassName %>" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/new/new-routing.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {createProject} from '../../../utils/project'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => createProject('routing-project', '--routing')) 8 | 9 | // Try to run the unit tests. 10 | .then(() => ng('test', '--watch=false')); 11 | } 12 | -------------------------------------------------------------------------------- /packages/README.md: -------------------------------------------------------------------------------- 1 | # `/packages` Folder 2 | 3 | This folder is the root of all defined packages in this repository. 4 | 5 | Packages that are marked as `private: true` will not be published to NPM. These are limited to the 6 | `_` subfolder. 7 | 8 | This folder includes a directory for every scope in NPM, without the `@` sign. Then one folder 9 | per package, which contains the `package.json`. 10 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/testing/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './testing-architect-host'; 9 | export * from './test-project-host'; 10 | export * from './test-logger'; 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/src/_golden-api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './index'; 10 | 11 | export * from './formats/index'; 12 | 13 | export * from './workflow/index'; 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/config/config-set-serve-port.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToMatch } from '../../../utils/fs'; 2 | import { ng } from '../../../utils/process'; 3 | 4 | export default function() { 5 | return Promise.resolve() 6 | .then(() => ng('config', 'projects.test-project.architect.serve.options.port', '1234')) 7 | .then(() => expectFileToMatch('angular.json', /"port": 1234/)); 8 | } 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/new/new-skip-tests.ts: -------------------------------------------------------------------------------- 1 | import {createProject} from '../../../utils/project'; 2 | import {expectFileNotToExist} from '../../../utils/fs'; 3 | 4 | 5 | export default function() { 6 | return Promise.resolve() 7 | .then(() => createProject('new-project-skip-tests', '--skip-tests')) 8 | .then(() => expectFileNotToExist('src/app/app.component.spec.ts')); 9 | } 10 | -------------------------------------------------------------------------------- /docs/documentation/version.md: -------------------------------------------------------------------------------- 1 | 2 | **Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/version)**. 3 | 4 | # ng version 5 | 6 | ## Overview 7 | Outputs Angular CLI version. 8 | 9 | ## Options 10 | None. 11 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/easter-egg.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/easter-egg.json", 4 | "description": "", 5 | "$longDescription": "", 6 | "$hidden": true, 7 | 8 | "$impl": "./easter-egg-impl#AwesomeCommand", 9 | 10 | "type": "object", 11 | "allOf": [ 12 | { "$ref": "./definitions.json#/definitions/base" } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit/architect", 3 | "version": "0.0.0", 4 | "description": "Angular Build Facade", 5 | "experimental": true, 6 | "main": "src/index.js", 7 | "typings": "src/index.d.ts", 8 | "dependencies": { 9 | "@angular-devkit/core": "0.0.0", 10 | "rxjs": "6.4.0" 11 | }, 12 | "builders": "./builders/builders.json" 13 | } 14 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "test.ts", 12 | "polyfills.ts" 13 | ], 14 | "include": [ 15 | "**/*.spec.ts", 16 | "**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-migrations-external/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-migrations-external", 3 | "version": "1.6.0", 4 | "description": "Tests", 5 | "ng-update": { 6 | "migrations": "@angular-devkit-tests/update-migrations/migrations.json" 7 | }, 8 | "dependencies": { 9 | "@angular-devkit-tests/update-migrations": "1.6.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /docs/documentation/add.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/add).** 4 | 5 | # ng add 6 | 7 | ## Overview 8 | Add support for a library to your project. 9 | 10 | ## Options 11 | None. 12 | -------------------------------------------------------------------------------- /docs/documentation/eject.md: -------------------------------------------------------------------------------- 1 | 2 | **Documentation below is for CLI version 6 and we no longer accept PRs to improve this.**. 3 | 4 | # ng eject 5 | 6 | ## Overview 7 | Temporarily disabled. Ejects your app and output the proper webpack configuration and scripts. 8 | 9 | ## Options 10 | None. 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/json/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './interface'; 9 | export * from './parser'; 10 | 11 | import * as schema from './schema/index'; 12 | export { schema }; 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/third_party/github.com/sindresorhus/has-flag/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = (flag, argv) => { 3 | argv = argv || process.argv; 4 | const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); 5 | const pos = argv.indexOf(prefix + flag); 6 | const terminatorPos = argv.indexOf('--'); 7 | return pos !== -1 && (terminatorPos === -1 || pos < terminatorPos); 8 | }; 9 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/invalid-aliases/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "invalid-aliases", 3 | "schematics": { 4 | "schematic1": { 5 | "aliases": ["schematic2"], 6 | "description": "1", 7 | "factory": "../null-factory" 8 | }, 9 | "schematic2": { 10 | "description": "2", 11 | "factory": "../null-factory" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OneOhProject 6 | 7 | 8 | 9 | 10 | 11 | 12 | Loading... 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('latest-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LatestProject 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | const routes: Routes = [{ path: 'lazy', loadChildren: './lazy/lazy.module#LazyModule' }]; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes)], 8 | exports: [RouterModule] 9 | }) 10 | export class AppRoutingModule { } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SevenOhProject 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './api'; 9 | export { Architect, ScheduleOptions } from './architect'; 10 | export { createBuilder } from './create-builder'; 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/utils/array.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export function clean(array: Array): Array { 10 | return array.filter(x => x !== undefined) as Array; 11 | } 12 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/AddProject1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 10, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | "projects": { 15 | "new": { 16 | "root": "src" 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.spec.ts.template: -------------------------------------------------------------------------------- 1 | import { <%= classify(name) %>Directive } from './<%= dasherize(name) %>.directive'; 2 | 3 | describe('<%= classify(name) %>Directive', () => { 4 | it('should create an instance', () => { 5 | const directive = new <%= classify(name) %>Directive(); 6 | expect(directive).toBeTruthy(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-migrations/v1_5.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | exports.default = function() { 9 | return function(tree) { 10 | tree.create('/version1_5', ''); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/add.md: -------------------------------------------------------------------------------- 1 | Adds the npm package for a published library to your workspace, and configures your default 2 | app project to use that library, in whatever way is specified by the library's schematic. 3 | For example, adding `@angular/pwa` configures your project for PWA support: 4 | ```bash 5 | ng add @angular/pwa 6 | ``` 7 | 8 | The default app project is the value of `defaultProject` in `angular.json`. 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/src/tree/empty.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { HostTree } from './host-tree'; 9 | 10 | 11 | export class EmptyTree extends HostTree { 12 | constructor() { super(); } 13 | } 14 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HelloWorldApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | /* SystemJS module definition */ 9 | declare var module: NodeModule; 10 | interface NodeModule { 11 | id: string; 12 | } 13 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/aliases-many/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aliases-many", 3 | "schematics": { 4 | "schematic1": { 5 | "aliases": ["alias1", "alias2", "alias3"], 6 | "description": "1", 7 | "factory": "../null-factory" 8 | }, 9 | "schematic2": { 10 | "description": "2", 11 | "factory": "../null-factory" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/base-href.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { expectFileToMatch } from '../../utils/fs'; 3 | 4 | 5 | export default function() { 6 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 7 | 8 | return ng('build', '--base-href', '/myUrl') 9 | .then(() => expectFileToMatch('dist/test-project/index.html', //)); 10 | } 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/4-security-issue-disclosure.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: ⚠️Security issue disclosure 3 | about: Report a security issue in Angular Framework, Material, or CLI 4 | 5 | --- 6 | 7 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 8 | 9 | Please read https://angular.io/guide/security#report-issues on how to disclose security related issues. 10 | 11 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 12 | -------------------------------------------------------------------------------- /packages/schematics/angular/web-worker/files/worker-tsconfig/tsconfig.worker.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/worker", 5 | "lib": [ 6 | "es2018", 7 | "webworker" 8 | ], 9 | "types": [] 10 | }, 11 | "include": [ 12 | "src/**/*.worker.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule); 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "types": [ 8 | "jasmine", 9 | "node" 10 | ] 11 | }, 12 | "files": [ 13 | "test.ts" 14 | ], 15 | "include": [ 16 | "**/*.spec.ts", 17 | "**/*.d.ts" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/lazy/lazy-comp/lazy-comp.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-lazy-comp', 5 | templateUrl: './lazy-comp.component.html', 6 | styleUrls: ['./lazy-comp.component.css'] 7 | }) 8 | export class LazyCompComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/utils/env.ts: -------------------------------------------------------------------------------- 1 | const global: {[name: string]: any} = Object.create(null); 2 | 3 | 4 | export function setGlobalVariable(name: string, value: any) { 5 | global[name] = value; 6 | } 7 | 8 | export function getGlobalVariable(name: string): any { 9 | if (!(name in global)) { 10 | throw new Error(`Trying to access variable "${name}" but it's not defined.`); 11 | } 12 | return global[name]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/schematics/angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@schematics/angular", 3 | "version": "0.0.0", 4 | "description": "Schematics specific to Angular", 5 | "keywords": [ 6 | "blueprints", 7 | "code generation", 8 | "schematics" 9 | ], 10 | "schematics": "./collection.json", 11 | "dependencies": { 12 | "@angular-devkit/core": "0.0.0", 13 | "@angular-devkit/schematics": "0.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/unknown-configuration.ts: -------------------------------------------------------------------------------- 1 | import { ng } from "../../utils/process"; 2 | 3 | export default async function () { 4 | try { 5 | await ng('build', '--configuration', 'invalid'); 6 | throw new Error('should have failed.'); 7 | } catch (error) { 8 | if (!error.message.includes(`Configuration 'invalid' is not set in the workspace`)) { 9 | throw error; 10 | } 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /bin/ng: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** 3 | * @license 4 | * Copyright Google Inc. All Rights Reserved. 5 | * 6 | * Use of this source code is governed by an MIT-style license that can be 7 | * found in the LICENSE file at https://angular.io/license 8 | */ 9 | 'use strict'; 10 | 11 | 12 | require('../lib/bootstrap-local'); 13 | const packages = require('../lib/packages').packages; 14 | require(packages['@angular/cli'].bin['ng']); 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/main.ts: -------------------------------------------------------------------------------- 1 | import 'core-js/proposals/reflect-metadata'; 2 | import {platformDynamicServer, renderModule} from '@angular/platform-server'; 3 | import {AppModule} from './app.module'; 4 | 5 | AppModule.testProp = 'testing'; 6 | 7 | platformDynamicServer().bootstrapModule(AppModule); 8 | 9 | renderModule(AppModule, { 10 | document: '', 11 | url: '/' 12 | }); 13 | -------------------------------------------------------------------------------- /packages/angular/cli/utilities/INITIAL_COMMIT_MESSAGE.txt: -------------------------------------------------------------------------------- 1 | chore: initial commit from @angular/cli 2 | 3 | _ _ ____ _ ___ 4 | / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| 5 | / △ \ | '_ \ / _\` | | | | |/ _\` | '__| | | | | | | 6 | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | 7 | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| 8 | |___/ 9 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/logger/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './indent'; 9 | export * from './level'; 10 | export * from './logger'; 11 | export * from './null-logger'; 12 | export * from './transform-logger'; 13 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/aliases-dupe/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aliases-dupe", 3 | "schematics": { 4 | "schematic1": { 5 | "aliases": ["alias1", "alias2", "alias3", "alias1", "alias2"], 6 | "description": "1", 7 | "factory": "../null-factory" 8 | }, 9 | "schematic2": { 10 | "description": "2", 11 | "factory": "../null-factory" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { OneOhProjectPage } from './app.po'; 2 | 3 | describe('one-oh-project App', () => { 4 | let page: OneOhProjectPage; 5 | 6 | beforeEach(() => { 7 | page = new OneOhProjectPage(); 8 | }); 9 | 10 | it('should display message saying app works', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('app works!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "app", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "app", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/angular_devkit/architect/builders/false.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { createBuilder } from '../src'; 9 | 10 | export default createBuilder(() => ({ 11 | success: false, 12 | error: 'False builder always errors.', 13 | })); 14 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/json/test/cases/ArrayValues.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | // Comment 4 | "schematics": { 5 | "@angular/schematics:component": { 6 | "prefix": "abc" 7 | } 8 | }, 9 | "x-baz": 1, 10 | "x-foo": { 11 | "is": ["good", "great", "awesome"] 12 | }, 13 | "x-bar": 5, 14 | "x-array": [ 15 | 5, 16 | "a", 17 | false, 18 | null, 19 | true, 20 | 9.9 21 | ] 22 | } -------------------------------------------------------------------------------- /packages/schematics/angular/library/files/tsconfig.spec.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts" 12 | ], 13 | "include": [ 14 | "**/*.spec.ts", 15 | "**/*.d.ts" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/tsconfig.server.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist-server", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ], 13 | "angularCompilerOptions": { 14 | "entryModule": "app/app.server.module#AppServerModule" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/angular_devkit/core/json/schema/serializers/0.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Person", 3 | "type": "object", 4 | "properties": { 5 | "firstName": { 6 | "type": "string" 7 | }, 8 | "lastName": { 9 | "type": "string" 10 | }, 11 | "age": { 12 | "description": "Age in years", 13 | "type": "integer", 14 | "minimum": 0 15 | } 16 | }, 17 | "required": ["firstName", "lastName"] 18 | } 19 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/invalid-aliases-2/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "invalid-aliases-2", 3 | "schematics": { 4 | "schematic1": { 5 | "aliases": ["alias1"], 6 | "description": "1", 7 | "factory": "../null-factory" 8 | }, 9 | "schematic2": { 10 | "aliases": ["alias1"], 11 | "description": "2", 12 | "factory": "../null-factory" 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/utils/version.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import * as semver from 'semver'; 3 | 4 | 5 | export function readNgVersion(): string { 6 | const packageJson: any = JSON.parse(fs.readFileSync('./node_modules/@angular/core/package.json', 'utf8')); 7 | return packageJson['version']; 8 | } 9 | 10 | export function ngVersionMatches(range: string): boolean { 11 | return semver.satisfies(readNgVersion(), range); 12 | } 13 | -------------------------------------------------------------------------------- /third_party/github.com/bazelbuild/bazel/src/main/protobuf/BUILD: -------------------------------------------------------------------------------- 1 | # Copyright Google Inc. All Rights Reserved. 2 | # 3 | # Use of this source code is governed by an MIT-style license that can be 4 | # found in the LICENSE file at https://angular.io/license 5 | package(default_visibility = ["//:__subpackages__"]) 6 | 7 | licenses(["notice"]) # Apache 2.0 8 | 9 | proto_library( 10 | name = "protobuf", 11 | srcs = glob(["*.proto"]), 12 | ) 13 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/version.json", 4 | "description": "Outputs Angular CLI version.", 5 | "$longDescription": "", 6 | 7 | "$aliases": [ "v" ], 8 | "$scope": "all", 9 | "$impl": "./version-impl#VersionCommand", 10 | 11 | "type": "object", 12 | "allOf": [ 13 | { "$ref": "./definitions.json#/definitions/base" } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/experimental.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import * as jobs from './experimental/jobs/index'; 9 | import * as workspace from './experimental/workspace/index'; 10 | 11 | export { 12 | jobs, 13 | workspace, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/schematics/angular/library/files/tslint.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tslint.json", 3 | "rules": { 4 | "directive-selector": [ 5 | true, 6 | "attribute", 7 | "<%= camelize(prefix) %>", 8 | "camelCase" 9 | ], 10 | "component-selector": [ 11 | true, 12 | "element", 13 | "<%= dasherize(prefix) %>", 14 | "kebab-case" 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/spec", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "baseUrl": "", 8 | "types": [ 9 | "jasmine", 10 | "node" 11 | ] 12 | }, 13 | "files": [ 14 | "test.ts" 15 | ], 16 | "include": [ 17 | "**/*.spec.ts", 18 | "**/*.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { AppModuleNgFactory } = require('./dist/app.main'); 3 | const { renderModuleFactory } = require('@angular/platform-server'); 4 | 5 | require('zone.js/dist/zone-node'); 6 | 7 | renderModuleFactory(AppModuleNgFactory, { 8 | url: '/', 9 | document: '' 10 | }).then(html => { 11 | fs.writeFileSync('dist/index.html', html); 12 | }) 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/basic/test.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { moveFile } from '../../utils/fs'; 3 | 4 | // tslint:disable:max-line-length 5 | export default function () { 6 | // make sure both --watch=false work 7 | return ng('test', '--watch=false') 8 | .then(() => moveFile('./karma.conf.js', './karma.conf.bis.js')) 9 | .then(() => ng('test', '--watch=false', '--karmaConfig=karma.conf.bis.js')); 10 | } 11 | -------------------------------------------------------------------------------- /docs/documentation/1-x/stories/autocompletion.md: -------------------------------------------------------------------------------- 1 | # Autocompletion 2 | 3 | To turn on auto completion use the following commands: 4 | 5 | For bash: 6 | ```bash 7 | ng completion --bash >> ~/.bashrc 8 | source ~/.bashrc 9 | ``` 10 | 11 | For zsh: 12 | ```bash 13 | ng completion --zsh >> ~/.zshrc 14 | source ~/.zshrc 15 | ``` 16 | 17 | Windows users using gitbash: 18 | ```bash 19 | ng completion --bash >> ~/.bash_profile 20 | source ~/.bash_profile 21 | ``` -------------------------------------------------------------------------------- /packages/angular_devkit/build_webpack/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './webpack'; 10 | export * from './webpack-dev-server'; 11 | 12 | export * from './plugins/architect'; 13 | 14 | export { EmittedFiles } from './utils'; 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/workspace/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './definitions'; 9 | export { WorkspaceHost, createWorkspaceHost } from './host'; 10 | export { WorkspaceFormat, readWorkspace, writeWorkspace } from './core'; 11 | -------------------------------------------------------------------------------- /packages/ngtools/webpack/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './angular_compiler_plugin'; 10 | export * from './interfaces'; 11 | export { ngcLoader as default } from './loader'; 12 | 13 | export const NgToolsLoader = __filename; 14 | -------------------------------------------------------------------------------- /packages/schematics/schematics/blank/schematic-files/src/__name@dasherize__/index.ts.template: -------------------------------------------------------------------------------- 1 | import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; 2 | 3 | 4 | // You don't have to export the function as default. You can also have more than one rule factory 5 | // per file. 6 | export function <%= camelize(name) %>(_options: any): Rule { 7 | return (tree: Tree, _context: SchematicContext) => { 8 | return tree; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular/cli/bin/postinstall/analytics-prompt.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | // This file is ES6 because it needs to be executed as is. 3 | 4 | if ('NG_CLI_ANALYTICS' in process.env) { 5 | return; 6 | } 7 | 8 | (async () => { 9 | try { 10 | const analytics = require('../../models/analytics'); 11 | 12 | if (!analytics.hasGlobalAnalyticsConfiguration()) { 13 | await analytics.promptGlobalAnalytics(); 14 | } 15 | } catch (_) {} 16 | })(); 17 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/update-long.md: -------------------------------------------------------------------------------- 1 | Perform a basic update to the current stable release of the core framework and CLI by running the following command. 2 | 3 | ``` 4 | ng update @angular/cli @angular/core 5 | ``` 6 | 7 | To update to the next beta or pre-release version, use the `--next=true` option. 8 | 9 | For detailed information and guidance on updating your application, see the interactive [Angular Update Guide](https://update.angular.io/). 10 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/src/index.html.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%= utils.classify(name) %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | <<%= prefix %>-root>-root> 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/files/src/my-full-schematic/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "id": "MyFullSchematicsSchema", 4 | "title": "My Full Schematics Schema", 5 | "type": "object", 6 | "properties": { 7 | "index": { 8 | "type": "number", 9 | "default": 1 10 | }, 11 | "name": { 12 | "type": "string" 13 | } 14 | }, 15 | "required": [ 16 | "name" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /bin/architect: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** 3 | * @license 4 | * Copyright Google Inc. All Rights Reserved. 5 | * 6 | * Use of this source code is governed by an MIT-style license that can be 7 | * found in the LICENSE file at https://angular.io/license 8 | */ 9 | 'use strict'; 10 | 11 | 12 | require('../lib/bootstrap-local'); 13 | const packages = require('../lib/packages').packages; 14 | require(packages['@angular-devkit/architect-cli'].bin['architect']); 15 | -------------------------------------------------------------------------------- /packages/schematics/angular/universal/files/src/app/__rootModuleFileName__.template: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { ServerModule } from '@angular/platform-server'; 3 | 4 | import { AppModule } from './app.module'; 5 | import { AppComponent } from './app.component'; 6 | 7 | @NgModule({ 8 | imports: [ 9 | AppModule, 10 | ServerModule, 11 | ], 12 | bootstrap: [AppComponent], 13 | }) 14 | export class <%= rootModuleClassName %> {} 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.log(err)); 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/add/add-material.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToMatch, rimraf } from '../../../utils/fs'; 2 | import { ng } from '../../../utils/process'; 3 | 4 | 5 | export default async function () { 6 | // forcibly remove in case another test doesn't clean itself up 7 | await rimraf('node_modules/@angular/material'); 8 | 9 | await ng('add', '@angular/material'); 10 | await expectFileToMatch('package.json', /@angular\/material/); 11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/6-angular-framework.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "⚡Angular Framework" 3 | about: Issues and feature requests for Angular Framework 4 | 5 | --- 6 | 7 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 8 | 9 | Please file any Angular Framework issues at: https://github.com/angular/angular/issues/new/choose 10 | 11 | For the time being, we keep Angular issues in a separate repository. 12 | 13 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 14 | -------------------------------------------------------------------------------- /scripts/templates/changelog-special-thanks.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | const counter = Object.create(null); 3 | 4 | for (const commit of commits) { 5 | const name = commit.authorName; 6 | if (name) { 7 | counter[name] = (counter[name] || 0) + 1; 8 | } 9 | } 10 | 11 | const sortedCount = [...Object.entries(counter)].sort((a, b) => b[1] - a[1]).map(x => x[0]); 12 | 13 | for (const count of sortedCount.join(', ')) { 14 | %><%= count[0] %><% 15 | } 16 | 17 | %> 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/experimental/bep.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { expectFileToMatch } from '../../utils/fs'; 3 | 4 | 5 | export default async function() { 6 | await ng('build', '--build-event-log', 'bep-log.txt'); 7 | 8 | await expectFileToMatch('bep-log.txt', '{"id":{"started":{}},"started":{"command":"build",'); 9 | await expectFileToMatch('bep-log.txt', '{"id":{"finished":{}},"finished":{"finish_time_millis":'); 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/lint/lint-with-non-project.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { expectToFail } from '../../utils/utils'; 3 | 4 | export default function () { 5 | // TODO(architect): Figure out how this test should look like post devkit/build-angular. 6 | return; 7 | 8 | return Promise.resolve() 9 | .then(() => ng('config', 'lint.0.files', '"src/app/**/*.ts"')) 10 | .then(() => expectToFail(() => ng('lint', 'app'))); 11 | } 12 | -------------------------------------------------------------------------------- /BUILD: -------------------------------------------------------------------------------- 1 | # Copyright Google Inc. All Rights Reserved. 2 | # 3 | # Use of this source code is governed by an MIT-style license that can be 4 | # found in the LICENSE file at https://angular.io/license 5 | package(default_visibility = ["//visibility:public"]) 6 | 7 | licenses(["notice"]) # MIT License 8 | 9 | exports_files([ 10 | "LICENSE", 11 | "tsconfig.json", # @external 12 | "tsconfig-test.json", # @external 13 | "tslint.base.json", # @external 14 | ]) 15 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/deprecated.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/deprecated.json", 4 | "description": "Deprecated in favor of config command.", 5 | "$longDescription": "", 6 | 7 | "$impl": "./deprecated-impl#DeprecatedCommand", 8 | "$hidden": true, 9 | "$type": "deprecated", 10 | 11 | "type": "object", 12 | "allOf": [ 13 | { "$ref": "./definitions.json#/definitions/base" } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/help.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/help.json", 4 | "description": "Lists available commands and their short descriptions.", 5 | "$longDescription": "./help-long.md", 6 | 7 | "$scope": "all", 8 | "$aliases": [], 9 | "$impl": "./help-impl#HelpCommand", 10 | 11 | "type": "object", 12 | "allOf": [ 13 | { "$ref": "./definitions.json#/definitions/base" } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // The file contents for the current environment will overwrite these during build. 2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do 3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. 4 | // The list of which env maps to which file can be found in `.angular-cli.json`. 5 | 6 | export const environment = { 7 | production: false 8 | }; 9 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/update-peer-dependencies-angular-5-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit-tests/update-peer-dependencies-angular-5-2", 3 | "version": "1.0.0", 4 | "description": "Tests", 5 | "peerDependencies": { 6 | "@angular/animations": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0", 7 | "@angular/compiler": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0", 8 | "@angular/platform-browser": ">= 1 < 5.0.0 || >= 5.0.0-rc.0 < 6.0.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/7-angular-material.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F48EAngular Material" 3 | about: Issues and feature requests for Angular Material 4 | 5 | --- 6 | 7 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 8 | 9 | Please file any Angular Material issues at: https://github.com/angular/material2/issues/new 10 | 11 | For the time being, we keep Angular Material issues in a separate repository. 12 | 13 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 14 | -------------------------------------------------------------------------------- /bin/build-optimizer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** 3 | * @license 4 | * Copyright Google Inc. All Rights Reserved. 5 | * 6 | * Use of this source code is governed by an MIT-style license that can be 7 | * found in the LICENSE file at https://angular.io/license 8 | */ 9 | 'use strict'; 10 | 11 | 12 | require('../lib/bootstrap-local'); 13 | const packages = require('../lib/packages').packages; 14 | require(packages['@angular-devkit/build-optimizer'].bin['build-optimizer']); 15 | -------------------------------------------------------------------------------- /packages/_/devkit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "devkit", 3 | "version": "0.0.0", 4 | "description": "Schematics specific to DevKit (used internally, not released)", 5 | "scripts": { 6 | "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" 7 | }, 8 | "schematics": "./collection.json", 9 | "private": true, 10 | "dependencies": { 11 | "@angular-devkit/core": "0.0.0", 12 | "@angular-devkit/schematics": "0.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/_/devkit/package/project-files/__path__/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= name %>", 3 | "version": "0.0.0", 4 | "description": "<%= description %>", 5 | "main": "src/index.js", 6 | "typings": "src/index.d.ts", 7 | "scripts": { 8 | "preinstall": "echo DO NOT INSTALL THIS PROJECT, ONLY THE ROOT PROJECT. && exit 1" 9 | }, 10 | "keywords": [ 11 | ], 12 | "license": "MIT", 13 | "dependencies": { 14 | "@angular-devkit/core": "0.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/tasks/run-schematic/options.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export const RunSchematicName = 'run-schematic'; 9 | 10 | export interface RunSchematicTaskOptions { 11 | collection: string | null; 12 | name: string; 13 | options: T; 14 | } 15 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | /* 9 | * Public API Surface of lib 10 | */ 11 | 12 | export * from './lib/lib.service'; 13 | export * from './lib/lib.component'; 14 | export * from './lib/lib.module'; 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/lazy/lazy.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { LazyRoutingModule } from './lazy-routing.module'; 5 | import { LazyCompComponent } from './lazy-comp/lazy-comp.component'; 6 | 7 | @NgModule({ 8 | declarations: [LazyCompComponent], 9 | imports: [ 10 | CommonModule, 11 | LazyRoutingModule 12 | ] 13 | }) 14 | export class LazyModule { } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/browserslist: -------------------------------------------------------------------------------- 1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | # 5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed 6 | 7 | > 0.5% 8 | last 2 versions 9 | Firefox ESR 10 | not dead 11 | not IE 9-11 -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/tsconfig.spec.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/schematics/schematics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@schematics/schematics", 3 | "version": "0.0.0", 4 | "description": "Schematics specific to Angular", 5 | "experimental": true, 6 | "keywords": [ 7 | "blueprints", 8 | "code generation", 9 | "schematics", 10 | "schematic" 11 | ], 12 | "schematics": "./collection.json", 13 | "dependencies": { 14 | "@angular-devkit/core": "0.0.0", 15 | "@angular-devkit/schematics": "0.0.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/lazy/lazy-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { LazyCompComponent } from './lazy-comp/lazy-comp.component'; 5 | 6 | 7 | const routes: Routes = [{ path: '', component: LazyCompComponent }]; 8 | 9 | @NgModule({ 10 | imports: [RouterModule.forChild(routes)], 11 | exports: [RouterModule] 12 | }) 13 | export class LazyRoutingModule { } 14 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, ViewEncapsulation} from '@angular/core'; 2 | import {MyInjectable} from './injectable'; 3 | 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: './app.component.html', 8 | styleUrls: ['./app.component.scss'], 9 | encapsulation: ViewEncapsulation.None 10 | }) 11 | export class AppComponent { 12 | constructor(public inj: MyInjectable) { 13 | console.log(inj); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tools/yarn/check-yarn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | 'use strict'; 10 | 11 | if (process.env.npm_execpath.indexOf('yarn') === -1) { 12 | throw new Error( 13 | 'Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/'); 14 | } 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/third_party/github.com/sindresorhus/has-flag/BUILD: -------------------------------------------------------------------------------- 1 | # TODO(alexeagle): move this file to /third_party so Bazel can enforce the licensing 2 | licenses(["notice"]) 3 | 4 | # Downloaded from: https://github.com/sindresorhus/has-flag/tree/a6208ceaf26b5e58dbd29cb4f9e62ad02034104d 5 | # Timestamp: 2019 Feb 14 6 | exports_files(["license"]) 7 | 8 | filegroup( 9 | name = "has-flag", 10 | srcs = ["index.js"], 11 | visibility = ["//:__subpackages__"], 12 | ) 13 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/setup/015-build.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {getGlobalVariable} from '../utils/env'; 3 | import {npm} from '../utils/process'; 4 | import {updateJsonFile} from '../utils/project'; 5 | 6 | const packages = require('../../../../lib/packages').packages; 7 | 8 | export default function() { 9 | const argv = getGlobalVariable('argv'); 10 | 11 | if (argv.nobuild) { 12 | return; 13 | } 14 | 15 | return npm('run', 'build', '--', '--local'); 16 | } 17 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/different-file-format.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../utils/process'; 2 | import * as fs from '../../utils/fs'; 3 | 4 | 5 | const options = { 6 | encoding: 'utf8' 7 | }; 8 | 9 | 10 | export default function() { 11 | return Promise.resolve() 12 | .then(() => fs.prependToFile('./tsconfig.app.json', '\ufeff', options)) 13 | .then(() => fs.prependToFile('angular.json', '\ufeff', options)) 14 | .then(() => ng('build', '--environment=dev')); 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig-test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "inlineSourceMap": true, 5 | "sourceRoot": ".", 6 | // Inline sources are necessary for our tests to show the proper sources, since we are using 7 | // Istanbul (not Constantinople) as well, and applying both source maps to get the original 8 | // source in devtools. 9 | "inlineSources": true, 10 | "types": [ 11 | "node", 12 | "jasmine" 13 | ] 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.7-project/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "es5", 11 | "typeRoots": [ 12 | "node_modules/@types" 13 | ], 14 | "lib": [ 15 | "es2017", 16 | "dom" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, ViewEncapsulation} from '@angular/core'; 2 | import {MyInjectable} from './injectable'; 3 | 4 | 5 | @Component({ 6 | selector: 'app-root', 7 | templateUrl: './app.component.html', 8 | styleUrls: ['./app.component.scss'], 9 | encapsulation: ViewEncapsulation.None 10 | }) 11 | export class AppComponent { 12 | constructor(public inj: MyInjectable) { 13 | console.log(inj); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-docs-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "📚 Docs or angular.io issue report" 3 | about: Report an issue in Angular's documentation or angular.io application 4 | 5 | --- 6 | 7 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 8 | 9 | Please file any Docs or angular.io issues at: https://github.com/angular/angular/issues/new/choose 10 | 11 | For the time being, we keep Angular AIO issues in a separate repository. 12 | 13 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 14 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_webpack/src/webpack/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "Webpack Builder.", 4 | "description": "Webpack Builder schema for Architect.", 5 | "type": "object", 6 | "properties": { 7 | "webpackConfig": { 8 | "type": "string", 9 | "description": "The path to the Webpack configuration file." 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "required": [ 14 | "webpackConfig" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/tslint.json.template: -------------------------------------------------------------------------------- 1 | {<% if (!isRootApp) { %> 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tslint.json",<% 3 | } %> 4 | "rules": { 5 | "directive-selector": [ 6 | true, 7 | "attribute", 8 | "<%= utils.camelize(prefix) %>", 9 | "camelCase" 10 | ], 11 | "component-selector": [ 12 | true, 13 | "element", 14 | "<%= utils.dasherize(prefix) %>", 15 | "kebab-case" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/basic/aot.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToMatch } from '../../utils/fs'; 2 | import { ng } from '../../utils/process'; 3 | 4 | export default async function () { 5 | await ng('build', '--aot=true'); 6 | await expectFileToMatch('dist/test-project/main-es5.js', 7 | /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); 8 | await expectFileToMatch('dist/test-project/main-es2015.js', 9 | /platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/); 10 | } 11 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/add/add.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToExist, expectFileToMatch, rimraf } from '../../../utils/fs'; 2 | import { ng } from '../../../utils/process'; 3 | 4 | 5 | export default async function () { 6 | await ng('add', '@angular-devkit-tests/ng-add-simple'); 7 | await expectFileToMatch('package.json', /@angular-devkit-tests\/ng-add-simple/); 8 | await expectFileToExist('ng-add-test'); 9 | await rimraf('node_modules/@angular-devkit-tests/ng-add-simple'); 10 | } 11 | -------------------------------------------------------------------------------- /bin/schematics: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /** 3 | * @license 4 | * Copyright Google Inc. All Rights Reserved. 5 | * 6 | * Use of this source code is governed by an MIT-style license that can be 7 | * found in the LICENSE file at https://angular.io/license 8 | */ 9 | 'use strict'; 10 | 11 | 12 | require('../lib/bootstrap-local'); 13 | const packages = require('../lib/packages').packages; 14 | require(packages['@angular-devkit/schematics-cli'].bin['schematics']).main({ args: process.argv.slice(2) }); 15 | -------------------------------------------------------------------------------- /docs/documentation/1-x/generate/enum.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # ng generate enum 4 | 5 | ## Overview 6 | `ng generate enum [name]` generates an enumeration 7 | 8 | ## Options 9 |
10 | app 11 |

12 | --app (aliases: -a) default value: 1st app 13 |

14 |

15 | Specifies app name to use. 16 |

17 |
18 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/utils/default-progress.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export function defaultProgress(progress: boolean | undefined): boolean { 10 | if (progress === undefined) { 11 | return process.stdout.isTTY === true; 12 | } 13 | 14 | return progress; 15 | } 16 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/tsconfig.app.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/app", 5 | "types": [] 6 | }, 7 | "include": [ 8 | "src/**/*.ts" 9 | ], 10 | "exclude": [ 11 | "src/test.ts", 12 | "src/**/*.spec.ts" 13 | ]<% if (enableIvy) { %>, 14 | "angularCompilerOptions": { 15 | "enableIvy": true 16 | }<% } %> 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/add/add-version.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToExist, expectFileToMatch, rimraf } from '../../../utils/fs'; 2 | import { ng } from '../../../utils/process'; 3 | 4 | 5 | export default async function () { 6 | await ng('add', '@angular-devkit-tests/ng-add-simple@^1.0.0'); 7 | await expectFileToMatch('package.json', /\/ng-add-simple.*\^1\.0\.0/); 8 | await expectFileToExist('ng-add-test'); 9 | await rimraf('node_modules/@angular-devkit-tests/ng-add-simple'); 10 | } 11 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit/schematics", 3 | "version": "0.0.0", 4 | "description": "Angular Schematics - Library", 5 | "main": "src/index.js", 6 | "typings": "src/index.d.ts", 7 | "keywords": [ 8 | "blueprints", 9 | "scaffolding", 10 | "template", 11 | "tooling", 12 | "code generation", 13 | "schematics" 14 | ], 15 | "dependencies": { 16 | "@angular-devkit/core": "0.0.0", 17 | "rxjs": "6.4.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AppComponent 10 | ], 11 | imports: [ 12 | BrowserModule, 13 | FormsModule, 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/hidden-schematics/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hidden-schematics", 3 | "schematics": { 4 | "schematic-1": { 5 | "description": "1", 6 | "factory": "../null-factory" 7 | }, 8 | "schematic-2": { 9 | "description": "2", 10 | "factory": "../null-factory" 11 | }, 12 | "hidden-schematic": { 13 | "hidden": true, 14 | "description": "h", 15 | "factory": "../null-factory" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_optimizer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit/build-optimizer", 3 | "version": "0.0.0", 4 | "description": "Angular Build Optimizer", 5 | "experimental": true, 6 | "main": "src/index.js", 7 | "typings": "src/index.d.ts", 8 | "bin": { 9 | "build-optimizer": "./src/build-optimizer/cli.js" 10 | }, 11 | "dependencies": { 12 | "loader-utils": "1.2.3", 13 | "source-map": "0.5.6", 14 | "typescript": "3.4.5", 15 | "webpack-sources": "1.3.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/angular_devkit/schematics/tools/file-system-engine-host/private-schematics/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "private-schematics", 3 | "schematics": { 4 | "schematic-1": { 5 | "description": "1", 6 | "factory": "../null-factory" 7 | }, 8 | "schematic-2": { 9 | "description": "2", 10 | "factory": "../null-factory" 11 | }, 12 | "private-schematic": { 13 | "private": true, 14 | "description": "h", 15 | "factory": "../null-factory" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/1.0-project/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "outDir": "./dist/out-tsc", 5 | "baseUrl": "src", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2016", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/help/help-json.ts: -------------------------------------------------------------------------------- 1 | import { silentNg } from '../../../utils/process'; 2 | 3 | 4 | export default async function() { 5 | const commands = require('@angular/cli/commands.json'); 6 | for (const commandName of Object.keys(commands)) { 7 | const { stdout } = await silentNg(commandName, '--help=json'); 8 | 9 | if (stdout.trim()) { 10 | JSON.parse(stdout); 11 | } else { 12 | console.warn(`No JSON output for command [${commandName}].`); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/angular/cli/models/error.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export class NgToolkitError extends Error { 10 | constructor(message?: string) { 11 | super(); 12 | 13 | if (message) { 14 | this.message = message; 15 | } else { 16 | this.message = this.constructor.name; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/angular/pwa/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular/pwa", 3 | "version": "0.0.0", 4 | "description": "PWA schematics for Angular", 5 | "experimental": true, 6 | "keywords": [ 7 | "blueprints", 8 | "code generation", 9 | "schematics" 10 | ], 11 | "schematics": "./collection.json", 12 | "dependencies": { 13 | "@angular-devkit/core": "0.0.0", 14 | "@angular-devkit/schematics": "0.0.0", 15 | "@schematics/angular": "0.0.0", 16 | "parse5-html-rewriting-stream": "5.1.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es5", 12 | "typeRoots": [ 13 | "node_modules/@types" 14 | ], 15 | "lib": [ 16 | "es2017", 17 | "dom" 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AppComponent 10 | ], 11 | imports: [ 12 | BrowserModule, 13 | AppRoutingModule, 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_webpack/src/webpack-dev-server/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "Webpack Dev-Server Builder", 4 | "description": "Webpack Dev-Server Builder schema for Architect.", 5 | "type": "object", 6 | "properties": { 7 | "webpackConfig": { 8 | "type": "string", 9 | "description": "The path to the Webpack configuration file." 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "required": [ 14 | "webpackConfig" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/files/browserslist.template: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/application/application-basic.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToMatch } from '../../../utils/fs'; 2 | import { ng } from '../../../utils/process'; 3 | import { useCIChrome } from '../../../utils/project'; 4 | 5 | 6 | export default function() { 7 | return ng('generate', 'application', 'app2') 8 | .then(() => expectFileToMatch('angular.json', /\"app2\":/)) 9 | .then(() => useCIChrome('projects/app2')) 10 | .then(() => ng('test', 'app2', '--watch=false', '--browsers=ChromeHeadlessCI')); 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/update-git-clean.ts: -------------------------------------------------------------------------------- 1 | import { appendToFile } from '../../utils/fs'; 2 | import { ng } from '../../utils/process'; 3 | import { expectToFail } from '../../utils/utils'; 4 | 5 | export default async function() { 6 | await appendToFile('src/main.ts', 'console.log(\'changed\');\n'); 7 | 8 | const { message } = await expectToFail(() => ng('update', '--all')); 9 | if (!message || !message.includes('Repository is not clean.')) { 10 | throw new Error('Expected unclean repository'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/schematics/update/packages/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Update Package Group packages 3 | 4 | * `update-package-group-1@1.0.0` -> `update-package-group2@^1` 5 | * `update-package-group-2@1.0.0` -> `update-package-group1@1.0.0` 6 | ---- 7 | 8 | * `update-package-group-1@1.0.0` -> `update-package-group2@^1` 9 | * `update-package-group-2@1.1.0` -> `update-package-group1@1.0.0` 10 | ---- 11 | 12 | * `update-package-group-1@1.2.0` -> `update-package-group2@^2` 13 | * `update-package-group-2@2.0.0` -> `update-package-group1@^1` 14 | ---- 15 | -------------------------------------------------------------------------------- /packages/schematics/schematics/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "blank": { 4 | "factory": "./blank/factory", 5 | "schema": "./blank/schema.json", 6 | "description": "Create an empty schematic project or add a blank schematic to the current project." 7 | }, 8 | "schematic": { 9 | "factory": "./schematic/factory", 10 | "schema": "./schematic/schema.json", 11 | "description": "Create a Schematic template which can be built and published directly to NPM." 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "id": "SchematicsSchematicSchema", 4 | "title": "Schematic Options Schema", 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string", 9 | "description": "The package name for the new schematic." 10 | }, 11 | "author": { 12 | "type": "string", 13 | "description": "Author for the new schematic." 14 | } 15 | }, 16 | "required": [ 17 | "name" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.service.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { Injectable } from '@angular/core'; 9 | 10 | @Injectable() 11 | export class LibService { 12 | 13 | constructor() { } 14 | 15 | testEs2016() { 16 | return ['foo', 'bar'].includes('foo'); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /docs/documentation/1-x/stories/include-angular-material.md: -------------------------------------------------------------------------------- 1 | # Include [Angular Material](https://material.angular.io) 2 | 3 | [Angular Material](https://material.angular.io) is a set of Material Design components for Angular apps. To get started please visit these links to the Angular Material project: 4 | 5 | - [Getting Started](https://material.angular.io/guide/getting-started) 6 | - [Theming Angular Material](https://material.angular.io/guide/theming) 7 | - [Theming your own components](https://material.angular.io/guide/theming-your-components) 8 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/test.json", 4 | "description": "Runs unit tests in a project.", 5 | "$longDescription": "./test-long.md", 6 | 7 | "$aliases": [ "t" ], 8 | "$scope": "in", 9 | "$type": "architect", 10 | "$impl": "./test-impl#TestCommand", 11 | 12 | "type": "object", 13 | "allOf": [ 14 | { "$ref": "./definitions.json#/definitions/architect" }, 15 | { "$ref": "./definitions.json#/definitions/base" } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/xi18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/xi18n.json", 4 | "description": "Extracts i18n messages from source code.", 5 | "$longDescription": "", 6 | 7 | "$aliases": [], 8 | "$scope": "in", 9 | "$type": "architect", 10 | "$impl": "./xi18n-impl#Xi18nCommand", 11 | 12 | "type": "object", 13 | "allOf": [ 14 | { "$ref": "./definitions.json#/definitions/architect" }, 15 | { "$ref": "./definitions.json#/definitions/base" } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/pipe/pipe-module-export.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {ng} from '../../../utils/process'; 3 | import {expectFileToMatch} from '../../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | const modulePath = join('src', 'app', 'app.module.ts'); 8 | 9 | return ng('generate', 'pipe', 'test-pipe', '--export') 10 | .then(() => expectFileToMatch(modulePath, 'exports: [TestPipePipe]')) 11 | 12 | // Try to run the unit tests. 13 | .then(() => ng('test', '--watch=false')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/test/test-fail-single-run.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { writeFile } from '../../utils/fs'; 3 | import { expectToFail } from '../../utils/utils'; 4 | 5 | 6 | export default function () { 7 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 8 | 9 | // Fails on single run with broken compilation. 10 | return writeFile('src/app.component.spec.ts', '

definitely not typescript

') 11 | .then(() => expectToFail(() => ng('test', '--watch=false'))); 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/5-support-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "❓Support request" 3 | about: Questions and requests for support 4 | 5 | --- 6 | 7 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 8 | 9 | Please do not file questions or support requests on the GitHub issues tracker. 10 | 11 | You can get your questions answered using other communication channels. Please see: 12 | https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#question 13 | 14 | Thank you! 15 | 16 | 🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑 17 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_webpack/angular-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { Component } from '@angular/core'; 9 | 10 | @Component({ 11 | selector: 'app-root', 12 | templateUrl: './app.component.html', 13 | styleUrls: ['./app.component.css'] 14 | }) 15 | export class AppComponent { 16 | title = 'app'; 17 | } 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/7.0-project/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "module": "es2015", 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "target": "es5", 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "lib": [ 17 | "es2018", 18 | "dom" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app/app/feature/feature.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule, Component} from '@angular/core'; 2 | import {RouterModule} from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'feature-component', 6 | template: 'foo.html' 7 | }) 8 | export class FeatureComponent {} 9 | 10 | @NgModule({ 11 | declarations: [ 12 | FeatureComponent 13 | ], 14 | imports: [ 15 | RouterModule.forChild([ 16 | { path: '', component: FeatureComponent} 17 | ]) 18 | ] 19 | }) 20 | export class FeatureModule {} 21 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/lint/lint.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../utils/process'; 2 | import { oneLine } from 'common-tags'; 3 | 4 | export default function () { 5 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 6 | 7 | return ng('lint', 'test-project') 8 | .then(({ stdout }) => { 9 | if (!stdout.match(/All files pass linting\./)) { 10 | throw new Error(oneLine` 11 | Expected to match "All files pass linting." 12 | in ${stdout}. 13 | `); 14 | } 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /etc/cli.angular.io/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Angular CLI microsite 3 | 4 | This folder contains all the static files used for the Angular CLI microsite 5 | (http://cli.angular.io). 6 | 7 | To make changes on the frontend, just update the files here, and ask the 8 | caretaker to deploy the new site when the commit is merged. Your commit should 9 | be of scope `docs:` (**NOT** `fix` or `feat`). 10 | 11 | ## Deploy 12 | 13 | To deploy, use your firebase credentials to login, then use `firebase deploy` 14 | from this folder. There is currently no build step. 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit/core", 3 | "version": "0.0.0", 4 | "description": "Angular DevKit - Core Utility Library", 5 | "main": "src/index.js", 6 | "typings": "src/index.d.ts", 7 | "keywords": [ 8 | "core" 9 | ], 10 | "dependencies": { 11 | "ajv": "6.10.0", 12 | "fast-json-stable-stringify": "2.0.0", 13 | "magic-string": "0.25.2", 14 | "rxjs": "6.4.0", 15 | "source-map": "0.7.3" 16 | }, 17 | "devDependencies": { 18 | "seedrandom": "^2.4.4" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/schematics/update/collection.json: -------------------------------------------------------------------------------- 1 | { 2 | "schematics": { 3 | "update": { 4 | "factory": "./update", 5 | "schema": "./update/schema.json", 6 | "description": "Update one or multiple packages to versions, updating peer dependencies along the way." 7 | }, 8 | "migrate": { 9 | "factory": "./migrate", 10 | "schema": "./migrate/schema.json", 11 | "description": "Schematic that calls the migrations of an installed package. Can be used separately", 12 | "hidden": true 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { Component } from '@angular/core'; 9 | 10 | @Component({ 11 | selector: 'app-root', 12 | templateUrl: './app.component.html', 13 | styleUrls: ['./app.component.css'] 14 | }) 15 | export class AppComponent { 16 | title = 'app'; 17 | } 18 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/src/main.server.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { enableProdMode } from '@angular/core'; 9 | 10 | import { environment } from './environments/environment'; 11 | 12 | if (environment.production) { 13 | enableProdMode(); 14 | } 15 | 16 | export { AppServerModule } from './app/app.server.module'; 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/json/schema/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './interface'; 9 | export * from './pointer'; 10 | export * from './registry'; 11 | export * from './schema'; 12 | export * from './visitor'; 13 | export * from './utility'; 14 | 15 | import * as transforms from './transforms'; 16 | 17 | export { transforms }; 18 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { browser, by, element } from 'protractor'; 9 | 10 | export class AppPage { 11 | navigateTo() { 12 | return browser.get(browser.baseUrl); 13 | } 14 | 15 | getTitleText() { 16 | return element(by.css('app-root h1')).getText(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-server-app/app/feature/feature.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule, Component} from '@angular/core'; 2 | import {RouterModule} from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'feature-component', 6 | template: 'foo.html' 7 | }) 8 | export class FeatureComponent {} 9 | 10 | @NgModule({ 11 | declarations: [ 12 | FeatureComponent 13 | ], 14 | imports: [ 15 | RouterModule.forChild([ 16 | { path: '', component: FeatureComponent} 17 | ]) 18 | ] 19 | }) 20 | export class FeatureModule {} 21 | -------------------------------------------------------------------------------- /packages/schematics/angular/service/files/__name@dasherize@if-flat__/__name@dasherize__.service.spec.ts.template: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { <%= classify(name) %>Service } from './<%= dasherize(name) %>.service'; 4 | 5 | describe('<%= classify(name) %>Service', () => { 6 | beforeEach(() => TestBed.configureTestingModule({})); 7 | 8 | it('should be created', () => { 9 | const service: <%= classify(name) %>Service = TestBed.get(<%= classify(name) %>Service); 10 | expect(service).toBeTruthy(); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_angular/hello-world-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "moduleResolution": "node", 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "es2015", 12 | "module": "esnext", 13 | "typeRoots": [ 14 | "node_modules/@types" 15 | ], 16 | "lib": [ 17 | "es2017", 18 | "dom" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/angular_devkit/benchmark/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export * from './interfaces'; 10 | export * from './command'; 11 | export * from './default-reporter'; 12 | export * from './default-stats-capture'; 13 | export * from './monitored-process'; 14 | export * from './run-benchmark'; 15 | export * from './utils'; 16 | export * from './main'; 17 | -------------------------------------------------------------------------------- /packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@npm_bazel_typescript//:defs.bzl", "ts_library") 2 | 3 | # files fetched on 2019-03-05 from 4 | # https://github.com/Microsoft/TypeScript/tree/v3.3.3333 5 | licenses(["notice"]) # Apache 2.0 6 | 7 | ts_library( 8 | name = "TypeScript", 9 | srcs = ["lib/typescript.d.ts"], 10 | data = ["lib/typescript.js"], 11 | module_name = "typescript", 12 | module_root = "lib/typescript.d.ts", 13 | visibility = ["//packages/schematics/angular:__subpackages__"], 14 | ) 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/assets/webpack/test-app-weird/not/so/source/app/feature/feature.module.ts: -------------------------------------------------------------------------------- 1 | import {NgModule, Component} from '@angular/core'; 2 | import {RouterModule} from '@angular/router'; 3 | 4 | @Component({ 5 | selector: 'feature-component', 6 | template: 'foo.html' 7 | }) 8 | export class FeatureComponent {} 9 | 10 | @NgModule({ 11 | declarations: [ 12 | FeatureComponent 13 | ], 14 | imports: [ 15 | RouterModule.forChild([ 16 | { path: '', component: FeatureComponent} 17 | ]) 18 | ] 19 | }) 20 | export class FeatureModule {} 21 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/new/existing-directory.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import { promisify } from 'util'; 3 | import {ng} from '../../../utils/process'; 4 | import {getGlobalVariable} from '../../../utils/env'; 5 | 6 | const mkdir = promisify(fs.mkdir); 7 | 8 | 9 | export default function() { 10 | return Promise.resolve() 11 | .then(() => process.chdir(getGlobalVariable('tmp-root'))) 12 | .then(() => mkdir('empty-directory')) 13 | .then(() => ng('new', 'foo', '--directory=empty-directory', '--skip-install', '--skip-git')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/library/library-basic.ts: -------------------------------------------------------------------------------- 1 | import { ng } from '../../../utils/process'; 2 | import { expectFileToMatch } from '../../../utils/fs'; 3 | import { useCIChrome } from '../../../utils/project'; 4 | 5 | export default function () { 6 | return ng('generate', 'library', 'my-lib') 7 | .then(() => expectFileToMatch('angular.json', /\"my-lib\":/)) 8 | .then(() => useCIChrome('projects/my-lib')) 9 | .then(() => ng('build', 'my-lib')) 10 | .then(() => ng('test', 'my-lib', '--watch=false', '--browsers=ChromeHeadlessCI')); 11 | } 12 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/pipe/pipe-in-existing-module-dir.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | import { ng } from '../../../utils/process'; 3 | import { expectFileToMatch } from '../../../utils/fs'; 4 | 5 | export default function () { 6 | const modulePath = join('src', 'app', 'foo', 'foo.module.ts'); 7 | 8 | return Promise.resolve() 9 | .then(() => ng('generate', 'module', 'foo')) 10 | .then(() => ng('generate', 'pipe', 'foo', '--no-flat')) 11 | .then(() => expectFileToMatch(modulePath, /import { FooPipe } from '.\/foo.pipe'/)); 12 | } 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/node/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import * as experimental from './experimental/jobs/job-registry'; 9 | import * as fs from './fs'; 10 | export * from './cli-logger'; 11 | export * from './host'; 12 | export { ModuleNotFoundException, ResolveOptions, resolve } from './resolve'; 13 | 14 | export { 15 | experimental, 16 | fs, 17 | }; 18 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/new/new-skip-commit.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {createProject} from '../../../utils/project'; 3 | import {expectToFail} from '../../../utils/utils'; 4 | import {expectGitToBeClean} from '../../../utils/git'; 5 | 6 | 7 | export default function() { 8 | return Promise.resolve() 9 | .then(() => createProject('new-project', '--skip-commit')) 10 | .then(() => expectToFail(() => expectGitToBeClean())) 11 | 12 | // Try to run the unit tests. 13 | .then(() => ng('test', '--watch=false')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/component/component-module-export.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {ng} from '../../../utils/process'; 3 | import {expectFileToMatch} from '../../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | const modulePath = join('src', 'app', 'app.module.ts'); 8 | 9 | return ng('generate', 'component', 'test-component', '--export') 10 | .then(() => expectFileToMatch(modulePath, 'exports: [TestComponentComponent]')) 11 | 12 | // Try to run the unit tests. 13 | .then(() => ng('test', '--watch=false')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/directive/directive-module-export.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {ng} from '../../../utils/process'; 3 | import {expectFileToMatch} from '../../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | const modulePath = join('src', 'app', 'app.module.ts'); 8 | 9 | return ng('generate', 'directive', 'test-directive', '--export') 10 | .then(() => expectFileToMatch(modulePath, 'exports: [TestDirectiveDirective]')) 11 | 12 | // Try to run the unit tests. 13 | .then(() => ng('test', '--watch=false')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/interface.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {ng} from '../../utils/process'; 3 | import {expectFileToExist} from '../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | const interfaceDir = join('src', 'app'); 8 | 9 | return ng('generate', 'interface', 'test-interface', 'model') 10 | .then(() => expectFileToExist(interfaceDir)) 11 | .then(() => expectFileToExist(join(interfaceDir, 'test-interface.model.ts'))) 12 | 13 | // Try to run the unit tests. 14 | .then(() => ng('test', '--watch=false')); 15 | } 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/workspace-verification.ts: -------------------------------------------------------------------------------- 1 | import {deleteFile} from '../../utils/fs'; 2 | import {ng} from '../../utils/process'; 3 | import { expectToFail } from '../../utils/utils'; 4 | 5 | 6 | export default function() { 7 | return ng('generate', 'component', 'foo', '--dry-run') 8 | .then(() => deleteFile('angular.json')) 9 | // fails because it needs to be inside a project 10 | // without a workspace file 11 | .then(() => expectToFail(() => ng('generate', 'component', 'foo', '--dry-run'))) 12 | .then(() => ng('version')); 13 | } 14 | -------------------------------------------------------------------------------- /third_party/github.com/bazelbuild/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/BUILD: -------------------------------------------------------------------------------- 1 | # Copyright Google Inc. All Rights Reserved. 2 | # 3 | # Use of this source code is governed by an MIT-style license that can be 4 | # found in the LICENSE file at https://angular.io/license 5 | package(default_visibility = ["//:__subpackages__"]) 6 | 7 | licenses(["notice"]) # Apache 2.0 8 | 9 | proto_library( 10 | name = "proto", 11 | srcs = glob(["*.proto"]), 12 | deps = ["//third_party/github.com/bazelbuild/bazel/src/main/protobuf"], 13 | ) 14 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/experimental/jobs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './api'; 9 | export * from './create-job-handler'; 10 | export * from './exception'; 11 | export * from './dispatcher'; 12 | export * from './fallback-registry'; 13 | export * from './simple-registry'; 14 | export * from './simple-scheduler'; 15 | export * from './strategy'; 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/commands/new/new-style.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../../utils/process'; 2 | import {createProject} from '../../../utils/project'; 3 | import {expectFileToExist} from '../../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | return Promise.resolve() 8 | .then(() => ng('config', 'defaults.styleExt', 'scss', '--global')) 9 | .then(() => createProject('style-project')) 10 | .then(() => expectFileToExist('src/app/app.component.scss')) 11 | 12 | // Try to run the unit tests. 13 | .then(() => ng('test', '--watch=false')); 14 | } 15 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/component/component-in-existing-module-dir.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | import { ng } from '../../../utils/process'; 3 | import { expectFileToMatch } from '../../../utils/fs'; 4 | 5 | export default function () { 6 | const modulePath = join('src', 'app', 'foo', 'foo.module.ts'); 7 | 8 | return Promise.resolve() 9 | .then(() => ng('generate', 'module', 'foo')) 10 | .then(() => ng('generate', 'component', 'foo')) 11 | .then(() => expectFileToMatch(modulePath, /import { FooComponent } from '.\/foo.component'/)); 12 | } 13 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/utilities/strip-bom.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | // tslint:disable 9 | // TODO: cleanup this file, it's copied as is from Angular CLI. 10 | 11 | // Strip BOM from file data. 12 | // https://stackoverflow.com/questions/24356713 13 | export function stripBom(data: string) { 14 | return data.replace(/^\uFEFF/, ''); 15 | } 16 | -------------------------------------------------------------------------------- /packages/angular/cli/commands/e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "ng-cli://commands/e2e.json", 4 | "description": "Builds and serves an Angular app, then runs end-to-end tests using Protractor.", 5 | "$longDescription": "./e2e-long.md", 6 | 7 | "$aliases": [ "e" ], 8 | "$scope": "in", 9 | "$type": "architect", 10 | "$impl": "./e2e-impl#E2eCommand", 11 | 12 | "type": "object", 13 | "allOf": [ 14 | { "$ref": "./definitions.json#/definitions/architect" }, 15 | { "$ref": "./definitions.json#/definitions/base" } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/analytics/noop.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { Analytics } from './api'; 9 | 10 | /** 11 | * Analytics implementation that does nothing. 12 | */ 13 | export class NoopAnalytics implements Analytics { 14 | event() {} 15 | screenview() {} 16 | pageview() {} 17 | timing() {} 18 | flush(): Promise { return Promise.resolve(); } 19 | } 20 | -------------------------------------------------------------------------------- /packages/schematics/angular/guard/files/__name@dasherize__.guard.spec.ts.template: -------------------------------------------------------------------------------- 1 | import { TestBed, async, inject } from '@angular/core/testing'; 2 | 3 | import { <%= classify(name) %>Guard } from './<%= dasherize(name) %>.guard'; 4 | 5 | describe('<%= classify(name) %>Guard', () => { 6 | beforeEach(() => { 7 | TestBed.configureTestingModule({ 8 | providers: [<%= classify(name) %>Guard] 9 | }); 10 | }); 11 | 12 | it('should ...', inject([<%= classify(name) %>Guard], (guard: <%= classify(name) %>Guard) => { 13 | expect(guard).toBeTruthy(); 14 | })); 15 | }); 16 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/extract-licenses.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {expectFileToExist} from '../../utils/fs'; 3 | import {expectToFail} from '../../utils/utils'; 4 | import {ng} from '../../utils/process'; 5 | 6 | export default function() { 7 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 8 | 9 | return ng('build', '--prod', '--extract-licenses=false') 10 | .then(() => expectFileToExist(join(process.cwd(), 'dist'))) 11 | .then(() => expectToFail(() => expectFileToExist('dist/test-project/3rdpartylicenses.txt'))); 12 | } 13 | -------------------------------------------------------------------------------- /third_party/README.md: -------------------------------------------------------------------------------- 1 | # third_party vendored sources in Angular CLI 2 | 3 | Note, other third_party directories under subpackages currently exist to support the legacy pre-bazel build system. 4 | 5 | For example, `/packages/angular_devkit/core/third_party` 6 | 7 | ## TL;DR: don't copy sources into this repo 8 | 9 | All sources in this repo should be authored from scratch by the committer. 10 | Don't copy sources you've found in any other location. 11 | 12 | For more info, see the longer version of this README: 13 | https://github.com/angular/angular/blob/master/third_party/README.md 14 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export * from './browser'; 9 | export * from './common'; 10 | export * from './server'; 11 | export * from './styles'; 12 | export * from './test'; 13 | export * from './typescript'; 14 | export * from './utils'; 15 | export * from './stats'; 16 | export * from './worker'; 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/src/rules/url.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { parse } from 'url'; 9 | import { SchematicContext, Source } from '../engine/interface'; 10 | 11 | 12 | export function url(urlString: string): Source { 13 | const url = parse(urlString); 14 | 15 | return (context: SchematicContext) => context.engine.createSourceFromUrl(url, context)(context); 16 | } 17 | -------------------------------------------------------------------------------- /packages/schematics/angular/application/other-files/app.module.ts.template: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | <% if (routing) { %> 4 | import { AppRoutingModule } from './app-routing.module';<% } %> 5 | import { AppComponent } from './app.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AppComponent 10 | ], 11 | imports: [ 12 | BrowserModule<% if (routing) { %>, 13 | AppRoutingModule<% } %> 14 | ], 15 | providers: [], 16 | bootstrap: [AppComponent] 17 | }) 18 | export class AppModule { } 19 | -------------------------------------------------------------------------------- /packages/schematics/angular/migrations/update-8/remove-angular-http.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | import { Tree } from '@angular-devkit/schematics'; 10 | import { removePackageJsonDependency } from '../../utility/dependencies'; 11 | 12 | export const removeAngularHttp = () => { 13 | return (host: Tree) => { 14 | removePackageJsonDependency(host, '@angular/http'); 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/directive/directive-in-existing-module-dir.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | import { ng } from '../../../utils/process'; 3 | import { expectFileToMatch } from '../../../utils/fs'; 4 | 5 | export default function () { 6 | const modulePath = join('src', 'app', 'foo', 'foo.module.ts'); 7 | 8 | return Promise.resolve() 9 | .then(() => ng('generate', 'module', 'foo')) 10 | .then(() => ng('generate', 'directive', 'foo', '--no-flat')) 11 | .then(() => expectFileToMatch(modulePath, /import { FooDirective } from '.\/foo.directive'/)); 12 | } 13 | -------------------------------------------------------------------------------- /docs/documentation/run.md: -------------------------------------------------------------------------------- 1 | 2 | **Documentation below is for CLI version 6 and we no longer accept PRs to improve this. For version 7 see [here](https://angular.io/cli/run)**. 3 | 4 | # ng run 5 | 6 | ## Overview 7 | Runs Architect targets. 8 | 9 | ## Options 10 |
11 | configuration 12 |

13 | --configuration (alias: -c) 14 |

15 |

16 | Specify the configuration to use. 17 |

18 |
19 | -------------------------------------------------------------------------------- /packages/angular_devkit/benchmark/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@angular-devkit/benchmark", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "Angular Benchmark", 6 | "bin": { 7 | "benchmark": "./src/main.js" 8 | }, 9 | "keywords": [ 10 | "benchmark" 11 | ], 12 | "engines": { 13 | "node": ">= 10.9.0", 14 | "npm": ">= 6.2.0" 15 | }, 16 | "dependencies": { 17 | "@angular-devkit/core": "0.0.0", 18 | "minimist": "1.2.0", 19 | "pidusage": "2.0.17", 20 | "pidtree": "0.3.0", 21 | "rxjs": "6.4.0", 22 | "tree-kill": "^1.2.0" 23 | } 24 | } -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/plugins/raw-css-loader.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | export default function(content: string, map: object) { 10 | const stringifiedContent = JSON.stringify(content); 11 | const stringifiedMap = map ? JSON.stringify(map) : `''`; 12 | 13 | return `module.exports = [[module.id, ${stringifiedContent}, '', ${stringifiedMap}]]`; 14 | } 15 | -------------------------------------------------------------------------------- /packages/angular_devkit/schematics/tasks/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | export { NodePackageInstallTask } from './node-package/install-task'; 9 | export { NodePackageLinkTask } from './node-package/link-task'; 10 | export { RepositoryInitializerTask } from './repo-init/init-task'; 11 | export { RunSchematicTask } from './run-schematic/task'; 12 | export { TslintFixTask } from './tslint-fix/task'; 13 | -------------------------------------------------------------------------------- /packages/schematics/schematics/blank/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "id": "SchematicsSchematicSchema", 4 | "title": "Schematic Options Schema", 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string", 9 | "description": "The package name for the new schematic.", 10 | "$default": { 11 | "$source": "argv", 12 | "index": 0 13 | } 14 | }, 15 | "author": { 16 | "type": "string", 17 | "description": "Author for the new schematic." 18 | } 19 | }, 20 | "required": [] 21 | } 22 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/misc/multiple-targets.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToExist } from '../../utils/fs'; 2 | import { ng } from '../../utils/process'; 3 | import { updateJsonFile } from '../../utils/project'; 4 | 5 | export default async function () { 6 | await ng('generate', 'app', 'secondary-app'); 7 | 8 | await updateJsonFile('angular.json', workspaceJson => { 9 | workspaceJson.defaultProject = undefined; 10 | }); 11 | 12 | await ng('build', 'secondary-app'); 13 | 14 | expectFileToExist('dist/secondary-app/index.html'); 15 | expectFileToExist('dist/secondary-app/main.js'); 16 | } 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/build_angular/src/angular-cli-files/utilities/is-directory.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | // tslint:disable 9 | // TODO: cleanup this file, it's copied as is from Angular CLI. 10 | 11 | import * as fs from 'fs'; 12 | 13 | export function isDirectory(path: string) { 14 | try { 15 | return fs.statSync(path).isDirectory(); 16 | } catch (_) { 17 | return false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/third_party/github.com/chalk/supports-color/BUILD: -------------------------------------------------------------------------------- 1 | # TODO(alexeagle): move this file to /third_party so Bazel can enforce the licensing 2 | licenses(["notice"]) 3 | 4 | # Downloaded from: https://github.com/chalk/supports-color/tree/17e9579fec886a1058553b6f7529f05e4f7a90dc 5 | # Timestamp: 2019 Feb 14 6 | exports_files(["license"]) 7 | 8 | filegroup( 9 | name = "supports-color", 10 | srcs = [ 11 | "index.js", 12 | "//packages/angular_devkit/core/third_party/github.com/sindresorhus/has-flag", 13 | ], 14 | visibility = ["//:__subpackages__"], 15 | ) 16 | -------------------------------------------------------------------------------- /tests/angular_devkit/build_ng_packagr/ng-packaged/projects/lib/src/lib/lib.module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { NgModule } from '@angular/core'; 9 | import { LibComponent } from './lib.component'; 10 | import { LibService } from './lib.service'; 11 | 12 | @NgModule({ 13 | imports: [ 14 | ], 15 | declarations: [LibComponent], 16 | providers: [LibService] 17 | }) 18 | export class LibModule { } 19 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/no-entry-module.ts: -------------------------------------------------------------------------------- 1 | import { readFile, writeFile } from '../../utils/fs'; 2 | import { ng } from '../../utils/process'; 3 | 4 | 5 | export default async function() { 6 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 7 | 8 | const mainTs = await readFile('src/main.ts'); 9 | 10 | const newMainTs = mainTs 11 | .replace(/platformBrowserDynamic.*?bootstrapModule.*?;/, '') 12 | + 'console.log(AppModule);'; // Use AppModule to make sure it's imported properly. 13 | 14 | await writeFile('src/main.ts', newMainTs); 15 | await ng('build'); 16 | } 17 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/generate/class.ts: -------------------------------------------------------------------------------- 1 | import {join} from 'path'; 2 | import {ng} from '../../utils/process'; 3 | import {expectFileToExist} from '../../utils/fs'; 4 | 5 | 6 | export default function() { 7 | const projectDir = join('src', 'app'); 8 | 9 | return ng('generate', 'class', 'test-class') 10 | .then(() => expectFileToExist(projectDir)) 11 | .then(() => expectFileToExist(join(projectDir, 'test-class.ts'))) 12 | .then(() => expectFileToExist(join(projectDir, 'test-class.spec.ts'))) 13 | 14 | // Try to run the unit tests. 15 | .then(() => ng('test', '--watch=false')); 16 | } 17 | -------------------------------------------------------------------------------- /packages/angular_devkit/core/src/utils/priority-queue_spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { PriorityQueue } from './priority-queue'; 9 | 10 | 11 | describe('PriorityQueue', () => { 12 | it('adds an item', () => { 13 | const queue = new PriorityQueue((x, y) => x - y); 14 | 15 | queue.push(99); 16 | 17 | expect(queue.size).toBe(1); 18 | expect(queue.peek()).toBe(99); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/ngtools/webpack/src/utils_spec.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | 9 | import { flattenArray } from './utils'; 10 | 11 | describe('@ngtools/webpack utils', () => { 12 | describe('flattenArray', () => { 13 | it('should flatten an array', () => { 14 | const arr = flattenArray(['module', ['browser', 'main']]); 15 | expect(arr).toEqual(['module', 'browser', 'main']); 16 | }); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/schematics/angular/utility/test/get-file-content.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright Google Inc. All Rights Reserved. 4 | * 5 | * Use of this source code is governed by an MIT-style license that can be 6 | * found in the LICENSE file at https://angular.io/license 7 | */ 8 | import { Tree } from '@angular-devkit/schematics'; 9 | 10 | 11 | export function getFileContent(tree: Tree, path: string): string { 12 | const fileEntry = tree.get(path); 13 | 14 | if (!fileEntry) { 15 | throw new Error(`The file (${path}) does not exist.`); 16 | } 17 | 18 | return fileEntry.content.toString(); 19 | } 20 | -------------------------------------------------------------------------------- /packages/schematics/schematics/schematic/files/src/my-schematic/index_spec.ts: -------------------------------------------------------------------------------- 1 | import { Tree } from '@angular-devkit/schematics'; 2 | import { SchematicTestRunner } from '@angular-devkit/schematics/testing'; 3 | import * as path from 'path'; 4 | 5 | 6 | const collectionPath = path.join(__dirname, '../collection.json'); 7 | 8 | 9 | describe('my-schematic', () => { 10 | it('works', () => { 11 | const runner = new SchematicTestRunner('schematics', collectionPath); 12 | const tree = runner.runSchematic('my-schematic', {}, Tree.empty()); 13 | 14 | expect(tree.files).toEqual(['/hello']); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /tests/legacy-cli/e2e/tests/build/json.ts: -------------------------------------------------------------------------------- 1 | import {ng} from '../../utils/process'; 2 | import {expectFileToExist} from '../../utils/fs'; 3 | import {expectGitToBeClean} from '../../utils/git'; 4 | import {getGlobalVariable} from '../../utils/env'; 5 | 6 | 7 | export default function() { 8 | // TODO(architect): Delete this test. It is now in devkit/build-angular. 9 | 10 | return ng('build', '--stats-json') 11 | .then(() => expectFileToExist('./dist/test-project/stats-es5.json')) 12 | .then(() => expectFileToExist('./dist/test-project/stats-es2015.json')) 13 | .then(() => expectGitToBeClean()); 14 | } --------------------------------------------------------------------------------