From 3ce87e3a67164131f325386718aee6af02d4b8b9 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Mon, 18 Dec 2017 13:50:32 -0700 Subject: [PATCH] chore: Add docs for opts.forcedFlags --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index eca5af7..3eaef66 100644 --- a/README.md +++ b/README.md @@ -357,6 +357,27 @@ MyApp.launch({ myapp --require coffee-script/register ``` +#### opts.forcedFlags + +Allows you to force node or V8 flags during the launch. This is useful if you need to make sure certain flags will always be enabled or if you need to enable flags that don't show up in `opts.v8flags` (as these flags aren't validated against `opts.v8flags`). + +If this is specified as a function, it will receive the built `env` as its only argument and must return a string or array of flags to force. + +Type: `String|Array|Function` +Default: `null` + +**Example Configuration:** +```js +MyApp.launch({ + forcedFlags: ['--trace-deprecation'] +}, invoke); +``` + +**Matching CLI Invocation:** +```js +myapp --trace-deprecation +``` + #### callback(env) A function to start your application. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys: