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
A string or array of modules to attempt requiring from the local working directory before invoking the launch callback.
382
382
@@ -387,21 +387,21 @@ Default: `null`
387
387
```js
388
388
var argv =require('minimist')(process.argv.slice(2));
389
389
MyApp.launch({
390
-
require:argv.require
390
+
preload:argv.preload
391
391
}, invoke);
392
392
```
393
393
394
394
**Matching CLI Invocation:**
395
395
```js
396
-
myapp --require coffee-script/register
396
+
myapp --preload coffee-script/register
397
397
```
398
398
399
399
#### callback(env)
400
400
401
401
A function called after your environment is prepared. A good place to modify the environment before calling `execute`. When invoked, `this` will be your instance of Liftoff. The `env` param will contain the following keys:
402
402
403
403
-`cwd`: the current working directory
404
-
-`require`: an array of modules that liftoff tried to pre-load
404
+
-`preload`: an array of modules that liftoff tried to pre-load
405
405
-`configNameSearch`: the config files searched for
406
406
-`configPath`: the full path to your configuration file (if found)
407
407
-`configBase`: the base directory of your configuration file (if found)
@@ -436,7 +436,7 @@ MyApp.prepare({}, onPrepare);
436
436
A function called after your application is executed. When invoked, `this` will be your instance of Liftoff, `argv` will be all command-line arguments (minus node & v8 flags), and `env` will contain the following keys:
437
437
438
438
-`cwd`: the current working directory
439
-
-`require`: an array of modules that liftoff tried to pre-load
439
+
-`preload`: an array of modules that liftoff tried to pre-load
440
440
-`configNameSearch`: the config files searched for
441
441
-`configPath`: the full path to your configuration file (if found)
442
442
-`configBase`: the base directory of your configuration file (if found)
@@ -448,10 +448,10 @@ A function called after your application is executed. When invoked, `this` will
448
448
449
449
#### `on('preload:before', function(name) {})`
450
450
451
-
Emitted before a module is pre-load. (But for only a module which is specified by `opts.require`.)
451
+
Emitted before a module is pre-load. (But for only a module which is specified by `opts.preload`.)
452
452
453
453
```js
454
-
var Hacker =newLiftoff({name:'hacker', require:'coffee-script'});
454
+
var Hacker =newLiftoff({name:'hacker', preload:'coffee-script'});
0 commit comments