Skip to content

Commit

Permalink
Revert "Revert liftoff changes due to gruntjs/grunt#1725 (#143)"
Browse files Browse the repository at this point in the history
This reverts commit e820858.
  • Loading branch information
vladikoff committed Apr 4, 2021
1 parent 6230186 commit ce4ed2d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
38 changes: 20 additions & 18 deletions bin/grunt
Expand Up @@ -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');
Expand Down Expand Up @@ -35,35 +35,37 @@ 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
extensions: extensions,
// 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);
}
});
});
});
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
},
Expand Down

0 comments on commit ce4ed2d

Please sign in to comment.