From ba3126b70c501ac2d7db3c0e5d726aeb26b67bb0 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 26 Feb 2018 11:01:29 -0800 Subject: [PATCH 1/6] Add --hide-deprecations option to CLI docs --- Using-the-CLI.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Using-the-CLI.md b/Using-the-CLI.md index cc4146a..972afb7 100644 --- a/Using-the-CLI.md +++ b/Using-the-CLI.md @@ -45,7 +45,6 @@ Alternative to `grunt.loadNpmTasks(...)` Disable writing files (dry run). ### --verbose, -v - Verbose mode. A lot more information output. ### --version, -V @@ -53,3 +52,6 @@ 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. From 7f3d1e780d1a2b33f5d5b16d15001500f5e080aa Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 28 Feb 2018 10:23:03 -0800 Subject: [PATCH 2/6] Add 1.x deprecations guide --- Deprecations-1.0.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Deprecations-1.0.md diff --git a/Deprecations-1.0.md b/Deprecations-1.0.md new file mode 100644 index 0000000..193acdb --- /dev/null +++ b/Deprecations-1.0.md @@ -0,0 +1,18 @@ +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. From d3c63a14316cc03d168cb4c8970b98f45045b84f Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 28 Feb 2018 10:26:10 -0800 Subject: [PATCH 3/6] Deprecation message about coffeescript too --- Deprecations-1.0.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Deprecations-1.0.md b/Deprecations-1.0.md index 193acdb..51939c5 100644 --- a/Deprecations-1.0.md +++ b/Deprecations-1.0.md @@ -16,3 +16,8 @@ deprecated in Grunt 1.x and will be removed in the next major version release. * `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. From 19a2d77b9b48c637ad5b7af24f3b5cd8629d4a2b Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 28 Feb 2018 10:27:18 -0800 Subject: [PATCH 4/6] Add deprecations guide to migration guides --- Home.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Home.md b/Home.md index 736e1ce..46f2f69 100644 --- a/Home.md +++ b/Home.md @@ -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]] From a9d2b86de46d05bbc37daad8a0d1f04a600b1cc8 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 28 Feb 2018 10:28:04 -0800 Subject: [PATCH 5/6] Fix stable version --- Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 46f2f69..c15de79 100644 --- a/Home.md +++ b/Home.md @@ -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** From 8344a3f4f724a42c457059fc8603dbd284737e1f Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 28 Feb 2018 10:42:05 -0800 Subject: [PATCH 6/6] Update docs about Gruntfiles now supporting more types --- Getting-started.md | 8 +++++--- Using-the-CLI.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Getting-started.md b/Getting-started.md index d46f0c0..0035329 100644 --- a/Getting-started.md +++ b/Getting-started.md @@ -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 @@ -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: diff --git a/Using-the-CLI.md b/Using-the-CLI.md index 972afb7..920df2a 100644 --- a/Using-the-CLI.md +++ b/Using-the-CLI.md @@ -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.