pax_global_header00006660000000000000000000000064140530530330014506gustar00rootroot0000000000000052 comment=cf8c452550fb292927c02de266e38bd122290aa3 grunt-cli-1.4.3/000077500000000000000000000000001405305303300134175ustar00rootroot00000000000000grunt-cli-1.4.3/.github/000077500000000000000000000000001405305303300147575ustar00rootroot00000000000000grunt-cli-1.4.3/.github/workflows/000077500000000000000000000000001405305303300170145ustar00rootroot00000000000000grunt-cli-1.4.3/.github/workflows/test.yml000066400000000000000000000016371405305303300205250ustar00rootroot00000000000000name: Tests on: [push, pull_request] env: FORCE_COLOR: 2 jobs: run: name: Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: node: [10, 12, 14] os: [ubuntu-latest, windows-latest] steps: - name: Clone repository uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} - name: Install npm dependencies run: npm i - name: Run tests run: npm test # We test multiple Windows shells because of prior stdout buffering issues # filed against Grunt. https://github.com/joyent/node/issues/3584 - name: Run PowerShell tests run: "npm test # PowerShell" # Pass comment to PS for easier debugging shell: powershell if: startsWith(matrix.os, 'windows') grunt-cli-1.4.3/.gitignore000066400000000000000000000000611405305303300154040ustar00rootroot00000000000000node_modules npm-debug.log tmp package-lock.json grunt-cli-1.4.3/.jshintrc000066400000000000000000000003211405305303300152400ustar00rootroot00000000000000{ "boss": true, "curly": true, "eqeqeq": true, "immed": true, "latedef": true, "newcap": true, "noarg": true, "node": true, "strict": true, "sub": true, "undef": true, "unused": true } grunt-cli-1.4.3/AUTHORS000066400000000000000000000004411405305303300144660ustar00rootroot00000000000000Akshay Patel Alex Whitman Ben Alman ForbesLindesay Henrik Kok Jørgensen Jeffrey Lembeck JKAussieSkater Justin Ridgewell Kyle Robinson Young mcandre Nick Schonning paladox Peter deHaan Pine Mizune Scott González Sindre Sorhus Teppei Sato Tom McTiernan Tyler Kellen Vlad Filippov XhmikosR grunt-cli-1.4.3/CHANGELOG.md000066400000000000000000000023631405305303300152340ustar00rootroot00000000000000- v1.4.1: - date: 2021-05-24 - changes: - fix preload option for latest grunt - v1.4.0: - date: 2021-03-25 - changes: - updated dependencies - Requires node >= 10 - v1.3.2: - date: 2018-11-04 - changes: - bump v8 flags dependency - v1.3.1: - date: 2018-08-18 - changes: - cwd option fix - v1.3.0: - date: 2018-08-15 - changes: - Switch to 'liftoff' module for CLI - Dropped support for node 0.10, 0.12. - v1.2.0 - date: 2016-04-01 - changes: - Use shared grunt-known-options module. - v1.1.0 - date: 2016-03-22 - changes: - Update to "nopt": "~3.0.6". - nopt is upgraded to ~3.0.6 which has fixed many issues, including passing multiple arguments and dealing with numbers as options. Be aware previously --foo bar used to pass the value 'bar' to the option foo. It will now set the option foo to true and run the task bar. - v1.0.1 - date: 2016-03-22 - changes: - Revert to "nopt": "~1.0.10" due to issues with the update. - v1.0.0 - date: 2016-03-21 - changes: - Update dev deps - Update error message when Gruntfile is not found - v1.0.0-rc1 - date: 2016-02-11 - changes: - Update findup-sync and other deps - remove prefer global warning grunt-cli-1.4.3/Gruntfile.js000066400000000000000000000012711405305303300157150ustar00rootroot00000000000000/* * grunt-cli * http://gruntjs.com/ * * Copyright (c) 2016 Tyler Kellen, contributors * Licensed under the MIT license. * https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ 'bin/*', 'lib/**/*.js', 'Gruntfile.js' ], options: { jshintrc: '.jshintrc' } }, }); // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-jshint'); // "npm test" runs these tasks grunt.registerTask('test', ['jshint']); // Default task. grunt.registerTask('default', ['test']); }; grunt-cli-1.4.3/LICENSE-MIT000066400000000000000000000020561405305303300150560ustar00rootroot00000000000000Copyright (c) 2016 Tyler Kellen, contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. grunt-cli-1.4.3/README.md000066400000000000000000000033031405305303300146750ustar00rootroot00000000000000# grunt-cli [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-cli.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-cli) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/prp6g944b05jsq6d/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-cli/branch/master) > The Grunt command line interface. Install this globally and you'll have access to the `grunt` command anywhere on your system. ```shell npm install -g grunt-cli ``` **Note:** The job of the `grunt` command is to load and run the version of Grunt you have installed locally to your project, irrespective of its version. Starting with Grunt v0.4, you should never install Grunt itself globally. For more information about why, [please read this](http://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation). See the [Getting Started](http://gruntjs.com/getting-started) guide for more information. ## Shell tab auto-completion To enable tab auto-completion for Grunt, add one of the following lines to your `~/.bashrc` or `~/.zshrc` file. ```bash # Bash, ~/.bashrc eval "$(grunt --completion=bash)" ``` ```bash # Zsh, ~/.zshrc eval "$(grunt --completion=zsh)" ``` ## Installing grunt-cli locally If you prefer the idiomatic Node.js method to get started with a project (`npm install && npm test`) then install grunt-cli locally with `npm install grunt-cli --save-dev`. Then add a script to your `package.json` to run the associated grunt command: `"scripts": { "test": "grunt test" } `. Now `npm test` will use the locally installed `./node_modules/.bin/grunt` executable to run your Grunt commands. To read more about npm scripts, please visit the npm docs: . grunt-cli-1.4.3/bin/000077500000000000000000000000001405305303300141675ustar00rootroot00000000000000grunt-cli-1.4.3/bin/grunt000077500000000000000000000035721405305303300152630ustar00rootroot00000000000000#!/usr/bin/env node 'use strict'; process.title = 'grunt'; var Liftup = require('liftup'); var v8flags = require('v8flags'); var extensions = require('interpret').jsVariants; var nopt = require('nopt'); var gruntOptions = require('grunt-known-options'); var completion = require('../lib/completion.js'); var info = require('../lib/info.js'); var pkg = require('../package.json'); // Parse `gruntOptions` into a form that nopt can handle. var aliases = {}; var known = {}; Object.keys(gruntOptions).forEach(function(key) { var short = gruntOptions[key].short; if (short) { aliases[short] = '--' + key; } known[key] = gruntOptions[key].type; }); // Parse them and return an options object. var options = nopt(known, aliases, process.argv, 2); if ('completion' in options) { completion.print(options.completion); } else if (options.version) { console.log('grunt-cli v' + pkg.version); } v8flags(function (err, v8flags) { 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.prepare({ cwd: options.base, configPath: options.gruntfile, require: options.require, preload: options.preload, verbose: options.verbose }, function (env) { 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); } }); }); }); grunt-cli-1.4.3/completion/000077500000000000000000000000001405305303300155705ustar00rootroot00000000000000grunt-cli-1.4.3/completion/bash000077500000000000000000000030131405305303300164300ustar00rootroot00000000000000#!/bin/bash # grunt-cli # http://gruntjs.com/ # # Copyright (c) 2016 Tyler Kellen, contributors # Licensed under the MIT license. # https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT # Usage: # # To enable bash completion for grunt, add the following line (minus the # leading #, which is the bash comment character) to your ~/.bashrc file: # # eval "$(grunt --completion=bash)" # Search the current directory and all parent directories for a gruntfile. function _grunt_gruntfile() { local curpath="$PWD" while [[ "$curpath" ]]; do for gruntfile in "$curpath/"{G,g}runtfile.{js,coffee}; do if [[ -e "$gruntfile" ]]; then echo "$gruntfile" return fi done curpath="${curpath%/*}" done return 1 } # Enable bash autocompletion. function _grunt_completions() { # The currently-being-completed word. local cur="${COMP_WORDS[COMP_CWORD]}" # The current gruntfile, if it exists. local gruntfile="$(_grunt_gruntfile)" # The current grunt version, available tasks, options, etc. local gruntinfo="$(grunt --version --verbose 2>/dev/null)" # Options and tasks. local opts="$(echo "$gruntinfo" | awk '/Available options: / {$1=$2=""; print $0}')" local compls="$(echo "$gruntinfo" | awk '/Available tasks: / {$1=$2=""; print $0}')" # Only add -- or - options if the user has started typing - [[ "$cur" == -* ]] && compls="$compls $opts" # Tell complete what stuff to show. COMPREPLY=($(compgen -W "$compls" -- "$cur")) } complete -o default -F _grunt_completions grunt grunt-cli-1.4.3/completion/zsh000077500000000000000000000023051405305303300163220ustar00rootroot00000000000000#!/bin/zsh # grunt-cli # http://gruntjs.com/ # # Copyright (c) 2016 Tyler Kellen, contributors # Licensed under the MIT license. # https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT # Usage: # # To enable zsh completion for grunt, add the following line (minus the # leading #, which is the zsh comment character) to your ~/.zshrc file: # # eval "$(grunt --completion=zsh)" # Enable zsh autocompletion. function _grunt_completion() { local completions # The currently-being-completed word. local cur="${words[@]}" # The current grunt version, available tasks, options, etc. local gruntinfo="$(grunt --version --verbose 2>/dev/null)" # Options and tasks. local opts="$(echo "$gruntinfo" | awk '/Available options: / {$1=$2=""; print $0}')" local compls="$(echo "$gruntinfo" | awk '/Available tasks: / {$1=$2=""; print $0}')" # Only add -- or - options if the user has started typing - [[ "$cur" == -* ]] && compls="$compls $opts" # Trim whitespace. compls=$(echo "$compls" | sed -e 's/^ *//g' -e 's/ *$//g') # Turn compls into an array to of completions. completions=(${=compls}) # Tell complete what stuff to show. compadd -- $completions } compdef _grunt_completion grunt grunt-cli-1.4.3/lib/000077500000000000000000000000001405305303300141655ustar00rootroot00000000000000grunt-cli-1.4.3/lib/completion.js000066400000000000000000000014021405305303300166710ustar00rootroot00000000000000/* * grunt-cli * http://gruntjs.com/ * * Copyright (c) 2016 Tyler Kellen, contributors * Licensed under the MIT license. * https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT */ 'use strict'; // Nodejs libs. var fs = require('fs'); var path = require('path'); exports.print = function(name) { var code = 0; var filepath = path.join(__dirname, '../completion', name); var output; try { // Attempt to read shell completion file. output = String(fs.readFileSync(filepath)); } catch (err) { code = 5; output = 'echo "Specified grunt shell auto-completion rules '; if (name && name !== 'true') { output += 'for \'' + name + '\' '; } output += 'not found."'; } console.log(output); process.exit(code); }; grunt-cli-1.4.3/lib/info.js000066400000000000000000000023261405305303300154610ustar00rootroot00000000000000/* * grunt-cli * http://gruntjs.com/ * * Copyright (c) 2016 Tyler Kellen, contributors * Licensed under the MIT license. * https://github.com/gruntjs/grunt-init/blob/master/LICENSE-MIT */ 'use strict'; // Project metadata. var pkg = require('../package.json'); // Display grunt-cli version. exports.version = function() { console.log('grunt-cli v' + pkg.version); }; // Show help, then exit with a message and error code. exports.fatal = function(msg, code) { exports.helpHeader(); console.log('Fatal error: ' + msg); console.log(''); exports.helpFooter(); process.exit(code); }; // Show help and exit. exports.help = function() { exports.helpHeader(); exports.helpFooter(); process.exit(); }; // Help header. exports.helpHeader = function() { console.log('grunt-cli: ' + pkg.description + ' (v' + pkg.version + ')'); console.log(''); }; // Help footer. exports.helpFooter = function() { [ 'If you\'re seeing this message, grunt hasn\'t been installed locally to', 'your project. For more information about installing and configuring grunt,', 'please see the Getting Started guide:', '', 'https://gruntjs.com/getting-started', ].forEach(function(str) { console.log(str); }); }; grunt-cli-1.4.3/package.json000066400000000000000000000013051405305303300157040ustar00rootroot00000000000000{ "name": "grunt-cli", "description": "The grunt command line interface", "version": "1.4.3", "author": "Grunt Development Team (http://gruntjs.com/development-team)", "repository": "gruntjs/grunt-cli", "license": "MIT", "engines": { "node": ">=10" }, "scripts": { "test": "node bin/grunt test" }, "bin": { "grunt": "bin/grunt" }, "dependencies": { "grunt-known-options": "~2.0.0", "interpret": "~1.1.0", "liftup": "~3.0.1", "nopt": "~4.0.1", "v8flags": "~3.2.0" }, "devDependencies": { "grunt": "~1.3.0", "grunt-contrib-jshint": "~3.0.0" }, "files": [ "bin", "completion", "lib" ], "appveyor_id": "prp6g944b05jsq6d" }