You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cli.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,22 @@ You can pass in format options with `--format-options <JSON>`. The JSON string m
81
81
82
82
* Suggested use: add with profiles so you can define an object and use `JSON.stringify` instead of writing `JSON` manually.
83
83
84
+
## ES Modules (experimental) (Node.js 12+)
85
+
86
+
You can optionally write your support code (steps, hooks, etc) with native ES modules syntax - i.e. using `import` and `export` statements without transpiling.
87
+
88
+
To enable this, run with the `--esm` flag.
89
+
90
+
This will also expand the default glob for support files to include the `.mjs` file extension.
91
+
92
+
As well as support code, these things can also be in ES modules syntax:
93
+
94
+
- Custom formatters
95
+
- Custom snippets
96
+
- Your `cucumber.js` config file
97
+
98
+
You can use ES modules selectively/incrementally - the module loading strategy that the `--esm` flag activates supports both ES modules and CommonJS.
99
+
84
100
## Colors
85
101
86
102
Colors can be disabled with `--format-options '{"colorsEnabled": false}'`
0 commit comments