├── packages
├── bazel
│ ├── index.ts
│ ├── migrations.json
│ ├── .eslintrc
│ ├── src
│ │ └── schematics
│ │ │ ├── init
│ │ │ └── schema.json
│ │ │ ├── sync
│ │ │ ├── schema.json
│ │ │ └── files
│ │ │ │ └── root-build-file
│ │ │ │ └── BUILD.bazel__tmpl__
│ │ │ └── utils
│ │ │ └── versions.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ ├── README.md
│ └── collection.json
├── nest
│ ├── index.ts
│ ├── .eslintrc
│ ├── builders.json
│ ├── src
│ │ ├── schematics
│ │ │ ├── init
│ │ │ │ └── schema.d.ts
│ │ │ ├── library
│ │ │ │ └── files
│ │ │ │ │ └── lib
│ │ │ │ │ └── src
│ │ │ │ │ └── lib
│ │ │ │ │ ├── __fileName__.service.ts__tmpl__
│ │ │ │ │ └── __fileName__.controller.ts__tmpl__
│ │ │ └── application
│ │ │ │ ├── files
│ │ │ │ └── app
│ │ │ │ │ ├── app.service.ts__tmpl__
│ │ │ │ │ ├── app.module.ts__tmpl__
│ │ │ │ │ └── app.controller.ts__tmpl__
│ │ │ │ └── schema.d.ts
│ │ ├── utils
│ │ │ └── versions.ts
│ │ └── migrations
│ │ │ └── update-8-7-0
│ │ │ └── update-8-7-0.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── node
│ ├── index.ts
│ ├── src
│ │ ├── schematics
│ │ │ ├── application
│ │ │ │ ├── files
│ │ │ │ │ └── app
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ ├── app
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ ├── assets
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ ├── main.ts__tmpl__
│ │ │ │ │ │ └── environments
│ │ │ │ │ │ │ ├── environment.prod.ts__tmpl__
│ │ │ │ │ │ │ └── environment.ts__tmpl__
│ │ │ │ │ │ ├── tsconfig.json
│ │ │ │ │ │ └── tsconfig.app.json
│ │ │ │ └── schema.d.ts
│ │ │ ├── init
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schema.json
│ │ │ └── library
│ │ │ │ ├── files
│ │ │ │ └── lib
│ │ │ │ │ ├── package.json__tmpl__
│ │ │ │ │ ├── src
│ │ │ │ │ └── lib
│ │ │ │ │ │ ├── __fileName__.ts__tmpl__
│ │ │ │ │ │ └── __fileName__.spec.ts__tmpl__
│ │ │ │ │ └── tsconfig.lib.json
│ │ │ │ └── schema.d.ts
│ │ └── utils
│ │ │ └── versions.ts
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── migrations.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── web
│ ├── index.ts
│ ├── src
│ │ ├── schematics
│ │ │ ├── application
│ │ │ │ ├── files
│ │ │ │ │ └── app
│ │ │ │ │ │ ├── .babelrc__tmpl__
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ ├── assets
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ ├── main.ts__tmpl__
│ │ │ │ │ │ ├── environments
│ │ │ │ │ │ │ ├── environment.prod.ts__tmpl__
│ │ │ │ │ │ │ └── environment.ts__tmpl__
│ │ │ │ │ │ ├── styles.__style__
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ ├── polyfills.ts__tmpl__
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── app
│ │ │ │ │ │ │ └── app.element.spec.ts__tmpl__
│ │ │ │ │ │ ├── tsconfig.json
│ │ │ │ │ │ └── tsconfig.app.json
│ │ │ │ └── schema.d.ts
│ │ │ └── init
│ │ │ │ └── schema.d.ts
│ │ └── utils
│ │ │ ├── versions.ts
│ │ │ ├── third-party
│ │ │ ├── transforms.ts
│ │ │ ├── utils
│ │ │ │ ├── mangle-options.ts
│ │ │ │ └── default-progress.ts
│ │ │ └── cli-files
│ │ │ │ ├── utilities
│ │ │ │ ├── strip-bom.ts
│ │ │ │ └── is-directory.ts
│ │ │ │ └── plugins
│ │ │ │ └── raw-css-loader.ts
│ │ │ ├── source-root.ts
│ │ │ └── rules.ts
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── cypress
│ ├── index.ts
│ ├── src
│ │ ├── schematics
│ │ │ ├── init
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schema.json
│ │ │ └── cypress-project
│ │ │ │ ├── files
│ │ │ │ ├── src
│ │ │ │ │ ├── support
│ │ │ │ │ │ └── app.po.ts__tmpl__
│ │ │ │ │ ├── fixtures
│ │ │ │ │ │ └── example.json__tmpl__
│ │ │ │ │ └── integration
│ │ │ │ │ │ └── app.spec.ts__tmpl__
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── tsconfig.e2e.json
│ │ │ │ └── cypress.json
│ │ │ │ └── schema.d.ts
│ │ ├── utils
│ │ │ ├── versions.ts
│ │ │ └── cypress-version.ts
│ │ └── migrations
│ │ │ ├── update-8-10-0
│ │ │ └── update-8-10-0.ts
│ │ │ └── update-8-12-0
│ │ │ └── update-8-12-0.ts
│ ├── plugins
│ │ └── preprocessor.ts
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── builders.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── express
│ ├── index.ts
│ ├── migrations.json
│ ├── .eslintrc
│ ├── builders.json
│ ├── src
│ │ ├── schematics
│ │ │ ├── init
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schema.json
│ │ │ └── application
│ │ │ │ └── schema.d.ts
│ │ └── utils
│ │ │ └── versions.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── nx-plugin
│ ├── index.ts
│ ├── migrations.json
│ ├── src
│ │ ├── schematics
│ │ │ ├── plugin
│ │ │ │ ├── files
│ │ │ │ │ └── plugin
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ └── index.ts__tmpl__
│ │ │ │ │ │ ├── builders.json__tmpl__
│ │ │ │ │ │ ├── collection.json__tmpl__
│ │ │ │ │ │ └── package.json__tmpl__
│ │ │ │ └── schema.d.ts
│ │ │ ├── schematic
│ │ │ │ ├── files
│ │ │ │ │ └── schematic
│ │ │ │ │ │ └── __fileName__
│ │ │ │ │ │ ├── files
│ │ │ │ │ │ └── src
│ │ │ │ │ │ │ └── index.ts.template
│ │ │ │ │ │ └── schema.d.ts__tmpl__
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schematic.ts
│ │ │ ├── builder
│ │ │ │ ├── files
│ │ │ │ │ └── builder
│ │ │ │ │ │ └── __fileName__
│ │ │ │ │ │ ├── schema.d.ts__tmpl__
│ │ │ │ │ │ └── schema.json__tmpl__
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── builder.ts
│ │ │ ├── e2e-project
│ │ │ │ ├── files
│ │ │ │ │ └── tsconfig.json__tmpl__
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── lib
│ │ │ │ │ ├── update-nx-json.ts
│ │ │ │ │ └── validate-plugin.ts
│ │ │ └── migration
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── files
│ │ │ │ └── migration
│ │ │ │ └── __name__
│ │ │ │ └── __name__.ts__tmpl__
│ │ ├── utils
│ │ │ ├── versions.ts
│ │ │ ├── testing-utils
│ │ │ │ └── index.ts
│ │ │ └── get-file-template.ts
│ │ └── builders
│ │ │ └── e2e
│ │ │ └── schema.d.ts
│ ├── testing.ts
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── builders.json
│ ├── tsconfig.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.spec.json
│ └── README.md
├── storybook
│ ├── index.ts
│ ├── .eslintrc
│ ├── src
│ │ ├── schematics
│ │ │ ├── configuration
│ │ │ │ ├── root-files
│ │ │ │ │ └── .storybook
│ │ │ │ │ │ ├── addons.js
│ │ │ │ │ │ ├── tsconfig.json
│ │ │ │ │ │ └── webpack.config.js
│ │ │ │ ├── lib-files
│ │ │ │ │ └── .storybook
│ │ │ │ │ │ ├── addons.js__tmpl__
│ │ │ │ │ │ ├── tsconfig.json
│ │ │ │ │ │ └── config.js__tmpl__
│ │ │ │ └── schema.d.ts
│ │ │ └── init
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schema.json
│ │ ├── builders
│ │ │ └── storybook
│ │ │ │ └── storybook.impl.spec.ts
│ │ ├── utils
│ │ │ └── versions.ts
│ │ └── migrations
│ │ │ ├── update-9-2-0
│ │ │ └── update-9-2-0.ts
│ │ │ └── update-9-0-0
│ │ │ └── update-9-0-0.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ ├── README.md
│ └── builders.json
├── next
│ ├── index.ts
│ ├── .eslintrc
│ ├── src
│ │ ├── schematics
│ │ │ ├── application
│ │ │ │ ├── files
│ │ │ │ │ ├── pages
│ │ │ │ │ │ └── __fileName__.__style__
│ │ │ │ │ ├── next-env.d.ts__tmpl__
│ │ │ │ │ ├── .babelrc__tmpl__
│ │ │ │ │ ├── index.d.ts__tmpl__
│ │ │ │ │ ├── public
│ │ │ │ │ │ └── star.svg
│ │ │ │ │ ├── tsconfig.json__tmpl__
│ │ │ │ │ └── specs
│ │ │ │ │ │ └── __fileName__.spec.tsx__tmpl__
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── lib
│ │ │ │ │ ├── update-nx-json.ts
│ │ │ │ │ └── add-cypress.ts
│ │ │ └── init
│ │ │ │ └── schema.d.ts
│ │ ├── utils
│ │ │ └── versions.ts
│ │ ├── migrations
│ │ │ └── update-8-10-0
│ │ │ │ └── update-8-10-0.ts
│ │ └── builders
│ │ │ └── server
│ │ │ └── lib
│ │ │ └── custom-server.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── react
│ ├── src
│ │ ├── schematics
│ │ │ ├── component
│ │ │ │ ├── files
│ │ │ │ │ ├── __fileName__.__style__
│ │ │ │ │ └── __fileName__.spec.tsx__tmpl__
│ │ │ │ └── schema.d.ts
│ │ │ ├── library
│ │ │ │ ├── files
│ │ │ │ │ └── lib
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ └── index.ts__tmpl__
│ │ │ │ │ │ ├── package.json__tmpl__
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ ├── .babelrc__tmpl__
│ │ │ │ │ │ └── tsconfig.json__tmpl__
│ │ │ │ └── schema.d.ts
│ │ │ ├── application
│ │ │ │ ├── files
│ │ │ │ │ └── app
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ ├── assets
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ ├── app
│ │ │ │ │ │ │ ├── __fileName__.__style__
│ │ │ │ │ │ │ └── star.svg
│ │ │ │ │ │ ├── styles.__style__
│ │ │ │ │ │ ├── environments
│ │ │ │ │ │ │ ├── environment.prod.ts__tmpl__
│ │ │ │ │ │ │ └── environment.ts__tmpl__
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ ├── polyfills.ts__tmpl__
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── main.tsx__tmpl__
│ │ │ │ │ │ ├── .babelrc__tmpl__
│ │ │ │ │ │ └── tsconfig.json__tmpl__
│ │ │ │ └── lib
│ │ │ │ │ ├── update-nx-json.ts
│ │ │ │ │ ├── add-cypress.ts
│ │ │ │ │ └── add-jest.ts
│ │ │ ├── init
│ │ │ │ └── schema.d.ts
│ │ │ ├── storybook-configuration
│ │ │ │ └── schema.d.ts
│ │ │ ├── redux
│ │ │ │ └── schema.d.ts
│ │ │ └── component-cypress-spec
│ │ │ │ └── files
│ │ │ │ └── __componentName__.spec.__fileExt__.template
│ │ ├── utils
│ │ │ ├── dependencies.ts
│ │ │ ├── jest-utils.ts
│ │ │ └── assertion.ts
│ │ ├── migrations
│ │ │ ├── update-9-4-0
│ │ │ │ └── update-9-4-0.ts
│ │ │ ├── update-9-5-0
│ │ │ │ └── update-9-5-0.ts
│ │ │ └── update-8-12-0
│ │ │ │ └── update-8-12-0.ts
│ │ └── rules
│ │ │ └── add-styled-dependencies.ts
│ ├── .eslintrc
│ ├── typings
│ │ ├── style.d.ts
│ │ ├── styled-jsx.d.ts
│ │ └── cssmodule.d.ts
│ ├── index.ts
│ ├── plugins
│ │ └── bundle-babel.ts
│ ├── babel.ts
│ ├── ast-utils.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── workspace
│ ├── src
│ │ ├── schematics
│ │ │ ├── init
│ │ │ │ ├── files
│ │ │ │ │ ├── tools
│ │ │ │ │ │ ├── schematics
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ └── tsconfig.tools.json
│ │ │ │ │ └── .prettierignore
│ │ │ │ └── schema.d.ts
│ │ │ ├── workspace
│ │ │ │ ├── files
│ │ │ │ │ ├── tools
│ │ │ │ │ │ ├── schematics
│ │ │ │ │ │ │ └── .gitkeep
│ │ │ │ │ │ └── tsconfig.tools.json
│ │ │ │ │ ├── __dot__prettierrc
│ │ │ │ │ ├── __dot__prettierignore
│ │ │ │ │ ├── __workspaceFile__.json
│ │ │ │ │ ├── .vscode
│ │ │ │ │ │ └── extensions.json__tmpl__
│ │ │ │ │ └── __dot__editorconfig
│ │ │ │ └── schema.d.ts
│ │ │ ├── library
│ │ │ │ ├── files
│ │ │ │ │ └── lib
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ ├── lib
│ │ │ │ │ │ │ └── __fileName__.ts__tmpl__
│ │ │ │ │ │ └── index.ts__tmpl__
│ │ │ │ │ │ ├── tsconfig.json
│ │ │ │ │ │ ├── tsconfig.lib.json
│ │ │ │ │ │ └── README.md
│ │ │ │ └── schema.d.ts
│ │ │ ├── move
│ │ │ │ └── schema.d.ts
│ │ │ ├── workspace-schematic
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── files
│ │ │ │ │ └── __name__
│ │ │ │ │ ├── index.ts__tmpl__
│ │ │ │ │ └── schema.json
│ │ │ ├── remove
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── lib
│ │ │ │ │ └── update-workspace.ts
│ │ │ ├── run-commands
│ │ │ │ └── schema.d.ts
│ │ │ ├── tao-new
│ │ │ │ └── tao-new.ts
│ │ │ ├── ng-new
│ │ │ │ └── ng-new.ts
│ │ │ └── preset
│ │ │ │ └── schema.d.ts
│ │ ├── core
│ │ │ ├── file-graph
│ │ │ │ └── index.ts
│ │ │ ├── affected-project-graph
│ │ │ │ └── index.ts
│ │ │ ├── project-graph
│ │ │ │ ├── build-nodes
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── build-nodes.ts
│ │ │ │ ├── build-dependencies
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── build-dependencies.ts
│ │ │ │ └── index.ts
│ │ │ └── dep-graph
│ │ │ │ └── crosshair.svg
│ │ ├── tasks-runner
│ │ │ ├── empty-reporter.ts
│ │ │ └── tasks-runner-v2.ts
│ │ ├── utils
│ │ │ ├── plugins
│ │ │ │ ├── shared.ts
│ │ │ │ └── index.ts
│ │ │ ├── versions.ts
│ │ │ ├── project-type.ts
│ │ │ ├── rules
│ │ │ │ ├── deleteFile.ts
│ │ │ │ ├── ng-add.ts
│ │ │ │ └── add-install-task.ts
│ │ │ ├── perf-logging.ts
│ │ │ ├── app-root.ts
│ │ │ └── version-utils.ts
│ │ ├── migrations
│ │ │ ├── update-9-1-0
│ │ │ │ └── update-9-1-0.ts
│ │ │ ├── update-9-0-0
│ │ │ │ └── update-9-0-0.ts
│ │ │ ├── update-9-3-0
│ │ │ │ └── update-9-3-0.ts
│ │ │ ├── update-8-4-0
│ │ │ │ └── add-nx-script.ts
│ │ │ ├── update-8-12-0
│ │ │ │ └── update-package-json-deps.ts
│ │ │ └── update-8-3-0
│ │ │ │ └── update-cypress-to-34.ts
│ │ └── command-line
│ │ │ └── supported-nx-commands.ts
│ ├── .eslintrc
│ ├── tasks-runners
│ │ └── default.ts
│ ├── testing.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── builders.json
├── cli
│ ├── .eslintrc
│ ├── lib
│ │ └── workspace.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ ├── README.md
│ └── bin
│ │ └── nx.ts
├── jest
│ ├── .eslintrc
│ ├── src
│ │ ├── schematics
│ │ │ ├── init
│ │ │ │ ├── schema.d.ts
│ │ │ │ └── schema.json
│ │ │ └── jest-project
│ │ │ │ ├── files
│ │ │ │ ├── src
│ │ │ │ │ └── test-setup.ts__tmpl__
│ │ │ │ ├── babel-jest.config.json__tmpl__
│ │ │ │ └── tsconfig.spec.json__tmpl__
│ │ │ │ └── schema.d.ts
│ │ ├── migrations
│ │ │ ├── update-10-0-0
│ │ │ │ └── require-jest-config.ts
│ │ │ ├── update-8-3-0
│ │ │ │ └── test-files
│ │ │ │ │ └── jest.config.js
│ │ │ ├── update-9-0-1
│ │ │ │ └── test-files
│ │ │ │ │ └── jest.config.js
│ │ │ └── update-9-2-0
│ │ │ │ └── update-9-2-0.ts
│ │ └── utils
│ │ │ └── versions.ts
│ ├── index.ts
│ ├── jest.config.js
│ ├── builders.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── tao
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── angular
│ ├── .eslintrc
│ ├── src
│ │ ├── schematics
│ │ │ ├── move
│ │ │ │ └── schema.d.ts
│ │ │ ├── application
│ │ │ │ └── files
│ │ │ │ │ ├── src
│ │ │ │ │ └── favicon.ico
│ │ │ │ │ └── tsconfig.json
│ │ │ ├── downgrade-module
│ │ │ │ └── schema.d.ts
│ │ │ ├── storybook-configuration
│ │ │ │ └── schema.d.ts
│ │ │ ├── ngrx
│ │ │ │ ├── creator-files
│ │ │ │ │ └── __directory__
│ │ │ │ │ │ └── __fileName__.models.ts__tmpl__
│ │ │ │ ├── rules
│ │ │ │ │ └── index.ts
│ │ │ │ └── schema.d.ts
│ │ │ ├── karma
│ │ │ │ └── schema.json
│ │ │ ├── init
│ │ │ │ └── schema.d.ts
│ │ │ ├── library
│ │ │ │ ├── files
│ │ │ │ │ └── lib
│ │ │ │ │ │ ├── README.md
│ │ │ │ │ │ └── tsconfig.json
│ │ │ │ └── lib
│ │ │ │ │ ├── normalized-schema.ts
│ │ │ │ │ └── update-lib-package-npm-scope.ts
│ │ │ ├── upgrade-module
│ │ │ │ └── schema.d.ts
│ │ │ ├── karma-project
│ │ │ │ ├── files
│ │ │ │ │ └── tsconfig.spec.json
│ │ │ │ └── schema.json
│ │ │ ├── component-cypress-spec
│ │ │ │ └── files
│ │ │ │ │ └── __componentFileName__.spec.ts__tmpl__
│ │ │ └── component-story
│ │ │ │ └── files
│ │ │ │ └── __componentFileName__.stories.ts__tmpl__
│ │ ├── utils
│ │ │ ├── test-runners.ts
│ │ │ └── versions.ts
│ │ ├── runtime
│ │ │ └── nx
│ │ │ │ └── nx.module.ts
│ │ └── migrations
│ │ │ └── update-10-0-0
│ │ │ └── update-10-0-0.ts
│ ├── testing
│ │ ├── index.ts
│ │ └── package.json
│ ├── index.ts
│ ├── jest.config.js
│ ├── builders.json
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── ng-package.json
├── linter
│ ├── .eslintrc
│ ├── builders.json
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── create-nx-plugin
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── create-nx-workspace
│ ├── .eslintrc
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
└── eslint-plugin-nx
│ ├── .eslintrc
│ ├── src
│ ├── utils
│ │ └── create-eslint-rule.ts
│ └── index.ts
│ ├── jest.config.js
│ ├── tsconfig.lib.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── README.md
├── docs
├── shared
│ ├── community-plugins.md
│ ├── migration-overview.md
│ ├── modernize-prettier.md
│ ├── api
│ │ ├── web.jpg
│ │ ├── jest.jpg
│ │ ├── nest.jpg
│ │ ├── node.jpg
│ │ ├── react.jpg
│ │ ├── angular.jpg
│ │ ├── cypress.jpg
│ │ └── express.jpg
│ ├── affected.png
│ ├── ci-graph.png
│ ├── jest-logo.png
│ ├── nest-logo.png
│ ├── cypress-logo.png
│ ├── caching-example.png
│ ├── nx-console-logo.png
│ ├── prettier-logo.png
│ ├── storybook-logo.png
│ ├── all-cache-inputs.png
│ ├── dependency-graph.png
│ ├── ci-graph-one-affected.png
│ ├── nx-console-screenshot.png
│ ├── vscode-schematics-debug.png
│ ├── ci-graph-everything-affected.png
│ ├── continue-light.svg
│ ├── monorepo-dependency-diagrams.md
│ └── examples
│ │ └── nx-examples.md
├── angular
│ ├── examples
│ │ ├── react-serve.png
│ │ ├── react-affected.png
│ │ ├── react-affected2.png
│ │ └── react-dep-graph.png
│ ├── getting-started
│ │ ├── dep-graph.png
│ │ ├── create-workspace.gif
│ │ └── advanced-nx-workspace-course.png
│ ├── migration
│ │ └── migration-angularjs-unit-tests-passing.png
│ ├── builders.json
│ ├── schematics.json
│ ├── cli
│ │ ├── report.md
│ │ ├── workspace-lint.md
│ │ └── workspace-schematic.md
│ ├── api-nx-plugin
│ │ └── builders
│ │ │ └── e2e.md
│ └── api-angular
│ │ └── schematics
│ │ └── karma.md
├── react
│ ├── getting-started
│ │ └── advanced-nx-workspace-course.png
│ ├── builders.json
│ ├── schematics.json
│ ├── cli
│ │ ├── report.md
│ │ ├── workspace-lint.md
│ │ └── workspace-schematic.md
│ ├── api-angular
│ │ └── schematics
│ │ │ └── karma.md
│ ├── examples
│ │ └── react-nx.md
│ └── api-nx-plugin
│ │ └── builders
│ │ └── e2e.md
└── builders.json
├── .yarnrc.yml
├── .prettierrc
├── nx-logo.png
├── .verdaccio
└── htpasswd
├── images
├── nx.png
├── nx-logo.png
├── nx-next.png
├── nx-react.png
├── nx-cloud-card.png
├── nx-react-video.png
├── how-to-contribute.png
├── nx-angular-video.png
├── nx-workspace-course.png
├── advanced-nx-workspace-course.png
└── Confluence-space-export-021344.html.zip
├── scripts
├── local-registry
│ └── htpasswd
├── build.sh
├── e2e.sh
├── format.sh
├── test-create-nx-workspace.sh
├── tsconfig.e2e.json
├── tsconfig.scripts.json
├── create-playground.sh
├── documentation
│ ├── check-documentation.sh
│ └── documentation.sh
├── update-playground.sh
└── check-format.sh
├── .gitignore
├── e2e
├── cli
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── web
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── angular
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── bazel
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── cypress
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── jest
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── linter
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── next
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── node
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── react
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── nx-plugin
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── storybook
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
└── workspace
│ ├── tsconfig.json
│ ├── jest.config.js
│ └── tsconfig.spec.json
├── .github
└── ISSUE_TEMPLATE
│ └── 3-discussion.md
└── jest.config.js
/packages/bazel/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/nest/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/node/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/web/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/cypress/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/express/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/nx-plugin/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/storybook/index.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/shared/community-plugins.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/shared/migration-overview.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | yarnPath: .yarn/releases/yarn-1.19.0.js
2 |
--------------------------------------------------------------------------------
/packages/next/index.ts:
--------------------------------------------------------------------------------
1 | export * from './src/utils/types';
2 |
--------------------------------------------------------------------------------
/docs/shared/modernize-prettier.md:
--------------------------------------------------------------------------------
1 | # Using Prettier
2 |
3 | TBD
4 |
--------------------------------------------------------------------------------
/packages/bazel/migrations.json:
--------------------------------------------------------------------------------
1 | {
2 | "schematics": {}
3 | }
4 |
--------------------------------------------------------------------------------
/packages/express/migrations.json:
--------------------------------------------------------------------------------
1 | {
2 | "schematics": {}
3 | }
4 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/src/app/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/component/files/__fileName__.__style__:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/files/lib/src/index.ts__tmpl__:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/node/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
--------------------------------------------------------------------------------
/packages/nx-plugin/migrations.json:
--------------------------------------------------------------------------------
1 | {
2 | "schematics": {}
3 | }
4 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/.babelrc__tmpl__:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/init/files/tools/schematics/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "endOfLine": "lf"
4 | }
5 |
--------------------------------------------------------------------------------
/nx-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/nx-logo.png
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/plugin/files/plugin/src/index.ts__tmpl__:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
--------------------------------------------------------------------------------
/packages/nx-plugin/testing.ts:
--------------------------------------------------------------------------------
1 | export * from './src/utils/testing-utils';
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/tools/schematics/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.verdaccio/htpasswd:
--------------------------------------------------------------------------------
1 | test:$6FrCaT/v0dwE:autocreated 2020-03-25T19:10:50.254Z
2 |
--------------------------------------------------------------------------------
/images/nx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx.png
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {}
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/file-graph/index.ts:
--------------------------------------------------------------------------------
1 | export * from './file-map';
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/files/lib/src/lib/__fileName__.ts__tmpl__:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/nx-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-logo.png
--------------------------------------------------------------------------------
/images/nx-next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-next.png
--------------------------------------------------------------------------------
/packages/cypress/plugins/preprocessor.ts:
--------------------------------------------------------------------------------
1 | export * from '../src/plugins/preprocessor';
2 |
--------------------------------------------------------------------------------
/scripts/local-registry/htpasswd:
--------------------------------------------------------------------------------
1 | test:$6FrCaT/v0dwE:autocreated 2020-03-25T19:10:50.254Z
2 |
--------------------------------------------------------------------------------
/images/nx-react.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-react.png
--------------------------------------------------------------------------------
/docs/shared/api/web.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/web.jpg
--------------------------------------------------------------------------------
/packages/bazel/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/cli/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/jest/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/nest/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/next/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/pages/__fileName__.__style__:
--------------------------------------------------------------------------------
1 | <%= styleContent %>
2 |
--------------------------------------------------------------------------------
/packages/node/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/src/main.ts__tmpl__:
--------------------------------------------------------------------------------
1 | console.log('Hello World!');
2 |
--------------------------------------------------------------------------------
/packages/react/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/tao/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/web/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/__dot__prettierrc:
--------------------------------------------------------------------------------
1 | <%= defaultNrwlPrettierConfig %>
--------------------------------------------------------------------------------
/docs/shared/affected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/affected.png
--------------------------------------------------------------------------------
/docs/shared/api/jest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/jest.jpg
--------------------------------------------------------------------------------
/docs/shared/api/nest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/nest.jpg
--------------------------------------------------------------------------------
/docs/shared/api/node.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/node.jpg
--------------------------------------------------------------------------------
/docs/shared/api/react.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/react.jpg
--------------------------------------------------------------------------------
/docs/shared/ci-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/ci-graph.png
--------------------------------------------------------------------------------
/docs/shared/jest-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/jest-logo.png
--------------------------------------------------------------------------------
/docs/shared/nest-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/nest-logo.png
--------------------------------------------------------------------------------
/images/nx-cloud-card.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-cloud-card.png
--------------------------------------------------------------------------------
/images/nx-react-video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-react-video.png
--------------------------------------------------------------------------------
/packages/angular/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/cypress/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/express/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/linter/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/nx-plugin/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/app/__fileName__.__style__:
--------------------------------------------------------------------------------
1 | <%= styleContent %>
2 |
--------------------------------------------------------------------------------
/packages/storybook/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/main.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import './app/app.element.ts';
2 |
--------------------------------------------------------------------------------
/packages/workspace/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | rm -rf build
3 | nx run-many --target=build --all --parallel
4 |
--------------------------------------------------------------------------------
/docs/shared/api/angular.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/angular.jpg
--------------------------------------------------------------------------------
/docs/shared/api/cypress.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/cypress.jpg
--------------------------------------------------------------------------------
/docs/shared/api/express.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/api/express.jpg
--------------------------------------------------------------------------------
/docs/shared/cypress-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/cypress-logo.png
--------------------------------------------------------------------------------
/images/how-to-contribute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/how-to-contribute.png
--------------------------------------------------------------------------------
/images/nx-angular-video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-angular-video.png
--------------------------------------------------------------------------------
/docs/shared/caching-example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/caching-example.png
--------------------------------------------------------------------------------
/docs/shared/nx-console-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/nx-console-logo.png
--------------------------------------------------------------------------------
/docs/shared/prettier-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/prettier-logo.png
--------------------------------------------------------------------------------
/docs/shared/storybook-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/storybook-logo.png
--------------------------------------------------------------------------------
/images/nx-workspace-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/nx-workspace-course.png
--------------------------------------------------------------------------------
/packages/cli/lib/workspace.ts:
--------------------------------------------------------------------------------
1 | export interface Workspace {
2 | type: 'nx' | 'angular';
3 | dir: string;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/create-nx-workspace/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/.eslintrc:
--------------------------------------------------------------------------------
1 | { "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] }
2 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface JestInitOptions {
2 | babelJest: boolean;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/files/lib/src/index.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export * from './lib/<%= fileName %>';
2 |
--------------------------------------------------------------------------------
/docs/shared/all-cache-inputs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/all-cache-inputs.png
--------------------------------------------------------------------------------
/docs/shared/dependency-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/dependency-graph.png
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/schematic/files/schematic/__fileName__/files/src/index.ts.template:
--------------------------------------------------------------------------------
1 | <%= fileTemplate %>
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/init/files/.prettierignore:
--------------------------------------------------------------------------------
1 | # Add files here to ignore them from prettier formatting
2 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/root-files/.storybook/addons.js:
--------------------------------------------------------------------------------
1 | import '@storybook/addon-knobs/register';
2 |
--------------------------------------------------------------------------------
/packages/web/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 | export const documentRegisterElementVersion = '1.13.1';
3 |
--------------------------------------------------------------------------------
/docs/angular/examples/react-serve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/examples/react-serve.png
--------------------------------------------------------------------------------
/docs/shared/ci-graph-one-affected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/ci-graph-one-affected.png
--------------------------------------------------------------------------------
/docs/shared/nx-console-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/nx-console-screenshot.png
--------------------------------------------------------------------------------
/packages/nest/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {}
4 | }
5 |
--------------------------------------------------------------------------------
/docs/angular/examples/react-affected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/examples/react-affected.png
--------------------------------------------------------------------------------
/docs/angular/examples/react-affected2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/examples/react-affected2.png
--------------------------------------------------------------------------------
/docs/angular/examples/react-dep-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/examples/react-dep-graph.png
--------------------------------------------------------------------------------
/docs/shared/vscode-schematics-debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/vscode-schematics-debug.png
--------------------------------------------------------------------------------
/images/advanced-nx-workspace-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/advanced-nx-workspace-course.png
--------------------------------------------------------------------------------
/packages/angular/src/schematics/move/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | projectName: string;
3 | destination: string;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/src/support/app.po.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export const getGreeting = () => cy.get('h1');
2 |
--------------------------------------------------------------------------------
/packages/express/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {}
4 | }
5 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/files/lib/package.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= name %>",
3 | "version": "0.0.1"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/workspace/tasks-runners/default.ts:
--------------------------------------------------------------------------------
1 | export { defaultTasksRunner as default } from '../src/tasks-runner/default-tasks-runner';
2 |
--------------------------------------------------------------------------------
/docs/angular/getting-started/dep-graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/getting-started/dep-graph.png
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/lib-files/.storybook/addons.js__tmpl__:
--------------------------------------------------------------------------------
1 | import '<%= offsetFromRoot %>../.storybook/addons';
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/move/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | projectName: string;
3 | destination: string;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/workspace/src/tasks-runner/empty-reporter.ts:
--------------------------------------------------------------------------------
1 | export class EmptyReporter {
2 | beforeRun() {}
3 |
4 | printResults() {}
5 | }
6 |
--------------------------------------------------------------------------------
/docs/shared/ci-graph-everything-affected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/shared/ci-graph-everything-affected.png
--------------------------------------------------------------------------------
/images/Confluence-space-export-021344.html.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/images/Confluence-space-export-021344.html.zip
--------------------------------------------------------------------------------
/packages/nest/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | skipFormat: boolean;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | skipFormat: boolean;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/library/files/lib/package.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@<%= prefix %>/<%= name %>",
3 | "version": "0.0.1"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | uiFramework: '@storybook/angular' | '@storybook/react';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace-schematic/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | skipFormat: boolean;
4 | }
5 |
--------------------------------------------------------------------------------
/scripts/e2e.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | export SELECTED_CLI=$SELECTED_CLI
3 | ts-node --project scripts/tsconfig.e2e.json ./scripts/e2e.ts "$@"
4 |
--------------------------------------------------------------------------------
/packages/express/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | skipFormat: boolean;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/next-env.d.ts__tmpl__:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/scripts/format.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo "Prettier"
4 | prettier "**/*.{ts,js,json,css,scss,md}" "!**/{__name__,__directory__}/**" --write
5 |
--------------------------------------------------------------------------------
/docs/angular/getting-started/create-workspace.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/getting-started/create-workspace.gif
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/src/environments/environment.prod.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/src/environments/environment.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: false
3 | };
4 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/styles.__style__:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/environments/environment.prod.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/styles.__style__:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/affected-project-graph/index.ts:
--------------------------------------------------------------------------------
1 | export * from './affected-project-graph';
2 | export * from './affected-project-graph-models';
3 |
--------------------------------------------------------------------------------
/packages/workspace/testing.ts:
--------------------------------------------------------------------------------
1 | export {
2 | createEmptyWorkspace,
3 | getFileContent,
4 | MockBuilderContext,
5 | } from './src/utils/testing-utils';
6 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/library/files/lib/src/lib/__fileName__.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export function <%= propertyName %>(): string {
2 | return '<%= name %>';
3 | }
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/environments/environment.prod.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/__dot__prettierignore:
--------------------------------------------------------------------------------
1 | # Add files here to ignore them from prettier formatting
2 |
3 | /dist
4 | /coverage
5 |
--------------------------------------------------------------------------------
/packages/angular/testing/index.ts:
--------------------------------------------------------------------------------
1 | export { cold, hot, getTestScheduler, time } from 'jasmine-marbles';
2 | export { readAll, readFirst } from './src/testing-utils';
3 |
--------------------------------------------------------------------------------
/packages/cypress/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 | export const cypressVersion = '^4.1.0';
3 | export const eslintPluginCypressVersion = '^2.10.3';
4 |
--------------------------------------------------------------------------------
/packages/express/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
3 | export const expressVersion = '4.17.1';
4 | export const expressTypingsVersion = '4.17.0';
5 |
--------------------------------------------------------------------------------
/docs/angular/getting-started/advanced-nx-workspace-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/getting-started/advanced-nx-workspace-course.png
--------------------------------------------------------------------------------
/docs/react/getting-started/advanced-nx-workspace-course.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/react/getting-started/advanced-nx-workspace-course.png
--------------------------------------------------------------------------------
/packages/workspace/src/core/project-graph/build-nodes/index.ts:
--------------------------------------------------------------------------------
1 | export * from './build-nodes';
2 | export * from './workspace-projects';
3 | export * from './npm-packages';
4 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/src/fixtures/example.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Using fixtures to represent data",
3 | "email": "hello@cypress.io"
4 | }
5 |
--------------------------------------------------------------------------------
/scripts/test-create-nx-workspace.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ./scripts/link.sh
4 | PUBLISHED_VERSION=$1 jest --maxWorkers=1 ./build/e2e/commands/create-nx-workspace.test.js
5 |
--------------------------------------------------------------------------------
/docs/angular/migration/migration-angularjs-unit-tests-passing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/docs/angular/migration/migration-angularjs-unit-tests-passing.png
--------------------------------------------------------------------------------
/docs/builders.json:
--------------------------------------------------------------------------------
1 | [
2 | "cypress",
3 | "express",
4 | "jest",
5 | "linter",
6 | "nest",
7 | "node",
8 | "storybook",
9 | "web",
10 | "workspace"
11 | ]
12 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/application/files/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/packages/angular/src/schematics/application/files/src/favicon.ico
--------------------------------------------------------------------------------
/packages/next/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | e2eTestRunner: 'cypress' | 'none';
4 | skipFormat: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/packages/web/src/schematics/application/files/app/src/favicon.ico
--------------------------------------------------------------------------------
/packages/web/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | e2eTestRunner: 'cypress' | 'none';
4 | skipFormat: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chandu-muthyala/nx/master/packages/react/src/schematics/application/files/app/src/favicon.ico
--------------------------------------------------------------------------------
/packages/react/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | unitTestRunner: 'jest' | 'none';
3 | e2eTestRunner: 'cypress' | 'none';
4 | skipFormat: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/storybook/src/builders/storybook/storybook.impl.spec.ts:
--------------------------------------------------------------------------------
1 | describe('storybook builer', () => {
2 | it('should have a test', () => {
3 | expect(true).toBeTruthy();
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/remove/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema extends json.JsonObject {
2 | projectName: string;
3 | skipFormat: boolean;
4 | forceRemove: boolean;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/__workspaceFile__.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "projects": {},
4 | "cli": {
5 | "defaultCollection": "@nrwl/workspace"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/jest/src/migrations/update-10-0-0/require-jest-config.ts:
--------------------------------------------------------------------------------
1 | // export so that we can mock this return value
2 | export function getJestObject(path: string) {
3 | return require(path);
4 | }
5 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/src/utils/create-eslint-rule.ts:
--------------------------------------------------------------------------------
1 | import { ESLintUtils } from '@typescript-eslint/experimental-utils';
2 |
3 | export const createESLintRule = ESLintUtils.RuleCreator(() => ``);
4 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/run-commands/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | command: string;
4 | project: string;
5 | cwd?: string;
6 | outputs?: string;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/plugin/files/plugin/builders.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "<%= offsetFromRoot %>node_modules/@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {}
4 | }
5 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/utils/testing-utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './async-commands';
2 | export * from './commands';
3 | export * from './paths';
4 | export * from './nx-project';
5 | export * from './utils';
6 |
--------------------------------------------------------------------------------
/packages/jest/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | addPropertyToJestConfig,
3 | removePropertyFromJestConfig,
4 | } from './src/utils/config/update-config';
5 | export { jestConfigObjectAst } from './src/utils/config/functions';
6 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/builder/files/builder/__fileName__/schema.d.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { JsonObject } from '@angular-devkit/core';
2 |
3 | export interface <%= className %>BuilderSchema extends JsonObject {}
4 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/schematic/files/schematic/__fileName__/schema.d.ts__tmpl__:
--------------------------------------------------------------------------------
1 | export interface <%= className %>SchematicSchema {
2 | name: string;
3 | tags?: string;
4 | directory?: string;
5 | }
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/root-files/.storybook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "exclude": ["../**/test.ts", "../**/*.spec.ts"],
4 | "include": ["../**/*"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/react/typings/style.d.ts:
--------------------------------------------------------------------------------
1 | export type SupportedStyles =
2 | | 'css'
3 | | 'scss'
4 | | 'styl'
5 | | 'less'
6 | | 'styled-components'
7 | | '@emotion/styled'
8 | | 'styled-jsx'
9 | | 'none';
10 |
--------------------------------------------------------------------------------
/packages/react/typings/styled-jsx.d.ts:
--------------------------------------------------------------------------------
1 | import 'react';
2 |
3 | declare module 'react' {
4 | interface StyleHTMLAttributes extends React.HTMLAttributes {
5 | jsx?: boolean;
6 | global?: boolean;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | skipInstall: boolean;
4 | npmScope?: string;
5 | preserveAngularCLILayout: boolean;
6 | defaultBase?: string;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/plugins/shared.ts:
--------------------------------------------------------------------------------
1 | // Lifted in part from https://github.com/nrwl/angular-console
2 |
3 | export function hasElements(obj: any): boolean {
4 | return obj && Object.values(obj).length > 0;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/downgrade-module/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | angularJsImport: string;
3 | name: string;
4 | skipFormat: boolean;
5 | skipPackageJson: boolean;
6 | project: string;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/library/files/lib/src/lib/__fileName__.service.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@nestjs/common';
2 |
3 | @Injectable()
4 | export class <%= className %>Service {
5 | constructor() {}
6 | }
7 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/.babelrc__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["next/babel"],
3 | "plugins": [<% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/react/index.ts:
--------------------------------------------------------------------------------
1 | export { extraEslintDependencies, reactEslintJson } from './src/utils/lint';
2 | export { CSS_IN_JS_DEPENDENCIES } from './src/utils/styled';
3 | export { assertValidStyle } from './src/utils/assertion';
4 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/builders/e2e/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { JsonObject } from '@angular-devkit/core';
2 |
3 | export interface Schema extends JsonObject {
4 | target: string;
5 | jestConfig: string;
6 | tsSpecConfig: string;
7 | }
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .idea
3 | /.vscode
4 | dist
5 | /build
6 | /coverage
7 | test
8 | .DS_Store
9 | tmp
10 | *.log
11 | .ng_pkg_build
12 | jest.debug.config.js
13 | .tool-versions
14 | /.verdaccio/build/local-registry
15 |
--------------------------------------------------------------------------------
/docs/react/builders.json:
--------------------------------------------------------------------------------
1 | [
2 | "angular",
3 | "cypress",
4 | "express",
5 | "jest",
6 | "linter",
7 | "nest",
8 | "next",
9 | "node",
10 | "nx-plugin",
11 | "storybook",
12 | "web",
13 | "workspace"
14 | ]
15 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/storybook-configuration/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface StorybookConfigureSchema {
2 | name: string;
3 | configureCypress: boolean;
4 | generateStories: boolean;
5 | generateCypressSpecs: boolean;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/bazel/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxBazelInit",
4 | "title": "Bazel Init Schema",
5 | "type": "object",
6 | "properties": {},
7 | "required": []
8 | }
9 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/jest-project/files/src/test-setup.ts__tmpl__:
--------------------------------------------------------------------------------
1 | <% if (setupFile === 'angular') { %>import 'jest-preset-angular';
2 | <% } else if (setupFile === 'web-components') { %>import 'document-register-element';<% } %>
3 |
--------------------------------------------------------------------------------
/docs/angular/builders.json:
--------------------------------------------------------------------------------
1 | [
2 | "angular",
3 | "cypress",
4 | "express",
5 | "jest",
6 | "linter",
7 | "nest",
8 | "next",
9 | "node",
10 | "nx-plugin",
11 | "storybook",
12 | "web",
13 | "workspace"
14 | ]
15 |
--------------------------------------------------------------------------------
/packages/angular/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | DataPersistence,
3 | fetch,
4 | navigation,
5 | optimisticUpdate,
6 | pessimisticUpdate,
7 | } from './src/runtime/nx/data-persistence';
8 | export { NxModule } from './src/runtime/nx/nx.module';
9 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxCypressInit",
4 | "title": "Add Cypress Configuration to the workspace",
5 | "type": "object",
6 | "properties": {}
7 | }
8 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/ngrx/creator-files/__directory__/__fileName__.models.ts__tmpl__:
--------------------------------------------------------------------------------
1 | /**
2 | * Interface for the '<%= className %>' data
3 | */
4 | export interface <%= className %>Entity {
5 | id: string | number; // Primary ID
6 | };
--------------------------------------------------------------------------------
/packages/bazel/src/schematics/sync/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "SchematicsNxApp",
4 | "title": "Nx Application Options Schema",
5 | "type": "object",
6 | "properties": {},
7 | "required": []
8 | }
9 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/index.d.ts__tmpl__:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | declare module '*.svg' {
3 | const content: any;
4 | export const ReactComponent: any;
5 | export default content;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/react/src/utils/dependencies.ts:
--------------------------------------------------------------------------------
1 | export interface PackageDependencies {
2 | dependencies: DependencyEntries;
3 | devDependencies: DependencyEntries;
4 | }
5 |
6 | export interface DependencyEntries {
7 | [module: string]: string;
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "../build/e2e-out",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": ["**/*.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/scripts/tsconfig.scripts.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "../scripts/tools-out",
5 | "module": "commonjs",
6 | "types": ["node"]
7 | },
8 | "include": ["**/*.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/docs/angular/schematics.json:
--------------------------------------------------------------------------------
1 | [
2 | "angular",
3 | "bazel",
4 | "cypress",
5 | "express",
6 | "jest",
7 | "nest",
8 | "next",
9 | "node",
10 | "nx-plugin",
11 | "react",
12 | "storybook",
13 | "web",
14 | "workspace"
15 | ]
16 |
--------------------------------------------------------------------------------
/docs/react/schematics.json:
--------------------------------------------------------------------------------
1 | [
2 | "angular",
3 | "bazel",
4 | "cypress",
5 | "express",
6 | "jest",
7 | "nest",
8 | "next",
9 | "node",
10 | "nx-plugin",
11 | "react",
12 | "storybook",
13 | "web",
14 | "workspace"
15 | ]
16 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/utils/get-file-template.ts:
--------------------------------------------------------------------------------
1 | import { stripIndents } from '@angular-devkit/core/src/utils/literals';
2 |
3 | export function getFileTemplate() {
4 | return stripIndents`
5 | const variable = "<%= projectName %>";
6 | `;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/files/lib/README.md:
--------------------------------------------------------------------------------
1 | # <%= name %>
2 |
3 | This library was generated with [Nx](https://nx.dev).
4 |
5 | ## Running unit tests
6 |
7 | Run `nx test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
8 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface Schema {
4 | project: string;
5 | name: string;
6 | directory: string;
7 | linter: Linter;
8 | js?: boolean;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/plugin/files/plugin/collection.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "<%= offsetFromRoot %>node_modules/@angular-devkit/schematics/collection-schema.json",
3 | "name": "<%= name %>",
4 | "version": "0.0.1",
5 | "schematics": {}
6 | }
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/plugin/files/plugin/package.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= npmPackageName %>",
3 | "version": "0.0.1",
4 | "main": "src/index.js",
5 | "schematics": "./collection.json",
6 | "builders": "./builders.json",
7 | }
--------------------------------------------------------------------------------
/packages/react/src/utils/jest-utils.ts:
--------------------------------------------------------------------------------
1 | export function updateJestConfigContent(content: string) {
2 | return content.replace(
3 | 'transform: {',
4 | "transform: {\n '^(?!.*\\\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',"
5 | );
6 | }
7 |
--------------------------------------------------------------------------------
/packages/storybook/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 | export const storybookVersion = '5.3.9';
3 | export const babelCoreVersion = '7.9.6';
4 | export const babelLoaderVersion = '8.1.0';
5 | export const babelPresetTypescriptVersion = '7.9.0';
6 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/project-graph/build-dependencies/index.ts:
--------------------------------------------------------------------------------
1 | export * from './build-dependencies';
2 | export * from './implicit-project-dependencies';
3 | export * from './explicit-project-dependencies';
4 | export * from './explicit-npm-dependencies';
5 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/karma/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxAngularKarma",
4 | "title": "Add Karma Configuration to the workspace",
5 | "type": "object",
6 | "properties": {},
7 | "required": []
8 | }
9 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offset %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/application/files/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/init/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { UnitTestRunner } from '../../utils/test-runners';
2 | export interface Schema {
3 | unitTestRunner: UnitTestRunner;
4 | e2eTestRunner: E2eTestRunner;
5 | skipFormat: boolean;
6 | skipInstall?: boolean;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/nest/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
3 | export const nestJsVersion = '^7.0.0';
4 | export const nestJsSchematicsVersion = '^7.0.0';
5 |
6 | export const rxjsVersion = '~6.5.5';
7 |
8 | export const reflectMetadataVersion = '^0.1.13';
9 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.app.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/files/lib/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.lib.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/tao-new/tao-new.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { sharedNew, Schema } from '../shared-new/shared-new';
3 |
4 | export default function (options: Schema): Rule {
5 | return sharedNew('nx', options);
6 | }
7 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.e2e.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/ng-new/ng-new.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { sharedNew, Schema } from '../shared-new/shared-new';
3 |
4 | export default function (options: Schema): Rule {
5 | return sharedNew('angular', options);
6 | }
7 |
--------------------------------------------------------------------------------
/packages/angular/src/utils/test-runners.ts:
--------------------------------------------------------------------------------
1 | export const enum UnitTestRunner {
2 | Karma = 'karma',
3 | Jest = 'jest',
4 | None = 'none',
5 | }
6 | export const enum E2eTestRunner {
7 | Protractor = 'protractor',
8 | Cypress = 'cypress',
9 | None = 'none',
10 | }
11 |
--------------------------------------------------------------------------------
/packages/bazel/src/schematics/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const bazelVersion = '^1.2.0';
2 | export const iBazelVersion = '0.10.3';
3 | export const rulesNodeJSVersion = '0.42.3';
4 | export const rulesNodeJSSha =
5 | 'a54b2511d6dae42c1f7cdaeb08144ee2808193a088004fc3b464a04583d5aa2e';
6 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/application/files/app/app.service.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@nestjs/common';
2 |
3 | @Injectable()
4 | export class AppService {
5 | getData(): { message: string } {
6 | return ({ message: 'Welcome to <%= name %>!' });
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/e2e-project/files/tsconfig.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.e2e.json"
8 | }
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/react/plugins/bundle-babel.ts:
--------------------------------------------------------------------------------
1 | import { updateBabelOptions } from '../src/utils/babel-utils';
2 |
3 | function getRollupBabelOptions(babelOptions: any) {
4 | updateBabelOptions(babelOptions);
5 | return babelOptions;
6 | }
7 |
8 | module.exports = getRollupBabelOptions;
9 |
--------------------------------------------------------------------------------
/e2e/cli/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/bazel/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/cypress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/jest/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/linter/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/next/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/node/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/react/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/library/files/lib/README.md:
--------------------------------------------------------------------------------
1 | # <%= name %>
2 |
3 | This library was generated with [Nx](https://nx.dev).
4 | <% if (unitTestRunner !== 'none') { %>
5 |
6 | ## Running unit tests
7 |
8 | Run `nx test <%= name %>` to execute the unit tests.
9 | <% } %>
10 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/upgrade-module/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | project: string;
3 | angularJsImport: string;
4 | angularJsCmpSelector: string;
5 | name: string;
6 | skipFormat: boolean;
7 | skipPackageJson: boolean;
8 | router: boolean;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface StorybookConfigureSchema {
4 | name: string;
5 | uiFramework: string;
6 | configureCypress: boolean;
7 | linter: Linter;
8 | js?: boolean;
9 | }
10 |
--------------------------------------------------------------------------------
/docs/shared/continue-light.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/e2e/nx-plugin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/storybook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/e2e/workspace/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.spec.json"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/files/app/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "<%= offset %>dist/out-tsc",
5 | "types": ["node"]
6 | },
7 | "exclude": ["**/*.spec.ts"],
8 | "include": ["**/*.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/files/lib/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5 | "types": []
6 | },
7 | "exclude": ["**/*.spec.ts"],
8 | "include": ["**/*.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/ngrx/rules/index.ts:
--------------------------------------------------------------------------------
1 | export { RequestContext } from './request-context';
2 | export { addImportsToModule } from './add-imports-to-module';
3 | export { addNgRxToPackageJson } from './add-ngrx-to-package-json';
4 | export { addExportsToBarrel } from './add-exports-barrel';
5 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { <%= propertyName %> } from './<%= fileName %>';
2 |
3 | describe('<%= propertyName %>', () => {
4 | it('should work', () => {
5 | expect(<%= propertyName %>()).toEqual('<%= name %>');
6 | })
7 | })
--------------------------------------------------------------------------------
/packages/react/babel.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Babel preset to provide React support for Nx.
3 | */
4 |
5 | module.exports = function (api: any, options: {}) {
6 | api.assertVersion(7);
7 | return {
8 | presets: [[require.resolve('@babel/preset-react'), { useBuiltIns: true }]],
9 | };
10 | };
11 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5 | "types": ["node"]
6 | },
7 | "exclude": ["**/*.spec.ts"],
8 | "include": ["**/*.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/src/index.ts:
--------------------------------------------------------------------------------
1 | import enforceModuleBoundaries, {
2 | RULE_NAME as enforceModuleBoundariesRuleName,
3 | } from './rules/enforce-module-boundaries';
4 |
5 | module.exports = {
6 | rules: {
7 | [enforceModuleBoundariesRuleName]: enforceModuleBoundaries,
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/react/ast-utils.ts:
--------------------------------------------------------------------------------
1 | // Exported schematics development outside of Nx. e.g. workspace schematics
2 | export {
3 | findMainRenderStatement,
4 | findComponentImportPath,
5 | findElements,
6 | findDefaultExport,
7 | findClosestOpening,
8 | isTag,
9 | } from './src/utils/ast-utils';
10 |
--------------------------------------------------------------------------------
/packages/bazel/src/schematics/sync/files/root-build-file/BUILD.bazel__tmpl__:
--------------------------------------------------------------------------------
1 | filegroup(
2 | name = "root-files",
3 | srcs = [
4 | # Root Files
5 | <% for (rootFile of rootFiles) { %>"<%= rootFile %>",
6 | <% } %>
7 | ],
8 | visibility = ["//:__subpackages__"],
9 | )
10 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/polyfills.ts__tmpl__:
--------------------------------------------------------------------------------
1 | /**
2 | * Polyfill stable language features. These imports will be optimized by `@babel/preset-env`.
3 | *
4 | * See: https://github.com/zloirock/core-js#babel
5 | */
6 | import 'core-js/stable';
7 | import 'regenerator-runtime/runtime';
8 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/lib-files/.storybook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>../tsconfig.base.json",
3 | "compilerOptions": {
4 | "emitDecoratorMetadata": true
5 | },
6 | "exclude": ["../src/test.ts", "../**/*.spec.ts"],
7 | "include": ["../src/**/*"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/polyfills.ts__tmpl__:
--------------------------------------------------------------------------------
1 | /**
2 | * Polyfill stable language features. These imports will be optimized by `@babel/preset-env`.
3 | *
4 | * See: https://github.com/zloirock/core-js#babel
5 | */
6 | import 'core-js/stable';
7 | import 'regenerator-runtime/runtime';
8 |
--------------------------------------------------------------------------------
/packages/workspace/src/tasks-runner/tasks-runner-v2.ts:
--------------------------------------------------------------------------------
1 | import { defaultTasksRunner } from './default-tasks-runner';
2 |
3 | export {
4 | DefaultTasksRunnerOptions,
5 | RemoteCache,
6 | defaultTasksRunner as tasksRunnerV2,
7 | } from './default-tasks-runner';
8 |
9 | export default defaultTasksRunner;
10 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/lib-files/.storybook/config.js__tmpl__:
--------------------------------------------------------------------------------
1 | import { configure, addDecorator } from '<%= uiFramework %>';
2 | import { withKnobs } from '@storybook/addon-knobs';
3 |
4 | addDecorator(withKnobs);
5 | configure(require.context('../src/lib', true, /\.stories\.(j|t)sx?$/), module);
6 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/files/lib/README.md:
--------------------------------------------------------------------------------
1 | # <%= name %>
2 |
3 | This library was generated with [Nx](https://nx.dev).
4 | <% if(hasUnitTestRunner) { %>
5 |
6 | ## Running unit tests
7 |
8 | Run `ng test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
9 |
10 | <% } %>
11 |
--------------------------------------------------------------------------------
/scripts/create-playground.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | ./scripts/link.sh 9999.0.1
3 |
4 | rm -rf tmp
5 | mkdir -p tmp/angular
6 | mkdir -p tmp/nx
7 |
8 | PUBLISHED_VERSION=9999.0.1 npm_config_registry=http://localhost:4872/ jest --maxWorkers=1 -c "./build/e2e/jest-config.js" ./build/e2e/commands/create-playground.test.js
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/3-discussion.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "💡 Discussion"
3 | about: "Start a thread to discuss an idea"
4 | labels: "type: question / discussion"
5 |
6 | ---
7 |
8 |
9 |
10 | ## Description
11 |
12 |
--------------------------------------------------------------------------------
/packages/bazel/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'bazel',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/cli/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'cli',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/jest/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'jest',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/nest/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'nest',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/next/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'next',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/node/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'node',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/react/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'react',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/environments/environment.ts__tmpl__:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // When building for production, this file is replaced with `environment.prod.ts`.
3 |
4 | export const environment = {
5 | production: false
6 | };
7 |
--------------------------------------------------------------------------------
/packages/tao/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'tao',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/web/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'web',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/environments/environment.ts__tmpl__:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // When building for production, this file is replaced with `environment.prod.ts`.
3 |
4 | export const environment = {
5 | production: false
6 | };
7 |
--------------------------------------------------------------------------------
/packages/angular/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'angular',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/karma-project/files/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5 | "types": ["jasmine", "node"]
6 | },
7 | "files": ["src/test.ts"],
8 | "include": ["**/*.spec.ts", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/cypress/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'cypress',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/cypress/src/utils/cypress-version.ts:
--------------------------------------------------------------------------------
1 | const cypressPackageVersion = require('cypress/package.json').version;
2 |
3 | export function installedCypressVersion() {
4 | const majorVersion = cypressPackageVersion.split('.')[0];
5 | if (!majorVersion) {
6 | return 0;
7 | }
8 | return +majorVersion;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/express/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'express',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/linter/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "lint": {
5 | "implementation": "./src/builders/lint/lint.impl",
6 | "schema": "./src/builders/lint/schema.json",
7 | "description": "Lint a project"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/linter/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'linter',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/project-graph/build-nodes/build-nodes.ts:
--------------------------------------------------------------------------------
1 | import { AddProjectNode, ProjectGraphContext } from '../project-graph-models';
2 |
3 | export interface BuildNodes {
4 | (
5 | ctx: ProjectGraphContext,
6 | addNode: AddProjectNode,
7 | fileRead: (s: string) => string
8 | ): void;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/jest/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "jest": {
5 | "implementation": "./src/builders/jest/jest.impl",
6 | "schema": "./src/builders/jest/schema.json",
7 | "description": "Run Jest unit tests"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/jest/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/nx-plugin/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'nx-plugin',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/storybook/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'storybook',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/tao/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | prefix?: string;
4 | style?: string;
5 | skipFormat: boolean;
6 | directory?: string;
7 | tags?: string;
8 | unitTestRunner: 'jest' | 'none';
9 | e2eTestRunner: 'cypress' | 'none';
10 | linter: Linter;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/workspace/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'workspace',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/.vscode/extensions.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | <% if(cli === 'angular') { %>
4 | "nrwl.angular-console",
5 | "angular.ng-template",<% }
6 | %>
7 | "ms-vscode.vscode-typescript-tslint-plugin",
8 | "esbenp.prettier-vscode"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/scripts/documentation/check-documentation.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | if [ -z "$(git status --porcelain ./docs)" ]; then
4 | echo "📄 Documentation not modified";
5 | exit 0;
6 | else
7 | echo "📄 Documentation has been modified, you need to commit the changes.";
8 | git status --porcelain ./docs
9 | exit 1;
10 | fi
--------------------------------------------------------------------------------
/e2e/cli/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'cli',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/jest/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'jest',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/next/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'next',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/node/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'node',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/web/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'web',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
3 | transform: {
4 | '^.+\\.(ts|js|html)$': 'ts-jest',
5 | },
6 | resolver: '../../scripts/patched-jest-resolver.js',
7 | moduleFileExtensions: ['ts', 'js', 'html'],
8 | coverageReporters: ['html'],
9 | maxWorkers: 2,
10 | };
11 |
--------------------------------------------------------------------------------
/packages/cypress/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/jest-project/files/babel-jest.config.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "node": "current"
8 | }
9 | }
10 | ],
11 | "@babel/preset-typescript",
12 | "@babel/preset-react"
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/storybook-configuration/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface StorybookConfigureSchema {
4 | name: string;
5 | configureCypress: boolean;
6 | generateStories?: boolean;
7 | generateCypressSpecs?: boolean;
8 | js?: boolean;
9 | linter?: Linter;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/storybook/src/migrations/update-9-2-0/update-9-2-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import { addCacheableOperation } from '../../schematics/init/init';
3 | import { formatFiles } from '@nrwl/workspace';
4 |
5 | export default function () {
6 | return chain([addCacheableOperation, formatFiles()]);
7 | }
8 |
--------------------------------------------------------------------------------
/packages/workspace/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/e2e/bazel/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'bazel',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/linter/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'linter',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/react/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'react',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/packages/angular/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 | export const angularVersion = '^10.0.0';
3 | export const angularDevkitVersion = '~0.1000.0';
4 | export const angularJsVersion = '1.7.9';
5 | export const ngrxVersion = '9.1.0';
6 | export const rxjsVersion = '~6.5.5';
7 | export const jestPresetAngularVersion = '8.1.2';
8 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/jest-project/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface JestProjectSchema {
2 | project: string;
3 | supportTsx: boolean;
4 | skipSetupFile: boolean;
5 | setupFile: 'angular' | 'web-components' | 'none';
6 | skipSerializers: boolean;
7 | testEnvironment: 'node' | 'jsdom' | '';
8 | babelJest: boolean;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/node/migrations.json:
--------------------------------------------------------------------------------
1 | {
2 | "schematics": {
3 | "set-build-libs-from-source": {
4 | "version": "9.2.0-beta.1",
5 | "description": "Set buildLibsFromSource property to true to not break existing projects.",
6 | "factory": "./src/migrations/update-9-2-0/set-build-libs-from-source"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/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/workspace/src/schematics/init/files/tools/tsconfig.tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "../dist/out-tsc/tools",
5 | "rootDir": ".",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": ["node"]
9 | },
10 | "include": ["**/*.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/e2e/angular/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'angular',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/cypress/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'cypress',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/nx-plugin/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'nx-plugin',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/storybook/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'storybook',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/e2e/workspace/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'workspace',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | maxWorkers: 1,
9 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
10 | };
11 |
--------------------------------------------------------------------------------
/packages/cli/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'create-nx-plugin',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/cypress/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "cypress": {
5 | "implementation": "./src/builders/cypress/cypress.impl",
6 | "schema": "./src/builders/cypress/schema.json",
7 | "description": "Run Cypress e2e tests"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'eslint-plugin-nx',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/nest/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/next/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/node/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/web/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/tools/tsconfig.tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "../dist/out-tsc/tools",
5 | "rootDir": ".",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": ["node"]
9 | },
10 | "include": ["**/*.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/angular/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "package": {
5 | "implementation": "./src/builders/package/package.impl",
6 | "schema": "./src/builders/package/schema.json",
7 | "description": "Build an Angular library"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/angular/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/bazel/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/cli/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/create-nx-workspace/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'create-nx-workspace',
3 | preset: '../../jest.config.js',
4 | transform: {
5 | '^.+\\.[tj]sx?$': 'ts-jest',
6 | },
7 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8 | globals: { 'ts-jest': { tsConfig: '/tsconfig.spec.json' } },
9 | };
10 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "sourceMap": false,
5 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
6 | "allowJs": true,
7 | "types": ["cypress", "node"]
8 | },
9 | "include": ["src/**/*.ts", "src/**/*.js"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/express/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/jest/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/linter/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/nest/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/next/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/node/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nx-plugin/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "e2e": {
5 | "implementation": "./src/builders/e2e/e2e.impl",
6 | "schema": "./src/builders/e2e/schema.json",
7 | "description": "Creates and runs an e2e for a Nx Plugin"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/builder/files/builder/__fileName__/schema.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json-schema.org/draft-07/schema",
3 | "$id": "https://json-schema.org/draft-07/schema",
4 | "title": "<%= className %> builder",
5 | "description": "",
6 | "type": "object",
7 | "properties": {},
8 | "required": []
9 | }
10 |
--------------------------------------------------------------------------------
/packages/react/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/storybook/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/tao/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/project-graph/index.ts:
--------------------------------------------------------------------------------
1 | export { createProjectGraph } from './project-graph';
2 | export { BuildDependencies } from './build-dependencies';
3 | export { BuildNodes } from './build-nodes';
4 | export { ProjectGraphBuilder } from './project-graph-builder';
5 | export * from './project-graph-models';
6 | export * from './operators';
7 |
--------------------------------------------------------------------------------
/packages/angular/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/bazel/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/cypress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/express/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/linter/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nx-plugin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/files/lib/.babelrc__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@nrwl/react/babel",
4 | <% if (style === '@emotion/styled') { %>"@emotion/babel-preset-css-prop"<% } %>
5 | ],
6 | "plugins": [
7 | <% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
8 | ]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/react/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/storybook/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/workspace/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/create-nx-workspace/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/application/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface Schema {
4 | name: string;
5 | skipFormat: boolean;
6 | skipPackageJson: boolean;
7 | directory?: string;
8 | unitTestRunner: 'jest' | 'none';
9 | linter: Linter;
10 | tags?: string;
11 | frontendProject?: string;
12 | }
13 |
--------------------------------------------------------------------------------
/packages/nx-plugin/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "../../dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./",
8 | "types": ["node", "jest"]
9 | },
10 | "exclude": ["**/*.spec.ts", "**/*_spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/preset/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | npmScope?: string;
4 | style?: string;
5 | cli: string;
6 | preset:
7 | | 'empty'
8 | | 'oss'
9 | | 'angular'
10 | | 'react'
11 | | 'next'
12 | | 'web-components'
13 | | 'angular-nest'
14 | | 'react-express';
15 | }
16 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
3 | export const angularCliVersion = '~10.0.0';
4 | export const typescriptVersion = '~3.9.3';
5 | export const prettierVersion = '2.0.4';
6 | export const typescriptESLintVersion = '2.19.2';
7 | export const eslintVersion = '6.8.0';
8 | export const eslintConfigPrettierVersion = '6.0.0';
9 |
--------------------------------------------------------------------------------
/e2e/bazel/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/cli/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/jest/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/linter/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/next/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/node/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/react/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/web/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/create-nx-workspace/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "types": ["node", "jest"]
5 | },
6 | "include": [],
7 | "files": [],
8 | "references": [
9 | {
10 | "path": "./tsconfig.lib.json"
11 | },
12 | {
13 | "path": "./tsconfig.spec.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/application/files/app/app.module.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { Module } from '@nestjs/common';
2 |
3 | import { AppController } from './app.controller';
4 | import { AppService } from './app.service';
5 |
6 | @Module({
7 | imports: [],
8 | controllers: [AppController],
9 | providers: [AppService],
10 | })
11 | export class AppModule {}
12 |
--------------------------------------------------------------------------------
/e2e/angular/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/cypress/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/nx-plugin/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/storybook/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/e2e/workspace/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/jest/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/tao/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/files/__dot__editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://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 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/library/files/lib/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "files": [],
4 | "include": [],
5 | "references": [
6 | {
7 | "path": "./tsconfig.lib.json"
8 | }<% if (publishable) { %>,
9 | {
10 | "path": "./tsconfig.lib.prod.json"
11 | }
12 | <% } %>
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/packages/cypress/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/builder/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | project: string;
3 | name: string;
4 | description?: string;
5 | unitTestRunner: 'jest' | 'none';
6 | }
7 |
8 | export interface NormalizedSchema extends Schema {
9 | fileName: string;
10 | projectRoot: string;
11 | projectSourceRoot: string;
12 | npmScope: string;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace-schematic/files/__name__/index.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import {
2 | chain,
3 | externalSchematic,
4 | Rule
5 | } from '@angular-devkit/schematics';
6 |
7 | export default function(schema: any): Rule {
8 | return chain([
9 | externalSchematic('@nrwl/workspace', 'lib', {
10 | name: schema.name
11 | })
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*.spec.tsx",
11 | "**/*.spec.js",
12 | "**/*.spec.jsx",
13 | "**/*.d.ts"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/library/lib/normalized-schema.ts:
--------------------------------------------------------------------------------
1 | import { Schema } from '../schema';
2 |
3 | export interface NormalizedSchema extends Schema {
4 | name: string;
5 | fileName: string;
6 | projectRoot: string;
7 | entryFile: string;
8 | modulePath: string;
9 | moduleName: string;
10 | projectDirectory: string;
11 | parsedTags: string[];
12 | }
13 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/library/files/lib/tsconfig.lib.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "module": "commonjs",
5 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
6 | "declaration": true,
7 | "rootDir": "./src",
8 | "types": ["node"]
9 | },
10 | "exclude": ["**/*.spec.ts"],
11 | "include": ["**/*.ts"]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "run-commands": {
5 | "implementation": "./src/builders/run-commands/run-commands.impl",
6 | "schema": "./src/builders/run-commands/schema.json",
7 | "description": "Run any custom commands with Nx"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/project-type.ts:
--------------------------------------------------------------------------------
1 | export enum ProjectType {
2 | Application = 'application',
3 | Library = 'library',
4 | }
5 |
6 | export function projectRootDir(projectType: ProjectType) {
7 | if (projectType == ProjectType.Application) {
8 | return 'apps';
9 | } else if (projectType == ProjectType.Library) {
10 | return 'libs';
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/rules/deleteFile.ts:
--------------------------------------------------------------------------------
1 | import { forEach, FileEntry, Rule } from '@angular-devkit/schematics';
2 |
3 | /**
4 | * Remove a file from the Virtual Schematic Tree
5 | */
6 | export function deleteFile(from: string): Rule {
7 | return forEach((entry: FileEntry): FileEntry | null => {
8 | return entry.path === from ? null : entry;
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/packages/jest/src/migrations/update-8-3-0/test-files/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
3 | transform: {
4 | '^.+\\.(ts|js|html)$': 'ts-jest',
5 | },
6 | resolver: '@nrwl/jest/plugins/resolver',
7 | moduleFileExtensions: ['ts', 'js', 'html'],
8 | collectCoverage: true,
9 | coverageReporters: ['html'],
10 | };
11 |
--------------------------------------------------------------------------------
/packages/jest/src/migrations/update-9-0-1/test-files/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
3 | transform: {
4 | '^.+\\.(ts|js|html)$': 'ts-jest',
5 | },
6 | resolver: '@nrwl/jest/plugins/resolver',
7 | moduleFileExtensions: ['ts', 'js', 'html'],
8 | coverageReporters: ['html'],
9 | passWithNoTests: true,
10 | };
11 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/migration/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | project: string;
3 | name: string;
4 | description: string;
5 | version: string;
6 | packageJsonUpdates: boolean;
7 | unitTestRunner: 'jest' | 'none';
8 | }
9 |
10 | export interface NormalizedSchema extends Schema {
11 | projectRoot: string;
12 | projectSourceRoot: string;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/perf-logging.ts:
--------------------------------------------------------------------------------
1 | import { PerformanceObserver } from 'perf_hooks';
2 |
3 | if (process.env.NX_PERF_LOGGING) {
4 | const obs = new PerformanceObserver((list) => {
5 | const entry = list.getEntries()[0];
6 | console.log(`Time for '${entry.name}'`, entry.duration);
7 | });
8 | obs.observe({ entryTypes: ['measure'], buffered: false });
9 | }
10 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/library/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface Schema {
4 | name: string;
5 | directory?: string;
6 | skipTsConfig: boolean;
7 | skipFormat: boolean;
8 | tags?: string;
9 | unitTestRunner: 'jest' | 'none';
10 | linter: Linter;
11 | publishable?: boolean;
12 | testEnvironment: 'jsdom' | 'node';
13 | }
14 |
--------------------------------------------------------------------------------
/packages/bazel/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/cli/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/linter/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/application/files/app/app.controller.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { Controller, Get } from '@nestjs/common';
2 |
3 | import { AppService } from './app.service';
4 |
5 | @Controller()
6 | export class AppController {
7 | constructor(private readonly appService: AppService) {}
8 |
9 | @Get()
10 | getData() {
11 | return this.appService.getData();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/nest/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/next/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/node/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/react/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/web/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/docs/react/cli/report.md:
--------------------------------------------------------------------------------
1 | # report
2 |
3 | Reports useful version numbers to copy into the Nx issue template
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx report
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### version
20 |
21 | Show version number
22 |
--------------------------------------------------------------------------------
/packages/angular/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/cli/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Nx CLI
8 |
9 | {{what-is-nx}}
10 |
11 | ## How to Use
12 |
13 | This package is used by the `@nrwl/workspace`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
14 |
15 | {{resources}}
16 |
--------------------------------------------------------------------------------
/packages/express/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nx-plugin/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/storybook/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/docs/angular/cli/report.md:
--------------------------------------------------------------------------------
1 | # report
2 |
3 | Reports useful version numbers to copy into the Nx issue template
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx report
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### version
20 |
21 | Show version number
22 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | directory: string;
3 | name: string;
4 | npmScope?: string;
5 | skipInstall?: boolean;
6 | skipGit?: boolean;
7 | style?: string;
8 | commit?: { name: string; email: string; message?: string };
9 | cli: 'nx' | 'angular';
10 | layout: 'apps-and-libs' | 'packages';
11 | defaultBase?: string;
12 | }
13 |
--------------------------------------------------------------------------------
/packages/create-nx-workspace/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },
8 | "include": [
9 | "**/*.spec.ts",
10 | "**/*_spec.ts",
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/scripts/update-playground.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ./scripts/build.sh
4 |
5 | echo 'Updating all playground projects...'
6 |
7 | # Update NX playground
8 | rm -rf tmp/nx/proj/node_modules/@nrwl
9 | cp -r build/packages tmp/nx/proj/node_modules/@nrwl
10 |
11 | # Update Angular playground
12 | rm -rf tmp/angular/proj/node_modules/@nrwl
13 | cp -r build/packages tmp/angular/proj/node_modules/@nrwl
14 |
--------------------------------------------------------------------------------
/packages/bazel/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Bazel Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## How to Use
12 |
13 | This package is used by the `@nrwl/workspace`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
14 |
15 | {{resources}}
16 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/application/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { UnitTestRunner } from '../../utils/test-runners';
2 | import { Linter } from 'tslint';
3 |
4 | export interface Schema {
5 | name: string;
6 | skipFormat: boolean;
7 | skipPackageJson: boolean;
8 | directory?: string;
9 | unitTestRunner: UnitTestRunner;
10 | tags?: string;
11 | linter: Linter;
12 | frontendProject?: string;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/library/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace/src/utils/lint';
2 |
3 | export interface Schema {
4 | name: string;
5 | directory?: string;
6 | skipTsConfig: boolean;
7 | skipFormat: boolean;
8 | tags?: string;
9 | simpleModuleName: boolean;
10 | unitTestRunner: 'jest' | 'none';
11 | linter: Linter;
12 | testEnvironment: 'jsdom' | 'node';
13 | }
14 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface Schema {
4 | name: string;
5 | style?: string;
6 | server?: string;
7 | skipFormat: boolean;
8 | directory?: string;
9 | tags?: string;
10 | unitTestRunner: 'jest' | 'none';
11 | e2eTestRunner: 'cypress' | 'none';
12 | linter: Linter;
13 | skipWorkspaceJson?: boolean;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/e2e-project/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | pluginName: string;
3 | npmPackageName: string;
4 | pluginOutputPath: string;
5 | jestConfig: string;
6 | tsSpecConfig: string;
7 | }
8 |
9 | export interface NxPluginE2ESchema extends Schema {
10 | projectRoot: string;
11 | projectName: string;
12 | pluginPropertyName: string;
13 | npmScope: string;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/express/src/schematics/application/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { UnitTestRunner } from '../../utils/test-runners';
2 | import { Linter } from '@nrwl/workspace';
3 |
4 | export interface Schema {
5 | name: string;
6 | skipFormat: boolean;
7 | skipPackageJson: boolean;
8 | directory?: string;
9 | unitTestRunner: UnitTestRunner;
10 | tags?: string;
11 | linter: Linter;
12 | frontendProject?: string;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/nest/src/schematics/library/files/lib/src/lib/__fileName__.controller.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { Controller } from '@nestjs/common';
2 | <% if(service) { %>import { <%= className %>Service } from './<%= fileName %>.service';<% } %>
3 |
4 | @Controller('<%= fileName %>')
5 | export class <%= className %>Controller {
6 | constructor(<% if(service) { %>private <%= propertyName %>Service: <%= className %>Service<% } %>) {}
7 | }
8 |
--------------------------------------------------------------------------------
/packages/next/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 |
3 | export const nextVersion = '9.3.3';
4 | export const zeitNextCss = '1.0.1';
5 | export const zeitNextSass = '1.0.1';
6 | export const nodeSass = '4.13.1';
7 | export const zeitNextLess = '1.0.1';
8 | export const zeitNextStylus = '1.0.1';
9 | export const emotionServerVersion = '10.0.27';
10 | export const babelPluginStyledComponentsVersion = '1.10.7';
11 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/.babelrc__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@nrwl/react/babel",
4 | <% if (style === '@emotion/styled') { %>"@emotion/babel-preset-css-prop"<% } %>
5 | ],
6 | "plugins": [
7 | <% if (style === 'styled-components') { %>["styled-components", { "pure": true, "ssr": true }]<% } %>
8 | <% if (style === 'styled-jsx') { %>"styled-jsx/babel"<% } %>
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/component/files/__fileName__.spec.tsx__tmpl__:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 |
4 | import <%= className %> from './<%= fileName %>';
5 |
6 | describe(' <%= className %>', () => {
7 | it('should render successfully', () => {
8 | const { baseElement } = render(< <%= className %> />);
9 | expect(baseElement).toBeTruthy();
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/schematic/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | project: string;
3 | name: string;
4 | description?: string;
5 | unitTestRunner: 'jest' | 'none';
6 | }
7 |
8 | export interface NormalizedSchema extends Schema {
9 | fileName: string;
10 | projectRoot: string;
11 | projectSourceRoot: string;
12 | npmScope: string;
13 | npmPackageName: string;
14 | fileTemplate: string;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/files/lib/tsconfig.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "compilerOptions": {
4 | "jsx": "react",
5 | "allowJs": true,
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "files": [],
10 | "include": [],
11 | "references": [
12 | {
13 | "path": "./tsconfig.lib.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/react/typings/cssmodule.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.module.css' {
2 | const classes: { readonly [key: string]: string };
3 | export default classes;
4 | }
5 |
6 | declare module '*.module.scss' {
7 | const classes: { readonly [key: string]: string };
8 | export default classes;
9 | }
10 |
11 | declare module '*.module.sass' {
12 | const classes: { readonly [key: string]: string };
13 | export default classes;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/dep-graph/crosshair.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/tsconfig.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "compilerOptions": {
4 | "jsx": "react",
5 | "allowJs": true,
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "files": [],
10 | "include": [],
11 | "references": [
12 | {
13 | "path": "./tsconfig.app.json"
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/workspace/src/schematics/workspace-schematic/files/__name__/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "<%= name %>",
4 | "type": "object",
5 | "properties": {
6 | "name": {
7 | "type": "string",
8 | "description": "Library name",
9 | "$default": {
10 | "$source": "argv",
11 | "index": 0
12 | }
13 | }
14 | },
15 | "required": ["name"]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/angular/testing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@nrwl/angular/testing",
3 | "typings": "./index.d.ts",
4 | "main": "../bundles/nrwl-nx-testing.umd.js",
5 | "module": "../esm5/nrwl-nx-testing.js",
6 | "es2015": "../esm2015/nrwl-nx-testing.js",
7 | "ngPackage": {
8 | "lib": {
9 | "entryFile": "index.ts",
10 | "umdModuleIds": {
11 | "jasmine-marbles": "jasmine-marbles"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/component/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { SupportedStyles } from 'packages/react/typings/style';
2 |
3 | export interface Schema {
4 | name: string;
5 | project: string;
6 | style?: SupportedStyles;
7 | skipTests?: boolean;
8 | directory?: string;
9 | export?: boolean;
10 | pascalCaseFiles?: boolean;
11 | classComponent?: boolean;
12 | routing?: boolean;
13 | js?: boolean;
14 | flat?: boolean;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/plugins/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | fetchCommunityPlugins,
3 | listCommunityPlugins,
4 | } from './community-plugins';
5 | export { fetchCorePlugins, listCorePlugins } from './core-plugins';
6 | export {
7 | getInstalledPluginsFromNodeModules,
8 | listInstalledPlugins,
9 | } from './installed-plugins';
10 | export {
11 | getPluginCapabilities,
12 | listPluginCapabilities,
13 | } from './plugin-capabilities';
14 |
--------------------------------------------------------------------------------
/packages/cypress/src/migrations/update-8-10-0/update-8-10-0.ts:
--------------------------------------------------------------------------------
1 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
2 |
3 | import { join } from 'path';
4 | import { chain } from '@angular-devkit/schematics';
5 |
6 | export default () => {
7 | return chain([
8 | updatePackagesInPackageJson(
9 | join(__dirname, '../../../migrations.json'),
10 | '8.10.0'
11 | ),
12 | formatFiles(),
13 | ]);
14 | };
15 |
--------------------------------------------------------------------------------
/packages/cypress/src/migrations/update-8-12-0/update-8-12-0.ts:
--------------------------------------------------------------------------------
1 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
2 |
3 | import { join } from 'path';
4 | import { chain } from '@angular-devkit/schematics';
5 |
6 | export default () => {
7 | return chain([
8 | updatePackagesInPackageJson(
9 | join(__dirname, '../../../migrations.json'),
10 | '8.12.0'
11 | ),
12 | formatFiles(),
13 | ]);
14 | };
15 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxJestInit",
4 | "title": "Add Jest Configuration to a workspace",
5 | "type": "object",
6 | "properties": {
7 | "babelJest": {
8 | "type": "boolean",
9 | "alias": "babel-jest",
10 | "description": "Use babel-jest instead of ts-jest",
11 | "default": false
12 | }
13 | },
14 | "required": []
15 | }
16 |
--------------------------------------------------------------------------------
/packages/jest/src/utils/versions.ts:
--------------------------------------------------------------------------------
1 | export const nxVersion = '*';
2 | export const jestVersion = '25.2.3';
3 | export const jestTypesVersion = '25.1.4';
4 | export const tsJestVersion = '25.2.1';
5 |
6 | export const babelCoreVersion = '7.9.6';
7 | export const babelPresetEnvVersion = '7.9.6';
8 | export const babelPresetTypescriptVersion = '7.9.0';
9 | export const babelPresetReactVersion = '7.9.4';
10 | export const babelJestVersion = '25.1.0';
11 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/public/star.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%= className %>
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/packages/workspace/src/core/project-graph/build-dependencies/build-dependencies.ts:
--------------------------------------------------------------------------------
1 | import {
2 | AddProjectDependency,
3 | ProjectGraphContext,
4 | ProjectGraphNodeRecords,
5 | } from '../project-graph-models';
6 |
7 | export interface BuildDependencies {
8 | (
9 | ctx: ProjectGraphContext,
10 | nodes: ProjectGraphNodeRecords,
11 | addDependency: AddProjectDependency,
12 | fileRead: (s: string) => string
13 | ): void;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/e2e-project/lib/update-nx-json.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { addProjectToNxJsonInTree } from '@nrwl/workspace';
3 | import { NxPluginE2ESchema } from '../schema';
4 |
5 | export function updateNxJson(options: NxPluginE2ESchema): Rule {
6 | return addProjectToNxJsonInTree(options.projectName, {
7 | tags: [],
8 | implicitDependencies: [options.pluginName],
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/app/star.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-9-1-0/update-9-1-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import { join } from 'path';
4 |
5 | const updatePackages = updatePackagesInPackageJson(
6 | join(__dirname, '../../../', 'migrations.json'),
7 | '9.1.0'
8 | );
9 | export default function () {
10 | return chain([updatePackages, formatFiles()]);
11 | }
12 |
--------------------------------------------------------------------------------
/packages/storybook/src/migrations/update-9-0-0/update-9-0-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import { join } from 'path';
4 |
5 | const updatePackages = updatePackagesInPackageJson(
6 | join(__dirname, '../../../', 'migrations.json'),
7 | '9.0.0'
8 | );
9 |
10 | export default function () {
11 | return chain([updatePackages, formatFiles()]);
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-9-0-0/update-9-0-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import { join } from 'path';
4 |
5 | const updatePackages = updatePackagesInPackageJson(
6 | join(__dirname, '../../../', 'migrations.json'),
7 | '9.0.0'
8 | );
9 |
10 | export default function () {
11 | return chain([updatePackages, formatFiles()]);
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-9-3-0/update-9-3-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import { join } from 'path';
4 |
5 | const updatePackages = updatePackagesInPackageJson(
6 | join(__dirname, '../../../', 'migrations.json'),
7 | '9.3.0'
8 | );
9 |
10 | export default function () {
11 | return chain([updatePackages, formatFiles()]);
12 | }
13 |
--------------------------------------------------------------------------------
/packages/eslint-plugin-nx/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # ESLint Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## How to Use
12 |
13 | This package is used by the `@nrwl/web`, `@nrwl/react`, `@nrwl/angular`, and `@nrwl/node`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
14 |
15 | {{resources}}
16 |
--------------------------------------------------------------------------------
/scripts/documentation/documentation.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 |
5 | echo "Generating API documentation"
6 | ts-node --project=scripts/tsconfig.scripts.json ./scripts/documentation/generate-builders-data.ts
7 | ts-node --project=scripts/tsconfig.scripts.json ./scripts/documentation/generate-schematics-data.ts
8 | ts-node --project=scripts/tsconfig.scripts.json ./scripts/documentation/generate-cli-data.ts
9 | echo 'Done generating all Documentation'
10 |
--------------------------------------------------------------------------------
/packages/jest/src/migrations/update-9-2-0/update-9-2-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '9.2.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/nest/src/migrations/update-8-7-0/update-8-7-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '8.7.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/react/src/migrations/update-9-4-0/update-9-4-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '9.4.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/react/src/migrations/update-9-5-0/update-9-5-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '9.5.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%= className %>
6 |
7 |
8 |
9 |
10 |
11 |
12 | <<%= prefix %>-root><%= prefix %>-root>
13 |
14 |
15 |
--------------------------------------------------------------------------------
/docs/angular/cli/workspace-lint.md:
--------------------------------------------------------------------------------
1 | # workspace-lint
2 |
3 | Lint workspace or list of files. Note: To exclude files from this lint rule, you can add them to the ".nxignore" file
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx workspace-lint
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### version
20 |
21 | Show version number
22 |
--------------------------------------------------------------------------------
/docs/react/cli/workspace-lint.md:
--------------------------------------------------------------------------------
1 | # workspace-lint
2 |
3 | Lint workspace or list of files. Note: To exclude files from this lint rule, you can add them to the ".nxignore" file
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx workspace-lint
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### version
20 |
21 | Show version number
22 |
--------------------------------------------------------------------------------
/packages/next/src/migrations/update-8-10-0/update-8-10-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '8.10.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/react/src/migrations/update-8-12-0/update-8-12-0.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles, updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';
4 |
5 | export default function update(): Rule {
6 | return chain([
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '8.12.0'
10 | ),
11 | formatFiles(),
12 | ]);
13 | }
14 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/lib/update-nx-json.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { NxJson, updateJsonInTree } from '@nrwl/workspace';
3 | import { NormalizedSchema } from '../schema';
4 |
5 | export function updateNxJson(options: NormalizedSchema): Rule {
6 | return updateJsonInTree('nx.json', (json) => {
7 | json.projects[options.projectName] = { tags: options.parsedTags };
8 | return json;
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/karma-project/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "SchematicsNxKarmaProject",
4 | "title": "Create Karma Configuration for a project",
5 | "type": "object",
6 | "properties": {
7 | "project": {
8 | "type": "string",
9 | "description": "The name of the project.",
10 | "$default": {
11 | "$source": "projectName"
12 | }
13 | }
14 | },
15 | "required": []
16 | }
17 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/lib/update-nx-json.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { NxJson, updateJsonInTree } from '@nrwl/workspace';
3 | import { NormalizedSchema } from './normalize-options';
4 |
5 | export function updateNxJson(options: NormalizedSchema): Rule {
6 | return updateJsonInTree('nx.json', (json) => {
7 | json.projects[options.projectName] = { tags: options.parsedTags };
8 | return json;
9 | });
10 | }
11 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/utils/mangle-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 | const mangleVariable = process.env['NG_BUILD_MANGLE'];
9 | export const manglingDisabled =
10 | !!mangleVariable &&
11 | (mangleVariable === '0' || mangleVariable.toLowerCase() === 'false');
12 |
--------------------------------------------------------------------------------
/docs/angular/api-nx-plugin/builders/e2e.md:
--------------------------------------------------------------------------------
1 | # e2e
2 |
3 | Creates and runs an e2e for a Nx Plugin
4 |
5 | Builder properties can be configured in angular.json when defining the builder, or when invoking it.
6 |
7 | ## Properties
8 |
9 | ### jestConfig
10 |
11 | Type: `string`
12 |
13 | Jest config file
14 |
15 | ### target
16 |
17 | Type: `string`
18 |
19 | the target Nx Plugin project and build
20 |
21 | ### tsSpecConfig
22 |
23 | Type: `string`
24 |
25 | Spec tsconfig file
26 |
--------------------------------------------------------------------------------
/packages/react/src/utils/assertion.ts:
--------------------------------------------------------------------------------
1 | const VALID_STYLES = [
2 | 'css',
3 | 'scss',
4 | 'less',
5 | 'styl',
6 | 'styled-components',
7 | '@emotion/styled',
8 | 'styled-jsx',
9 | 'none',
10 | ];
11 | export function assertValidStyle(style: string): void {
12 | if (VALID_STYLES.indexOf(style) === -1) {
13 | throw new Error(
14 | `Unsupported style option found: ${style}. Valid values are: "${VALID_STYLES.join(
15 | '", "'
16 | )}"`
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/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/workspace/src/schematics/remove/lib/update-workspace.ts:
--------------------------------------------------------------------------------
1 | import { updateWorkspaceInTree } from '@nrwl/workspace';
2 | import { Schema } from '../schema';
3 |
4 | /**
5 | * Deletes the project from the workspace file
6 | *
7 | * @param schema The options provided to the schematic
8 | */
9 | export function updateWorkspace(schema: Schema) {
10 | return updateWorkspaceInTree((workspace) => {
11 | delete workspace.projects[schema.projectName];
12 | return workspace;
13 | });
14 | }
15 |
--------------------------------------------------------------------------------
/packages/angular/src/runtime/nx/nx.module.ts:
--------------------------------------------------------------------------------
1 | import { ModuleWithProviders, NgModule } from '@angular/core';
2 | import { DataPersistence } from './data-persistence';
3 |
4 | /**
5 | * @whatItDoes Provides services for enterprise Angular applications.
6 | *
7 | * See {@link DataPersistence} for more information.
8 | */
9 | @NgModule({})
10 | export class NxModule {
11 | static forRoot(): ModuleWithProviders {
12 | return { ngModule: NxModule, providers: [DataPersistence] };
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/tao/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # TAO Cli for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It
12 |
13 | An internal package implementing the core functionality of the Nx CLI.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/workspace`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-8-4-0/add-nx-script.ts:
--------------------------------------------------------------------------------
1 | import { updateJsonInTree } from '../../utils/ast-utils';
2 | import { chain } from '@angular-devkit/schematics';
3 | import { formatFiles } from '@nrwl/workspace';
4 |
5 | const addNxScript = updateJsonInTree('package.json', (json) => {
6 | if (json.scripts && !json.scripts.nx) {
7 | json.scripts.nx = 'nx';
8 | }
9 | return json;
10 | });
11 |
12 | export default function () {
13 | return chain([addNxScript, formatFiles()]);
14 | }
15 |
--------------------------------------------------------------------------------
/docs/angular/api-angular/schematics/karma.md:
--------------------------------------------------------------------------------
1 | # karma
2 |
3 | Add karma configuration to a workspace
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx generate karma ...
9 | ```
10 |
11 | By default, Nx will search for `karma` in the default collection provisioned in `angular.json`.
12 |
13 | You can specify the collection explicitly as follows:
14 |
15 | ```bash
16 | nx g @nrwl/angular:karma ...
17 | ```
18 |
19 | Show what will be generated without writing to disk:
20 |
21 | ```bash
22 | nx g karma ... --dry-run
23 | ```
24 |
--------------------------------------------------------------------------------
/docs/react/api-angular/schematics/karma.md:
--------------------------------------------------------------------------------
1 | # karma
2 |
3 | Add karma configuration to a workspace
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx generate karma ...
9 | ```
10 |
11 | By default, Nx will search for `karma` in the default collection provisioned in `workspace.json`.
12 |
13 | You can specify the collection explicitly as follows:
14 |
15 | ```bash
16 | nx g @nrwl/angular:karma ...
17 | ```
18 |
19 | Show what will be generated without writing to disk:
20 |
21 | ```bash
22 | nx g karma ... --dry-run
23 | ```
24 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/configuration/root-files/.storybook/webpack.config.js:
--------------------------------------------------------------------------------
1 | // Export a function. Accept the base config as the only param.
2 | module.exports = async ({ config, mode }) => {
3 | // `mode` has a value of 'DEVELOPMENT' or 'PRODUCTION'
4 | // You can change the configuration based on that.
5 | // 'PRODUCTION' is used when building the static version of storybook.
6 |
7 | // Make whatever fine-grained changes you need
8 |
9 | // Return the altered config
10 | return config;
11 | };
12 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/rules/ng-add.ts:
--------------------------------------------------------------------------------
1 | import { externalSchematic, Rule } from '@angular-devkit/schematics';
2 |
3 | /**
4 | * Calls init _if_ the package does not already exist
5 | */
6 | export function addPackageWithInit(
7 | packageName: string,
8 | testRunners: {
9 | unitTestRunner: 'jest' | 'none';
10 | e2eTestRunner?: 'cypress' | 'none';
11 | } = { unitTestRunner: 'jest', e2eTestRunner: 'cypress' }
12 | ): Rule {
13 | return externalSchematic(packageName, 'init', { ...testRunners });
14 | }
15 |
--------------------------------------------------------------------------------
/docs/shared/monorepo-dependency-diagrams.md:
--------------------------------------------------------------------------------
1 | # Analyzing & Visualizing Workspaces
2 |
3 | To be able to support the monorepo-style development, the tools must know how different projects in your workspace depend on each other. Nx uses advanced code analysis to construct this dependency graph. And it gives you a way to explore it:
4 |
5 | VIDEO
6 |
--------------------------------------------------------------------------------
/packages/jest/src/schematics/jest-project/files/tsconfig.spec.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "<%= offsetFromRoot %>dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node"]
7 | },<% if(setupFile !== 'none') { %>
8 | "files": ["src/test-setup.ts"],<% } %>
9 | "include": [
10 | "**/*.spec.ts",<% if (supportTsx) { %>
11 | "**/*.spec.tsx",
12 | "**/*.spec.js",
13 | "**/*.spec.jsx",<% } %>
14 | "**/*.d.ts"
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/next/src/builders/server/lib/custom-server.ts:
--------------------------------------------------------------------------------
1 | import NextServer from 'next/dist/server/next-dev-server';
2 | import * as path from 'path';
3 | import { NextServerOptions, ProxyConfig } from '../../../utils/types';
4 |
5 | export function customServer(
6 | settings: NextServerOptions,
7 | proxyConfig?: ProxyConfig
8 | ) {
9 | const nextApp = new NextServer(settings);
10 |
11 | return require(path.resolve(settings.dir, settings.path))(
12 | nextApp,
13 | settings,
14 | proxyConfig
15 | );
16 | }
17 |
--------------------------------------------------------------------------------
/packages/nx-plugin/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Plugin for Creating Nx Plugins
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | It's an Nx plugin used to build other Nx plugins.
14 |
15 | Check out the list of community plugins and the documentation on how to create one using `create-nx-plugin` here: [https://nx.dev/nx-community](https://nx.dev/nx-community)
16 |
17 | {{resources}}
18 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/e2e-project/lib/validate-plugin.ts:
--------------------------------------------------------------------------------
1 | import { WorkspaceDefinition } from '@angular-devkit/core/src/workspace';
2 | import { SchematicsException } from '@angular-devkit/schematics';
3 |
4 | export function validatePlugin(
5 | workspace: WorkspaceDefinition,
6 | pluginName: string
7 | ) {
8 | const project = workspace.projects.get(pluginName);
9 | if (!project) {
10 | throw new SchematicsException(
11 | `Project name "${pluginName}" doesn't not exist.`
12 | );
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/storybook/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "Nx Storybook Project Schematics Schema",
4 | "title": "Add Storybook Configuration to the workspace",
5 | "type": "object",
6 | "properties": {
7 | "uiFramework": {
8 | "type": "string",
9 | "description": "Storybook UI Framework to use",
10 | "enum": ["@storybook/angular", "@storybook/react"],
11 | "x-prompt": "What UI framework plugin should storybook use?"
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/rules/add-install-task.ts:
--------------------------------------------------------------------------------
1 | import { Rule } from '@angular-devkit/schematics';
2 | import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
3 |
4 | let installAdded = false;
5 | export function addInstallTask(
6 | options: { skipInstall: boolean } = { skipInstall: false }
7 | ): Rule {
8 | return (_, context) => {
9 | if (!options.skipInstall && !installAdded) {
10 | context.addTask(new NodePackageInstallTask());
11 | installAdded = true;
12 | }
13 | };
14 | }
15 |
--------------------------------------------------------------------------------
/docs/shared/examples/nx-examples.md:
--------------------------------------------------------------------------------
1 | # Nx Micro-Frontend Example
2 |
3 | This repository contains a single book store website that serves a React app for some routes and an Angular app for other routes. Both apps make use of web components to share UI.
4 |
5 | The repository is kept up to date with the latest version of Nx and is used as a smoke test for migrations to new versions of Nx.
6 |
7 | **Repository:** [nx-examples](https://github.com/nrwl/nx-examples)
8 |
9 | **Live Demo:** [Nx Store](https://nrwl-nx-examples-cart.netlify.app/cart)
10 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/component-cypress-spec/files/__componentFileName__.spec.ts__tmpl__:
--------------------------------------------------------------------------------
1 | describe('<%=projectName%>', () => {
2 | beforeEach(() => cy.visit('/iframe.html?id=<%= componentName.toLowerCase() %>--primary<%
3 | for(let prop of props) {
4 | %>&knob-<%=prop.name%><%
5 | if(prop.defaultValue !== undefined) {
6 | %>=<%=prop.defaultValue%><%
7 | } %><%
8 | }%>'));
9 |
10 | it('should render the component', () => {
11 | cy.get('<%=componentSelector%>').should('exist');
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/migration/files/migration/__name__/__name__.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';<% if (packageJsonUpdates) { %>
2 | import { updatePackagesInPackageJson } from '@nrwl/workspace';
3 | import * as path from 'path';<% } %>
4 |
5 | export default function update(): Rule {
6 | return chain([<% if (packageJsonUpdates) { %>
7 | updatePackagesInPackageJson(
8 | path.join(__dirname, '../../../', 'migrations.json'),
9 | '<%= version %>'
10 | )
11 | <% } %>]);
12 | }
13 |
--------------------------------------------------------------------------------
/packages/cypress/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Cypress Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | Builders and schematics adding Cypress tests for frontend applications.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/web`, `@nrwl/react`, and `@nrwl/angular`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/scripts/check-format.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | echo "Checking prettier"
4 | prettier "**/*.{ts,js,json,css,scss,md}" "!**/{__name__,__directory__}/**" --list-different
5 | PRETTIER_STATUS=$?
6 |
7 | echo "Checking CRLF"
8 | find scripts -type f -exec file "{}" ";" | grep CRLF
9 | SCRIPTS_STATUS=$?
10 |
11 | find packages -type f -exec file "{}" ";" | grep CRLF
12 | PACKAGES_STATUS=$?
13 |
14 | if [[ $PRETTIER_STATUS -eq 1 || $SCRIPTS_STATUS -eq 0 || $PACKAGES_STATUS -eq 0 ]]; then
15 | echo "Please run yarn format";
16 | exit 1;
17 | fi
18 |
--------------------------------------------------------------------------------
/docs/react/examples/react-nx.md:
--------------------------------------------------------------------------------
1 | # Powering Up React Development With Nx
2 |
3 | Learn to:
4 |
5 | - Generate a new React monorepo workspace with one application.
6 | - Add new feature libraries and route to them from our application.
7 | - Generate React components with a schematic
8 | - Generate a NestJS app in the same monorepo
9 |
10 | **Blog post:** [Powering Up React Development With Nx](https://blog.nrwl.io/powering-up-react-development-with-nx-cf0a9385dbec)
11 |
12 | **Repository:** [nrwl/react-nx-example](https://github.com/nrwl/react-nx-example)
13 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/src/integration/app.spec.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { getGreeting } from '../support/app.po';
2 |
3 | describe('<%= project %>', () => {
4 | beforeEach(() => cy.visit('/'));
5 |
6 | it('should display welcome message', () => {
7 | // Custom command example, see `../support/commands.ts` file
8 | cy.login('my-email@something.com', 'myPassword');
9 |
10 | // Function helper example, see `../support/app.po.ts` file
11 | getGreeting().contains('Welcome to <%= project %>!');
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/packages/jest/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Jest Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | Builders and schematics adding Jest tests to applications and libraries.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/web`, `@nrwl/react`, `@nrwl/angular`, `@nrwl/node`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/files/app/src/main.tsx__tmpl__:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | <% if (routing) { %>
4 | import { BrowserRouter } from 'react-router-dom';
5 | <% } %>
6 |
7 | import App from './app/app';
8 |
9 | <% if (routing) { %>
10 | ReactDOM.render( , document.getElementById('root'));
11 | <% } else { %>
12 | ReactDOM.render( , document.getElementById('root'));
13 | <% } %>
14 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/lib/add-cypress.ts:
--------------------------------------------------------------------------------
1 | import { externalSchematic, noop, Rule } from '@angular-devkit/schematics';
2 | import { NormalizedSchema } from '../schema';
3 |
4 | export function addCypress(options: NormalizedSchema): Rule {
5 | return options.e2eTestRunner === 'cypress'
6 | ? externalSchematic('@nrwl/cypress', 'cypress-project', {
7 | ...options,
8 | name: options.name + '-e2e',
9 | directory: options.directory,
10 | project: options.projectName,
11 | })
12 | : noop();
13 | }
14 |
--------------------------------------------------------------------------------
/packages/storybook/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Storybook Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | Builders and schematics adding Storybook support for frontend applications.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/web`, `@nrwl/react`, and `@nrwl/angular`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/cypress/src/schematics/cypress-project/files/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "fileServerFolder": ".",
3 | "fixturesFolder": "./src/fixtures",
4 | "integrationFolder": "./src/integration",
5 | "modifyObstructiveCode": false,
6 | "pluginsFile": "./src/plugins/index",
7 | "supportFile": "./src/support/index.<%= ext %>",
8 | "video": true,
9 | "videosFolder": "<%= offsetFromRoot %>dist/cypress/<%= projectRoot %>/videos",
10 | "screenshotsFolder": "<%= offsetFromRoot %>dist/cypress/<%= projectRoot %>/screenshots",
11 | "chromeWebSecurity": false
12 | }
13 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/tsconfig.json__tmpl__:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "<%= offsetFromRoot %>tsconfig.base.json",
3 | "compilerOptions": {
4 | "jsx": "preserve",
5 | "allowJs": true,
6 | "esModuleInterop": true,
7 | "allowSyntheticDefaultImports": true,
8 | "types": ["node", "jest"],
9 | "strict": false,
10 | "forceConsistentCasingInFileNames": true,
11 | "noEmit": true,
12 | "resolveJsonModule": true,
13 | "isolatedModules": true
14 | },
15 | "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts"]
16 | }
17 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/application/lib/add-jest.ts:
--------------------------------------------------------------------------------
1 | import { externalSchematic, noop, Rule } from '@angular-devkit/schematics';
2 | import { NormalizedSchema } from '../schema';
3 |
4 | export function addJest(options: NormalizedSchema): Rule {
5 | return options.unitTestRunner === 'jest'
6 | ? externalSchematic('@nrwl/jest', 'jest-project', {
7 | project: options.projectName,
8 | supportTsx: true,
9 | skipSerializers: true,
10 | setupFile: 'none',
11 | babelJest: true,
12 | })
13 | : noop();
14 | }
15 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/ngrx/schema.d.ts:
--------------------------------------------------------------------------------
1 | export interface Schema {
2 | name: string;
3 | module: string;
4 | directory: string;
5 | root: boolean;
6 | facade: boolean;
7 | minimal: boolean;
8 | skipImport: boolean;
9 | /**
10 | * @deprecated use `minimal`
11 | */
12 | onlyEmptyRoot: boolean;
13 |
14 | /**
15 | * @deprecated use `skipImport`
16 | */
17 | onlyAddFiles: boolean;
18 | skipFormat: boolean;
19 | skipPackageJson: boolean;
20 | syntax?: string;
21 | useDataPersistence: boolean;
22 | barrels: boolean;
23 | }
24 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/lib/add-cypress.ts:
--------------------------------------------------------------------------------
1 | import { externalSchematic, noop, Rule } from '@angular-devkit/schematics';
2 | import { NormalizedSchema } from './normalize-options';
3 |
4 | export function addCypress(options: NormalizedSchema): Rule {
5 | return options.e2eTestRunner === 'cypress'
6 | ? externalSchematic('@nrwl/cypress', 'cypress-project', {
7 | ...options,
8 | name: options.name + '-e2e',
9 | directory: options.directory,
10 | project: options.projectName,
11 | })
12 | : noop();
13 | }
14 |
--------------------------------------------------------------------------------
/packages/storybook/builders.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "@angular-devkit/architect/src/builders-schema.json",
3 | "builders": {
4 | "storybook": {
5 | "implementation": "./src/builders/storybook/storybook.impl",
6 | "schema": "./src/builders/storybook/schema.json",
7 | "description": "Serve Storybook"
8 | },
9 | "build": {
10 | "implementation": "./src/builders/build-storybook/build-storybook.impl",
11 | "schema": "./src/builders/build-storybook/schema.json",
12 | "description": "Build Storybook"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/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/workspace/src/command-line/supported-nx-commands.ts:
--------------------------------------------------------------------------------
1 | export const supportedNxCommands = [
2 | 'affected',
3 | 'affected:apps',
4 | 'affected:libs',
5 | 'affected:build',
6 | 'affected:test',
7 | 'affected:e2e',
8 | 'affected:dep-graph',
9 | 'affected:lint',
10 | 'print-affected',
11 | 'dep-graph',
12 | 'format',
13 | 'format:check',
14 | 'format:write',
15 | 'workspace-schematic',
16 | 'workspace-lint',
17 | 'migrate',
18 | 'report',
19 | 'run-many',
20 | 'list',
21 | 'help',
22 | '--help',
23 | '--version',
24 | ];
25 |
--------------------------------------------------------------------------------
/docs/angular/cli/workspace-schematic.md:
--------------------------------------------------------------------------------
1 | # workspace-schematic
2 |
3 | Runs a workspace schematic from the tools/schematics directory
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx workspace-schematic
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### list-schematics
20 |
21 | List the available workspace-schematics
22 |
23 | ### name
24 |
25 | The name of your schematic`
26 |
27 | ### version
28 |
29 | Show version number
30 |
--------------------------------------------------------------------------------
/docs/react/cli/workspace-schematic.md:
--------------------------------------------------------------------------------
1 | # workspace-schematic
2 |
3 | Runs a workspace schematic from the tools/schematics directory
4 |
5 | ## Usage
6 |
7 | ```bash
8 | nx workspace-schematic
9 | ```
10 |
11 | Install `@nrwl/cli` globally to invoke the command directly using `nx`, or use `npm run nx` or `yarn nx`.
12 |
13 | ## Options
14 |
15 | ### help
16 |
17 | Show help
18 |
19 | ### list-schematics
20 |
21 | List the available workspace-schematics
22 |
23 | ### name
24 |
25 | The name of your schematic`
26 |
27 | ### version
28 |
29 | Show version number
30 |
--------------------------------------------------------------------------------
/packages/angular/ng-package.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3 | "lib": {
4 | "entryFile": "index.ts",
5 | "umdModuleIds": {
6 | "@ngrx/effects": "ngrx.effects",
7 | "@ngrx/entity": "ngrx.entity",
8 | "@ngrx/router-store": "ngrx.routerStore",
9 | "@ngrx/store": "ngrx.store",
10 | "jasmine-marbles": "jasmine-marbles"
11 | }
12 | },
13 | "whitelistedNonPeerDependencies": [
14 | "@nrwl/",
15 | "@angular-devkit",
16 | "@schematics",
17 | "jasmine-marbles"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/library/lib/update-lib-package-npm-scope.ts:
--------------------------------------------------------------------------------
1 | import { Rule, Tree } from '@angular-devkit/schematics';
2 | import { getNpmScope, updateJsonInTree } from '@nrwl/workspace';
3 | import { NormalizedSchema } from './normalized-schema';
4 |
5 | export function updateLibPackageNpmScope(options: NormalizedSchema): Rule {
6 | return (host: Tree) => {
7 | return updateJsonInTree(`${options.projectRoot}/package.json`, (json) => {
8 | json.name = `@${getNpmScope(host)}/${options.name}`;
9 | return json;
10 | });
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/packages/create-nx-plugin/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # `> npx create-nx-plugin`
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | It's a command to create an Nx workspace to develop an Nx plugin.
14 |
15 | ## How to Use
16 |
17 | - Check out the list of community plugins and the documentation on how to create one using `create-nx-plugin` here: [https://nx.dev/nx-community](https://nx.dev/nx-community)
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/linter/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # Linter Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | Builders and schematics adding TS and JS lint checks to applications and libraries.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/web`, `@nrwl/react`, `@nrwl/angular`, `@nrwl/node`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/react/src/rules/add-styled-dependencies.ts:
--------------------------------------------------------------------------------
1 | import { noop, Rule } from '@angular-devkit/schematics';
2 | import { addDepsToPackageJson } from '@nrwl/workspace';
3 | import { CSS_IN_JS_DEPENDENCIES } from '../utils/styled';
4 |
5 | export function addStyledModuleDependencies(styledModule: string): Rule {
6 | const extraDependencies = CSS_IN_JS_DEPENDENCIES[styledModule];
7 | return extraDependencies
8 | ? addDepsToPackageJson(
9 | extraDependencies.dependencies,
10 | extraDependencies.devDependencies
11 | )
12 | : noop();
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-8-12-0/update-package-json-deps.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule } from '@angular-devkit/schematics';
2 | import { formatFiles } from '@nrwl/workspace/src/utils/rules/format-files';
3 | import * as path from 'path';
4 | import { updatePackagesInPackageJson } from '../../utils/update-packages-in-package-json';
5 |
6 | export default function (): Rule {
7 | return chain([
8 | updatePackagesInPackageJson(
9 | path.join(__dirname, '../../..', 'migrations.json'),
10 | '8120'
11 | ),
12 | formatFiles(),
13 | ]);
14 | }
15 |
--------------------------------------------------------------------------------
/docs/react/api-nx-plugin/builders/e2e.md:
--------------------------------------------------------------------------------
1 | # e2e
2 |
3 | Creates and runs an e2e for a Nx Plugin
4 |
5 | Builder properties can be configured in workspace.json when defining the builder, or when invoking it.
6 | Read more about how to use builders and the CLI here: https://nx.dev/react/guides/cli.
7 |
8 | ## Properties
9 |
10 | ### jestConfig
11 |
12 | Type: `string`
13 |
14 | Jest config file
15 |
16 | ### target
17 |
18 | Type: `string`
19 |
20 | the target Nx Plugin project and build
21 |
22 | ### tsSpecConfig
23 |
24 | Type: `string`
25 |
26 | Spec tsconfig file
27 |
--------------------------------------------------------------------------------
/packages/node/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{links}}
4 |
5 |
6 |
7 | # NodeJS Plugin for Nx
8 |
9 | {{what-is-nx}}
10 |
11 | ## What is It?
12 |
13 | Builders and schematics adding basic functionality for building, testing and linting node applications and libraries.
14 |
15 | ## How to Use
16 |
17 | This package is used by the `@nrwl/express`, and `@nrwl/next`. See [https://github.com/nrwl/nx](https://github.com/nrwl/nx) for more information.
18 |
19 | {{resources}}
20 |
--------------------------------------------------------------------------------
/packages/angular/src/migrations/update-10-0-0/update-10-0-0.ts:
--------------------------------------------------------------------------------
1 | import { chain } from '@angular-devkit/schematics';
2 | import {
3 | addUpdateTask,
4 | formatFiles,
5 | updatePackagesInPackageJson,
6 | } from '@nrwl/workspace';
7 | import { join } from 'path';
8 |
9 | export default function () {
10 | return chain([
11 | addUpdateTask('@angular/core', '10.0.0'),
12 | addUpdateTask('@angular/cli', '10.0.0'),
13 | updatePackagesInPackageJson(
14 | join(__dirname, '../../../migrations.json'),
15 | '10.0.0'
16 | ),
17 | formatFiles(),
18 | ]);
19 | }
20 |
--------------------------------------------------------------------------------
/packages/node/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxNodeInit",
4 | "title": "Add Nx Node Schematics",
5 | "type": "object",
6 | "properties": {
7 | "unitTestRunner": {
8 | "description": "Adds the specified unit test runner",
9 | "type": "string",
10 | "enum": ["jest", "none"],
11 | "default": "jest"
12 | },
13 | "skipFormat": {
14 | "description": "Skip formatting files",
15 | "type": "boolean",
16 | "default": false
17 | }
18 | },
19 | "required": []
20 | }
21 |
--------------------------------------------------------------------------------
/packages/web/src/schematics/application/files/app/src/app/app.element.spec.ts__tmpl__:
--------------------------------------------------------------------------------
1 | import { AppElement } from './app.element';
2 |
3 | describe('AppElement', () => {
4 | let app: AppElement;
5 |
6 | beforeEach(() => {
7 | app = new AppElement();
8 | });
9 |
10 | it('should create successfully', () => {
11 | expect(app).toBeTruthy();
12 | });
13 |
14 | it('should have a greeting', () => {
15 | app.connectedCallback();
16 |
17 | expect(app.querySelector('h1').innerHTML).toEqual(
18 | 'Welcome to <%= projectName %>!'
19 | );
20 | });
21 | });
22 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/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/bazel/collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Nx Bazel",
3 | "version": "0.1",
4 | "extends": [],
5 | "schematics": {
6 | "init": {
7 | "factory": "./src/schematics/init/init",
8 | "schema": "./src/schematics/init/schema.json",
9 | "aliases": ["ng-add"],
10 | "description": "Add Bazel Files",
11 | "hidden": true
12 | },
13 | "sync": {
14 | "factory": "./src/schematics/sync/sync",
15 | "schema": "./src/schematics/sync/schema.json",
16 | "description": "Sync Build Files",
17 | "hidden": true
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/builder/builder.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule, Tree } from '@angular-devkit/schematics';
2 | import { addFiles } from './lib/add-files';
3 | import { normalizeOptions } from './lib/normalize-options';
4 | import { updateBuildersJson } from './lib/update-builders-json';
5 | import { NormalizedSchema } from './schema';
6 |
7 | export default function (schema: NormalizedSchema): Rule {
8 | return (host: Tree) => {
9 | const options = normalizeOptions(host, schema);
10 |
11 | return chain([addFiles(options), updateBuildersJson(options)]);
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/packages/workspace/src/migrations/update-8-3-0/update-cypress-to-34.ts:
--------------------------------------------------------------------------------
1 | import { addInstallTask, formatFiles, updateJsonInTree } from '@nrwl/workspace';
2 | import { chain } from '@angular-devkit/schematics';
3 |
4 | const updateCypress = updateJsonInTree('package.json', (json) => {
5 | json.devDependencies = json.devDependencies || {};
6 | if (json.devDependencies['cypress']) {
7 | json.devDependencies['cypress'] = '3.4.0';
8 | }
9 |
10 | return json;
11 | });
12 |
13 | export default function () {
14 | return chain([updateCypress, addInstallTask(), formatFiles()]);
15 | }
16 |
--------------------------------------------------------------------------------
/packages/express/src/schematics/init/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "id": "NxExpressInit",
4 | "title": "Add Nx Express Schematics",
5 | "type": "object",
6 | "properties": {
7 | "unitTestRunner": {
8 | "description": "Adds the specified unit test runner",
9 | "type": "string",
10 | "enum": ["jest", "none"],
11 | "default": "jest"
12 | },
13 | "skipFormat": {
14 | "description": "Skip formatting files",
15 | "type": "boolean",
16 | "default": false
17 | }
18 | },
19 | "required": []
20 | }
21 |
--------------------------------------------------------------------------------
/packages/next/src/schematics/application/files/specs/__fileName__.spec.tsx__tmpl__:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 |
4 | import Index from '../pages/index';
5 |
6 | describe('Index', () => {
7 | it('should render successfully', () => {
8 | const { baseElement } = render( );
9 | expect(baseElement).toBeTruthy();
10 | });
11 |
12 | it('should have a greeting as the title', () => {
13 | const { getByText } = render( );
14 | expect(getByText('Welcome to <%= projectName %>!')).toBeTruthy();
15 | });
16 | });
17 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/redux/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Path } from '@angular-devkit/core';
2 |
3 | export interface Schema {
4 | name: string;
5 | project: string;
6 | directory: string;
7 | appProject: string;
8 | js?: string;
9 | }
10 |
11 | interface NormalizedSchema extends Schema {
12 | projectType: string;
13 | projectSourcePath: Path;
14 | projectModulePath: string;
15 | appProjectSourcePath: Path;
16 | appMainFilePath: string;
17 | filesPath: Path;
18 | className: string;
19 | constantName: string;
20 | propertyName: string;
21 | fileName: string;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/web/src/utils/source-root.ts:
--------------------------------------------------------------------------------
1 | import { BuilderContext } from '@angular-devkit/architect';
2 |
3 | export async function getSourceRoot(context: BuilderContext): Promise {
4 | const projectMeta = await context.getProjectMetadata(context.target.project);
5 | if (projectMeta.sourceRoot) {
6 | return projectMeta.sourceRoot as string;
7 | } else {
8 | context.reportStatus('Error');
9 | const message = `${context.target.project} does not have a sourceRoot. Please define one.`;
10 | context.logger.error(message);
11 | throw new Error(message);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/web/src/utils/third-party/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/nx-plugin/src/schematics/plugin/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 |
3 | export interface Schema {
4 | name: string;
5 | directory?: string;
6 | skipTsConfig: boolean;
7 | skipFormat: boolean;
8 | tags?: string;
9 | unitTestRunner: 'jest' | 'none';
10 | linter: Linter;
11 | }
12 |
13 | export interface NormalizedSchema extends Schema {
14 | name: string;
15 | fileName: string;
16 | projectRoot: Path;
17 | projectDirectory: string;
18 | parsedTags: string[];
19 | npmScope: string;
20 | npmPackageName: string;
21 | fileTemplate: string;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/nx-plugin/src/schematics/schematic/schematic.ts:
--------------------------------------------------------------------------------
1 | import { chain, Rule, Tree } from '@angular-devkit/schematics';
2 | import { addFiles } from './lib/add-files';
3 | import { normalizeOptions } from './lib/normalize-options';
4 | import { updateCollectionJson } from './lib/update-collection-json';
5 | import { NormalizedSchema } from './schema';
6 |
7 | export default function (schema: NormalizedSchema): Rule {
8 | return (host: Tree) => {
9 | const options = normalizeOptions(host, schema);
10 |
11 | return chain([addFiles(options), updateCollectionJson(options)]);
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/packages/angular/src/schematics/component-story/files/__componentFileName__.stories.ts__tmpl__:
--------------------------------------------------------------------------------
1 | <% if(props.length > 0) { %>import { text, number, boolean } from '@storybook/addon-knobs';<% } %>
2 | import { <%=componentName%> } from './<%=componentFileName%>';
3 |
4 | export default {
5 | title: '<%=componentName%>'
6 | }
7 |
8 | export const primary = () => ({
9 | moduleMetadata: {
10 | imports: []
11 | },
12 | component: <%=componentName%>,
13 | props: {<% for (let prop of props) { %>
14 | <%=prop.name%>: <%=prop.type%>('<%=prop.name%>', <%=prop.defaultValue%>),<% } %>
15 | }
16 | })
17 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/component-cypress-spec/files/__componentName__.spec.__fileExt__.template:
--------------------------------------------------------------------------------
1 | describe('<%=projectName%>: <%= componentSelector %> component', () => {
2 | beforeEach(() => cy.visit('/iframe.html?id=<%= componentSelector.toLowerCase() %>--primary<%
3 | for(let prop of props) {
4 | %>&knob-<%=prop.name%><%
5 | if(prop.defaultValue !== undefined) {
6 | %>=<%=prop.defaultValue%><%
7 | } %><%}%>'));
8 |
9 | it('should render the component', () => {
10 | cy.get('h1').should('contain', 'Welcome to <%=projectName%>!');
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/packages/react/src/schematics/library/schema.d.ts:
--------------------------------------------------------------------------------
1 | import { Linter } from '@nrwl/workspace';
2 | import { SupportedStyles } from 'packages/react/typings/style';
3 |
4 | export interface Schema {
5 | name: string;
6 | directory?: string;
7 | style?: SupportedStyles;
8 | skipTsConfig: boolean;
9 | skipFormat: boolean;
10 | tags?: string;
11 | pascalCaseFiles?: boolean;
12 | routing?: boolean;
13 | appProject?: string;
14 | unitTestRunner: 'jest' | 'none';
15 | babelJest: boolean;
16 | linter: Linter;
17 | component?: boolean;
18 | publishable?: boolean;
19 | js?: boolean;
20 | }
21 |
--------------------------------------------------------------------------------
/packages/web/src/utils/rules.ts:
--------------------------------------------------------------------------------
1 | import { Rule, Tree } from '@angular-devkit/schematics';
2 |
3 | export function initRootBabelConfig(): Rule {
4 | return (host: Tree) => {
5 | if (host.exists('/babel.config.json') || host.exists('/babel.config.js'))
6 | return;
7 | host.create(
8 | '/babel.config.json',
9 | JSON.stringify(
10 | {
11 | presets: ['@nrwl/web/babel'],
12 | babelrcRoots: ['*'], // Make sure .babelrc files other than root can be loaded in a monorepo
13 | },
14 | null,
15 | 2
16 | )
17 | );
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/app-root.ts:
--------------------------------------------------------------------------------
1 | import { fileExists } from './fileutils';
2 | import * as path from 'path';
3 |
4 | export const appRootPath = pathInner(__dirname);
5 |
6 | function pathInner(dir: string): string {
7 | if (process.env.NX_WORKSPACE_ROOT_PATH)
8 | return process.env.NX_WORKSPACE_ROOT_PATH;
9 | if (path.dirname(dir) === dir) return process.cwd();
10 | if (
11 | fileExists(path.join(dir, 'workspace.json')) ||
12 | fileExists(path.join(dir, 'angular.json'))
13 | ) {
14 | return dir;
15 | } else {
16 | return pathInner(path.dirname(dir));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/cli/bin/nx.ts:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | // polyfill rxjs observable to avoid issues with multiple version fo Observable installed in node_modules
4 | // https://twitter.com/BenLesh/status/1192478226385428483?s=20
5 | (Symbol as any).observable = Symbol('observable polyfill');
6 | import { findWorkspaceRoot } from '../lib/find-workspace-root';
7 | import { initGlobal } from '../lib/init-global';
8 | import { initLocal } from '../lib/init-local';
9 |
10 | const workspace = findWorkspaceRoot(__dirname);
11 |
12 | if (workspace) {
13 | initLocal(workspace);
14 | } else {
15 | initGlobal();
16 | }
17 |
--------------------------------------------------------------------------------
/packages/workspace/src/utils/version-utils.ts:
--------------------------------------------------------------------------------
1 | import { valid } from 'semver';
2 |
3 | export function checkAndCleanWithSemver(pkgName: string, version: string) {
4 | let newVersion = version;
5 |
6 | if (valid(newVersion)) {
7 | return newVersion;
8 | }
9 |
10 | if (version.startsWith('~') || version.startsWith('^')) {
11 | newVersion = version.substring(1);
12 | }
13 |
14 | if (!valid(newVersion)) {
15 | throw new Error(
16 | `The package.json lists a version of ${pkgName} that Nx is unable to validate - (${version})`
17 | );
18 | }
19 |
20 | return newVersion;
21 | }
22 |
--------------------------------------------------------------------------------