From ce4ed2dc6dc97df98c158fd0f65835a683b50d2b Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Sun, 4 Apr 2021 10:15:32 -0400 Subject: [PATCH] Revert "Revert liftoff changes due to https://github.com/gruntjs/grunt/issues/1725 (#143)" This reverts commit e820858a2052768b43e7cfdd6f9adfd42b5b2aed. --- bin/grunt | 38 ++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/bin/grunt b/bin/grunt index 3186e44..cfc99d8 100755 --- a/bin/grunt +++ b/bin/grunt @@ -4,7 +4,7 @@ process.title = 'grunt'; -var Liftoff = require('liftoff'); +var Liftup = require('liftup'); var v8flags = require('v8flags'); var extensions = require('interpret').jsVariants; var nopt = require('nopt'); @@ -35,7 +35,7 @@ if ('completion' in options) { } v8flags(function (err, v8flags) { - var Grunt = new Liftoff({ + var Grunt = new Liftup({ name: 'grunt', configName: 'Gruntfile', // Support a number of languages based on file extension @@ -43,27 +43,29 @@ v8flags(function (err, v8flags) { // Flags that are v8 flags will be loaded into node instead of Gruntfile v8flags: v8flags }); - Grunt.launch({ + Grunt.prepare({ cwd: options.base, configPath: options.gruntfile, require: options.require, verbose: options.verbose }, function (env) { - var tasks = options.argv.remain; - delete options.argv; - // No grunt install found! - if (!env.modulePath) { - if (options.version) { - process.exit(); + Grunt.execute(env, function(env) { + var tasks = options.argv.remain; + delete options.argv; + // No grunt install found! + if (!env.modulePath) { + if (options.version) { + process.exit(); + } + if (options.help) { + info.help(); + } + info.fatal('Unable to find local grunt.', 99); + } else { + options.gruntfile = env.configPath; + var grunt = require(env.modulePath); + grunt.tasks(tasks, options); } - if (options.help) { - info.help(); - } - info.fatal('Unable to find local grunt.', 99); - } else { - options.gruntfile = env.configPath; - var grunt = require(env.modulePath); - grunt.tasks(tasks, options); - } + }); }); }); diff --git a/package.json b/package.json index 6c8dad8..13348bc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "dependencies": { "grunt-known-options": "~1.1.1", "interpret": "~1.1.0", - "liftoff": "~2.5.0", + "liftup": "~3.0.1", "nopt": "~4.0.1", "v8flags": "~3.2.0" },