Initial commit
[yaffs-website] / node_modules / liftoff / UPGRADING.md
1 # 1.0.0 -> 2.0.0
2 The option `nodeFlags` was renamed to `v8flags` for accuracy. It can now be a callback taking method that yields an array of flags, **or** an array literal.
3
4 # 0.11 -> 0.12
5 For the environment passed into the `launch` callback, `configNameRegex` has been renamed to `configNameSearch`.  It now returns an array of valid config names instead of a regular expression.
6
7 # 0.10 -> 0.11
8 The method signature for `launch` was changed in this version of Liftoff.
9
10 You must now provide your own options parser and pass your desired params directly into `launch` as the first argument.  The second argument is now the invocation callback that starts your application.
11
12 To replicate the default functionality of 0.10, use the following:
13 ```js
14 const Liftoff = require('liftoff');
15 const MyApp = new Liftoff({name:'myapp'});
16 const argv = require('minimist')(process.argv.slice(2));
17 const invoke = function (env) {
18   console.log('my environment is:', env);
19   console.log('my cli options are:', argv);
20   console.log('my liftoff config is:', this);
21 };
22 MyApp.launch({
23   cwd: argv.cwd,
24   configPath: argv.myappfile,
25   require: argv.require,
26   completion: argv.completion
27 }, invoke);
28 ```