diff --git a/Deprecations-1.0.md b/Deprecations-1.0.md new file mode 100644 index 0000000..51939c5 --- /dev/null +++ b/Deprecations-1.0.md @@ -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. 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/Home.md b/Home.md index 736e1ce..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** @@ -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]] diff --git a/Using-the-CLI.md b/Using-the-CLI.md index cc4146a..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. @@ -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.