Skip to content

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.

application

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]

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.
--jsbooleanGenerate JavaScript files rather than TypeScript files.false
--linterstringThe tool to use for running lint checks."eslint"
--setParserOptionsProjectbooleanWhether or not to configure the ESLint parserOptions.project option. We do not do this by default for lint performance reasons.false
--skipFormatbooleanSkip formatting files.false
--useProjectJsonbooleanUse a project.json configuration file instead of inlining the Nx configuration in the package.json file.

convert-to-inferred

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]

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

Getting Help

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

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