Skip to content

@nx/detox - Generators

The @nx/detox plugin provides various generators to help you create and configure detox projects within your Nx workspace. Below is a complete reference for all available generators and their options.

For an overview of the plugin and setup instructions, see the @nx/detox introduction.

Create Detox Configuration for the workspace.

Usage:

Terminal window
nx generate @nx/detox:application [options]

Aliases: app

Arguments:

Terminal window
nx generate @nx/detox:application <e2eDirectory> [options]
OptionTypeDescriptionDefault
--appProjectstring [required]Name of the frontend project to be tested.
--frameworkstring [required]App framework to test
--appDisplayNamestringDisplay name of the app to be tested if different from appProject
--appNamestringName of the app to be tested if different from appProject
--e2eNamestringName of the E2E Project.
--enableTypedLintingbooleanWhether to enable typed linting. For flat configs, this configures the recommended parserOptions.projectService and tsconfigRootDir. For legacy .eslintrc configs, this configures parserOptions.project. We do not enable this by default for lint performance reasons.false
--jsbooleanGenerate JavaScript files rather than TypeScript files.false
--linterstringThe tool to use for running lint checks."eslint"
--setParserOptionsProjectbooleanDeprecated alias for enableTypedLinting.false
--skipFormatbooleanSkip formatting files.false
--useProjectJsonbooleanUse a project.json configuration file instead of inlining the Nx configuration in the package.json file.

Convert existing Detox project(s) using @nx/detox:* executors to use @nx/detox/plugin. Defaults to migrating all projects. Pass ‘—project’ to migrate only one target.

Usage:

Terminal window
nx generate @nx/detox:convert-to-inferred [options]
OptionTypeDescriptionDefault
--projectstringThe project to convert from using the @nx/detox:* executors to use @nx/detox/plugin.
--skipFormatbooleanWhether to format files at the end of the migration.false

You can get help for any generator by adding the --help flag:

Terminal window
nx generate @nx/detox:<generator> --help