Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --hide-deprecations option to CLI docs #207

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Deprecations-1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This guide is here to help you future proof your projects as certain APIs have been
deprecated in Grunt 1.x and will be removed in the next major version release.

## Deprecations

* `grunt.util._` has been deprecated. Please `npm install lodash` and require [lodash](https://www.npmjs.com/package/lodash) directly.
* `grunt.util.async` has been deprecated. Please `npm install async` and require [async](https://www.npmjs.com/package/async) directly.
* `grunt.util.namespace` has been deprecated. Please `npm install getobject` and require [getobject](https://www.npmjs.com/package/getobject) directly.
* `grunt.util.hooker` has been deprecated. Please `npm install hooker` and require [hooker](https://www.npmjs.com/package/hooker) directly.
* `grunt.util.exit` has been deprecated. Please `npm install exit` and require [exit](https://www.npmjs.com/package/exit) directly.
* `grunt.util.toArray` has been deprecated. Please `npm install lodash.toarray` and require [lodash.toarray](https://www.npmjs.com/package/lodash.toarray) directly.
* `grunt.util.repeat` has been deprecated. Please use `new Array(num + 1).join(str || \' \')` or another library.
* `grunt.file.glob` has been deprecated. Please `npm install glob` and require [glob](https://www.npmjs.com/package/glob) directly.
* `grunt.file.minimatch` has been deprecated. Please `npm install minimatch` and require [minimatch](https://www.npmjs.com/package/minimatch) directly.
* `grunt.file.findup` has been deprecated. Please `npm install findup-sync` and require [findup-sync](https://www.npmjs.com/package/findup-sync) directly.
* `grunt.file.readYAML` has been deprecated. Please `npm install js-yaml` and require [js-yaml](https://www.npmjs.com/package/js-yaml) directly.
* `grunt.file.readJSON` has been deprecated. Please use `require("file.json")` directly.
* `grunt.event` has been deprecated. Please `npm install eventemitter2` and require [eventemitter2](https://www.npmjs.com/package/eventemitter2) directly.

### CoffeeScript
The next major version release of Grunt will no longer automatically process Gruntfiles in CoffeeScript.

You are now expected to `npm install coffeescript` separately if you would like to write your Gruntfile in CoffeeScript.
8 changes: 5 additions & 3 deletions Getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ A typical setup will involve adding two files to your project: `package.json` an

**package.json**: This file is used by [npm] to store metadata for projects published as npm modules. You will list grunt and the Grunt plugins your project needs as [devDependencies] in this file.

**Gruntfile**: This file is named `Gruntfile.js` or `Gruntfile.coffee` and is used to configure or define tasks and load Grunt plugins.
**When this documentation mentions a `Gruntfile` it is talking about a file, which is either a `Gruntfile.js` or a `Gruntfile.coffee`**.
**Gruntfile**: This file is named `Gruntfile.js` or `Gruntfile.[?]` and is used to configure or define tasks and load Grunt plugins.
**When this documentation mentions a `Gruntfile` it is talking about a file, which is either a `Gruntfile.js` or a `Gruntfile.[?]` where the extension corresponds to a specific transpile language**.

## package.json

Expand Down Expand Up @@ -85,7 +85,9 @@ Checkout the current available gruntplugins to be installed and used on your pro
Be sure to commit the updated `package.json` file with your project when you're done!

## The Gruntfile
The `Gruntfile.js` or `Gruntfile.coffee` file is a valid JavaScript or CoffeeScript file that belongs in the root directory of your project, next to the `package.json` file, and should be committed with your project source.
The `Gruntfile.js` file is a valid JavaScript file that belongs in the root directory of your project, next to the `package.json` file, and should be committed with your project source.

If you would like to write your Gruntfile in CoffeeScript, TypeScript, Babel or any other language; first install the appropriate package and give your Gruntfile a corresponding file extension. For instance, you would `npm install coffeescript` and name your file `Gruntfile.coffee` to write your Gruntfile in CoffeeScript.

A `Gruntfile` is comprised of the following parts:

Expand Down
3 changes: 2 additions & 1 deletion Home.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
> Welcome to the home of **Grunt**, a JavaScript automation tool.

Stable Version: **0.4.5**
Stable Version: **1.0.1**

Development Version: **master**

Expand All @@ -26,6 +26,7 @@ Development Version: **master**
* [[Development Team]]

### Migration guides
* [[Deprecations 1.0]]
* [[Upgrading from 0.3 to 0.4]]
* [[Upgrading from 0.4 to 1.0]]

Expand Down
6 changes: 4 additions & 2 deletions Using-the-CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Disable colored output.
### --gruntfile
Specify an alternate `Gruntfile`.

By default, grunt looks in the current or parent directories for the nearest `Gruntfile.js` or `Gruntfile.coffee` file.
By default, grunt looks in the current or parent directories for the nearest `Gruntfile.js` or a `Gruntfile.[?]` file ending with an extension that corresponds to a specific transpile language.

### --debug, -d
Enable debugging mode for tasks that support it.
Expand All @@ -45,11 +45,13 @@ Alternative to `grunt.loadNpmTasks(...)`
Disable writing files (dry run).

### --verbose, -v

Verbose mode. A lot more information output.

### --version, -V
Print the grunt version. Combine with --verbose for more info.

### --completion
Output shell auto-completion rules. See the grunt-cli documentation for more information.

### --hide-deprecations
Hide Grunt deprecation warning messages.