From 4d691e25378ac3bcac9f81f7bc0190f00f31c7d0 Mon Sep 17 00:00:00 2001 From: Vlad Filippov Date: Sun, 4 Apr 2021 10:18:12 -0400 Subject: [PATCH] Revert liftoff (#144) * 1.4.1 * Revert "Revert liftoff changes due to https://github.com/gruntjs/grunt/issues/1725 (#143)" This reverts commit e820858a2052768b43e7cfdd6f9adfd42b5b2aed. --- bin/grunt | 38 ++++++++++++++++++++------------------ package.json | 4 ++-- 2 files changed, 22 insertions(+), 20 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 e77ebe3..13348bc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-cli", "description": "The grunt command line interface", - "version": "1.4.0", + "version": "1.4.1", "author": "Grunt Development Team (http://gruntjs.com/development-team)", "repository": "gruntjs/grunt-cli", "license": "MIT", @@ -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" },