gulpjs / liftoff

Launch your command line tool with ease.
MIT License
840 stars 52 forks source link

Change timing of requiring a loader for config to fix the issue #90 #93

Closed sttk closed 5 years ago

sttk commented 6 years ago

Preloading modules specified by opts.require and requiring a loader for config should move after respawning and ready to run a callback of launch to fix the issue #90.

sttk commented 5 years ago

@phated Could you review this pr, too?

To fix the issue: gulp-cli #181, I was going to modify to export registerLoader of liftoff and use it like this.

However I've noticed that this pr can achieve to fix gulp-cli #181 with the modification of gulp-cli like:

(gulp-cli/index.js)
cli.prepareConfig = function(env, opts) {
  var cfgLoadOrder = ['home', 'cwd'];
  var cfg = loadConfigFiles(env.configFiles['.gulp'], cfgLoadOrder);
  opts = mergeConfigToCliFlags(opts, cfg);
  env = mergeConfigToEnvFlags(env, cfg);

  Liftoff.prototype.prepareConfig(env, opts);

};
phated commented 5 years ago

I've rebased and made a couple of changes to this PR.

Closed by 6e280ae38beeff4a1961348c69d3c4ea5b10612b

Thanks for all the work on this stuff @sttk and I apologize for delaying review for so long!

phated commented 5 years ago

@sttk Do you think the 2 changes you made are fine to be released as version 2.5.1 or should I do 2.6.0?