{"id":19045484,"url":"https://github.com/yoast/plugin-grunt-tasks","last_synced_at":"2026-02-27T14:02:09.018Z","repository":{"id":29339067,"uuid":"121398968","full_name":"Yoast/plugin-grunt-tasks","owner":"Yoast","description":"Several tasks requires for our plugins","archived":false,"fork":false,"pushed_at":"2024-02-20T15:14:19.000Z","size":806,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":12,"default_branch":"develop","last_synced_at":"2025-04-23T23:47:49.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yoast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-13T15:25:40.000Z","updated_at":"2021-12-02T08:30:21.000Z","dependencies_parsed_at":"2024-06-21T17:34:03.409Z","dependency_job_id":"5052f25f-7f13-44bb-9508-292bbbd9ce41","html_url":"https://github.com/Yoast/plugin-grunt-tasks","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoast%2Fplugin-grunt-tasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoast%2Fplugin-grunt-tasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoast%2Fplugin-grunt-tasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoast%2Fplugin-grunt-tasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yoast","download_url":"https://codeload.github.com/Yoast/plugin-grunt-tasks/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535098,"owners_count":21446505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:50:22.696Z","updated_at":"2026-02-27T14:02:09.002Z","avatar_url":"https://github.com/Yoast.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grunt-Yoast-tasks\n\n\u003e The plugin that contains all custom Yoast tasks\n\n## Getting Started\nThis plugin requires Grunt `^1.0.4`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm i @yoast/grunt-plugin-tasks --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this bit of JavaScript:\n\n```js\n// Load Grunt configurations and tasks\nloadGruntConfig( grunt, {\n    configPath: path.join( process.cwd(), \"node_modules/@yoast/grunt-plugin-tasks/config/\" ),\n    overridePath: path.join( process.cwd(), project.paths.config ),\n    data: project,\n    jitGrunt: {\n        staticMappings: {\n            addtextdomain: \"grunt-wp-i18n\",\n            makepot: \"grunt-wp-i18n\",\n            glotpress_download: \"grunt-glotpress\",\n            \"update-version\": \"@yoast/grunt-plugin-tasks\",\n            \"set-version\": \"@yoast/grunt-plugin-tasks\",\n        },\n    },\n} );\n```\n\nYou can override individual task configs by adding them to your plugin's local grunt config directory.\n\n## Tasks this adds\nThis adds the following tasks to your plugin's repo (see below for usage):\n\n* [addtextdomain](https://github.com/Yoast/plugin-grunt-tasks#the-addtextdomain-task)\n* [checktextdomain](https://github.com/Yoast/plugin-grunt-tasks#the-checktextdomain-task)\n* [clean](https://github.com/Yoast/plugin-grunt-tasks#the-clean-task)\n* [compress](https://github.com/Yoast/plugin-grunt-tasks#the-compress-task)\n* [eslint](https://github.com/Yoast/plugin-grunt-tasks#the-eslint-task)\n* [glotpress_download](https://github.com/Yoast/plugin-grunt-tasks#the-glotpress_download-task)\n* [imagemin](https://github.com/Yoast/plugin-grunt-tasks#the-imagemin-task)\n* [makepot](https://github.com/Yoast/plugin-grunt-tasks#the-makepot-task)\n* [postcss](https://github.com/Yoast/plugin-grunt-tasks#the-postcss-task)\n* [rtlcss](https://github.com/Yoast/plugin-grunt-tasks#the-rtlcss-task)\n* [set-version](https://github.com/Yoast/plugin-grunt-tasks#the-set-version-task)\n* [shell](https://github.com/Yoast/plugin-grunt-tasks#the-shell-task)\n* [uglify](https://github.com/Yoast/plugin-grunt-tasks#the-uglify-task)\n* [update-version](https://github.com/Yoast/plugin-grunt-tasks#the-update-version-task)\n* [watch](https://github.com/Yoast/plugin-grunt-tasks#the-watch-task)\n* [wp_deploy](https://github.com/Yoast/plugin-grunt-tasks#the-wp_deploy-task)\n* [update-changelog-with-latest-pr-texts](https://github.com/Yoast/plugin-grunt-tasks#the-update-changelog-with-latest-pr-texts-task)\n* [get-latest-pr-texts](https://github.com/Yoast/plugin-grunt-tasks#the-get-latest-pr-texts-task)\n* [build-qa-changelog-task](https://github.com/Yoast/plugin-grunt-tasks#the-build-qa-changelog-task)\n* [download-qa-changelog](https://github.com/Yoast/plugin-grunt-tasks##the-download-qa-changelog-task)\n\n### The `addtextdomain` task\nSee: [cedaro/grunt-wp-i18n](https://github.com/cedaro/grunt-wp-i18n)\n\n#### Using our configuration\nThe `textdomain` value is read from the `package.json`: `plugin.textdomain`.  \nThe `files` value is read from the Grunt configuration: `files.php`. \n\n#### Overview\nIn your project's Gruntfile, add a section named `addtextdomain` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    addtextdomain: {\n        options: {\n            textdomain: \"\",    // Project text domain.\n            updateDomains: []  // List of text domains to replace.\n        },\n        target: {\n            files: {}          // Files to target.\n        }\n    }\n} );\n```\n\n#### Options\n##### textdomain\nType: `String`  \nDefault value: `''`  \nExample value: `'plugin-or-theme-slug'`\n\nDefaults to the \"Text Domain\" header if it exists, otherwise uses the project directory name.\n\n##### updateDomains\nType: `Array|true`  \nDefault value: `[]`  \nExample value: `[ 'original-domain', 'vendor-domain' ]`\n\nA list of text domains to replace with the new text domain. Setting the value to `true` will update all text domains with the new text domain.\n\n#### Usage Examples\nOptions may be specified at the task or target level, but are optional. Each target must define the files that should be processed. It's not necessary to declare a destination since the files will be updated in place.\n```js\ngrunt.initConfig( {\n    addtextdomain: { \n        options: {\n            textdomain: 'my-plugin-slug',\n        },\n        target: {\n            files: {\n                src: [\n                    '*.php',\n                    '**/*.php',\n                    '!node_modules/**',\n                    '!tests/**'\n                ]\n            }\n        }\n    }\n} );\n```\n\n\n### The `checktextdomain` task\nSee: [stephenharris/grunt-checktextdomain](https://github.com/stephenharris/grunt-checktextdomain)\n\n#### Using our configuration\nThe `options.textdomain` value is read from the `package.json`: `plugin.textdomain`.  \nThe `options.keywords` is\n```js\n[\n    \"__:1,2d\",\n    \"_e:1,2d\",\n    \"_x:1,2c,3d\",\n    \"_ex:1,2c,3d\",\n    \"_n:1,2,4d\",\n    \"_nx:1,2,4c,5d\",\n    \"_n_noop:1,2,3d\",\n    \"_nx_noop:1,2,3c,4d\",\n    \"esc_attr__:1,2d\",\n    \"esc_html__:1,2d\",\n    \"esc_attr_e:1,2d\",\n    \"esc_html_e:1,2d\",\n    \"esc_attr_x:1,2c,3d\",\n    \"esc_html_x:1,2c,3d\"\n]\n```\nThe `files.src` value is read from the Grunt configuration: `files.php`.  \nThe `files.expand` is `true`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `checktextdomain` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    checktextdomain: {\n        options: {}, // Task-specific options.\n        files: {}    // Files to target.\n    }\n} )\n```\n\n#### Options\n##### text_domain\nType: `String`|`Array`\n\nMust be provided. A text domain (or an array of text domains) indicating the domains to check against.\n\n##### keywords\nType: `Array`\n\nAn array of keyword specifications to look for.\n\n##### report_missing\nType: `Bool`  \nDefault value: `true`\n\nWhether to report use of keywords without a domain being passed.\n\n##### report_variable_domain\nType: `Bool`  \nDefault value: `true`\n\nWhether to report use of keywords with a variable being used as the domain.\n\n##### correct_domain\nType: `Bool`  \nDefault value: `false`\n\nWhether to automatically correct incorrect domains. Please note that this does **not** add in missing domains, and can **only** be used when one text domain is supplied. This will also correct instances where a variable, rather than string is used as a text doman, **unless** you set `report_variable_domain` to `false`.\n\n##### create_report_file\nType: `Bool`  \nDefault value: `false`\n\nCreate a hidden `.[target].json` file with reported errors.\n\n##### force\nType: `Bool`  \nDefault value: `false`\n\nSet to true to report text domain errors but not fail the task.\n\n#### Usage Examples\nThis is a typical set-up for WordPress development. The only thing specific to WordPress here is the keywords list.\n```js\nchecktextdomain: {\n    options: {\n        text_domain: \"my-domain\",\n        keywords: [\n            \"__:1,2d\",\n            \"_e:1,2d\",\n            \"_x:1,2c,3d\",\n            \"esc_html__:1,2d\",\n            \"esc_html_e:1,2d\",\n            \"esc_html_x:1,2c,3d\",\n            \"esc_attr__:1,2d\",\n            \"esc_attr_e:1,2d\",\n            \"esc_attr_x:1,2c,3d\",\n            \"_ex:1,2c,3d\",\n            \"_n:1,2,4d\",\n            \"_nx:1,2,4c,5d\",\n            \"_n_noop:1,2,3d\",\n            \"_nx_noop:1,2,3c,4d\"\n        ]\n    },\n    files: [\n        {\n            src: [ \"**/*.php\" ],\n            expand: true\n        }\n    ]\n}\n```\n\n\n### The `clean` task\nSee: [gruntjs/grunt-contrib-clean](https://github.com/gruntjs/grunt-contrib-clean)\n\n#### Using our configuration\nFor our clean tasks we need some Grunt configuration entries:\n    - `paths.languages`\n    - `paths.css`\n    - `paths.js`\n    - `files.artifact`\n    - `files.artifactComposer`\n\nThe `textdomain` value is read from the `package.json`: `plugin.textdomain`.\n\nWe add the following clean tasks:\n- `language-files`: Cleans the `paths.languages` path except the `index.php` file.\n- `after-po-download`: Cleans files in the `paths.languages` path with `po` or `json` extensions that start with the `textdomain` followed by `-{anything}-` and then `formal`, `informal` or `ao90`\n  - The `textdomain` value is read from the `package.json`: `plugin.textdomain`.\n  - Example filename that would get cleaned in the `paths.languages`: `textdomain-pluginname-informal.json`.\n- `po-files`: Cleans all the files in the `paths.languages` path with `po` and `pot` extensions.\n- `build-assets-css`: Cleans all the files in the `paths.css` path with `css` and `map` extensions.\n- `build-assets-js`: Cleans all the files in the `paths.js` path with `min.js` and `map` extensions.\n- `artifact`: Cleans all the files in the `files.artifact` path.\n- `composer-artifact`: Cleans all the files in the `files.artifactComposer` path.\n- `composer-files`: Cleans all the files in the `files.artifactComposer` `/vendor` path.\n\n#### Overview\nIn your project's Gruntfile, add a section named `clean` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    clean: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n            src: {},     // Files to target.\n        }\n    }\n} )\n```\n\n#### Options\n##### force\nType: `Boolean`  \nDefault: `false`\n\nSetting this to `true` allows the deletion of folders outside the current working dir (CWD). Use with caution.\n\n##### no-write\nType: `Boolean`  \nDefault: `false`\n\nWill not actually delete any files or directories.\nIf the task is run with the `--verbose` flag, the task will log messages of what files would have be deleted.\n\n_Note: As this task property contains a hyphen, you will need to surround it with quotes._\n\n#### Usage Examples\nThere are three formats you can use to run this task.\n\n##### Short\n```js\nclean: [ \"path/to/dir/one\", \"path/to/dir/two\" ]\n```\n\n##### Medium (specific targets with global options)\n```js\nclean: {\n    build: [ \"path/to/dir/one\", \"path/to/dir/two\" ],\n    release: [ \"path/to/another/dir/one\", \"path/to/another/dir/two\" ]\n},\n```\n\n##### Long (specific targets with per target options)\n```js\nclean: {\n    build: {\n        src: [ \"path/to/dir/one\", \"path/to/dir/two\" ]\n    }\n}\n```\n\n\n### The `compress` task\nSee: [gruntjs/grunt-contrib-compress](https://github.com/gruntjs/grunt-contrib-compress)\n\n#### Using our configuration\nWe implement an `artifact` compress task:\n- The `options.archive` is set to `artifact.zip`.\n- The `options.level` is set to `9`.\n- The `files.cwd` is set to `artifact/`.\n- The `files.src` is set to `**`.\n- The `files.dest` value is read from the Grunt configuration: `pluginSlug`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `compress` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    compress: {\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n            files: [],   // Files to target.\n        },\n    }\n} )\n```\n\n#### Options\n##### archive\nType: `String` or `Function`  \nModes: `zip` `tar`\n\nThis is used to define where to output the archive. Each target can only have one output file.\nIf the type is a Function it must return a String.\n\n*This option is only appropriate for many-files-to-one compression modes like zip and tar.  For gzip for example, please use grunt's standard src/dest specifications.*\n\n##### mode\nType: `String`\n\nThis is used to define which mode to use, currently supports `gzip`, `deflate`, `deflateRaw`, `tar`, `tgz` (tar gzip),`zip` and `brotli`.\n\nAutomatically detected per `dest:src` pair, but can be overridden per target if desired.\n\n##### level\nType: `Integer`  \nModes: `zip` `gzip`  \nDefault: `1`\n\nSets the level of archive compression.\n\n##### brotli\nType: `Object`  \nDefault:\n```js\n{\n    mode: 0,\n    quality: 11,\n    lgwin: 22,\n    lgblock: 0\n}\n```\n\nConfigure brotli compression settings.\n\n##### mode\nType: `Integer`\n* `0`: generic mode\n* `1`: text mode\n* `2`: font mode\n\nDefault: `0`\n\n##### quality\nType: `Integer`  \nDefault: `11`\n\nControls the compression-speed vs compression-density tradeoffs. The higher the quality, the slower the compression. Range is 0 to 11.\n\n##### lgwin\nType: `Integer`  \nDefault: `22`\n\nBase 2 logarithm of the sliding window size. Range is 10 to 24.\n\n##### lgblock\nType: `Integer`  \nDefault: `0`\n\nBase 2 logarithm of the maximum input block size. Range is 16 to 24. If set to 0, the value will be set based on the quality.  \n\n##### pretty\nType: `Boolean`  \nDefault: `false`\n\nPretty print file sizes when logging.\n##### createEmptyArchive\nType: `Boolean`  \nDefault: `true`\n\nThis can be used when you don't want to get an empty archive as a result, if there are no files at the specified paths.\n\nIt may be useful, if you don't clearly know if files exist and you don't need an empty archive as a result.\n\n#### File Data\nThe following additional keys may be passed as part of a `dest:src` pair when using an Archiver-backed format.\nAll keys can be defined as a `Function` that receives the file name and returns in the type specified below.\n\n##### date\nType: `Date`  \nModes: `zip` `tar` `tgz`\n\nSets the file date.\n\n##### mode\nType: `Integer`  \nModes: `zip` `tar` `tgz`\n\nSets the file permissions.\n\n##### store\nType: `Boolean`  \nDefault: `false`\n\nIf true, file contents will be archived without compression.\n\n##### comment\nType: `String`  \nModes: `zip`\n\nSets the file comment.\n\n##### gid\nType: `Integer`  \nModes: `tar` `tgz`\n\nSets the group of the file in the archive.\n\n##### uid\nType: `Integer`  \nModes: `tar` `tgz`\n\nSets the user of the file in the archive.\n\n#### Usage Examples\n```js\ncompress: {\n    main: {\n        options: {\n            archive: \"archive.zip\"\n        },\n        files: [\n            // Includes files in path.\n            { src: [ \"path/*\" ], dest: \"internal_folder/\", filter: \"isFile\" },\n            // Includes files in path and its subdirs.\n            { src: [ \"path/**\" ], dest: \"internal_folder2/\" },\n            // Makes all src relative to cwd.\n            { expand: true, cwd: \"path/\", src: [ \"**\" ], dest: \"internal_folder3/\" },\n            // Flattens results to a single level.\n            { flatten: true, src: [ \"path/**\" ], dest: \"internal_folder4/\", filter: \"isFile\" }\n        ]\n    }\n}\n```\n\n\n### The `eslint` task\nSee: [sindresorhus/grunt-eslint](https://github.com/sindresorhus/grunt-eslint)\n\n#### Using our configuration\nWe implement two `eslint` tasks:\n- `plugin`\n  - The `plugin.src` value is read from the Grunt configuration: `files.js`.\n  - The `options.maxWarnings` is set to `-1`. \n- `grunt`\n  - The `grunt.src` value is read from the Grunt configuration: `files.grunt` and `files.config`.\n  - The `options.maxWarnings` is set to `-1`. \n\n#### Overview\nIn your project's Gruntfile, add a section named `eslint` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    eslint: {\n        options: {}, // Task-specific options.\n        target: [],  // Files to target.\n    }\n} )\n```\n\n#### Options\nSee the [ESLint options](https://eslint.org/docs/developer-guide/nodejs-api#cliengine).\n\nIn addition the following options are supported:\n##### format\nType: `string`  \nDefault: `'stylish'`\n\nName of a [built-in formatter](https://github.com/nzakas/eslint/tree/master/lib/formatters) or path to a custom one.\n\nSome formatters you might find useful: [eslint-json](https://github.com/sindresorhus/eslint-json), [eslint-tap](https://github.com/sindresorhus/eslint-tap).\n\n##### outputFile\nType: `string`  \nDefault: `''`\n\nOutput the report to a file.\n\n##### quiet\nType: `boolean`  \nDefault: `false`\n\nReport errors only.\n\n##### maxWarnings\nType: `number`  \nDefault: `-1` *(Means no limit)*\n\nNumber of warnings to trigger non-zero exit code.\n\n##### failOnError\nType: `boolean`  \nDefault: `true`\n\nFail the build if ESLint found any errors.\n\n#### Usage Examples\n```js\ngrunt.initConfig( {\n    eslint: {\n        options: {\n            configFile: \"conf/eslint.json\",\n            rulePaths: [ \"conf/rules\" ]\n        },\n        target: [ \"file.js\" ]\n    }\n} );\n```\n\n\n### The `glotpress_download` task\nSee: [markoheijnen/grunt-glotpress](https://github.com/markoheijnen/grunt-glotpress)\n\n#### Using our configuration\nWe implement a `plugin` task:\n- The `options.url` value is read from the `package.json`: `plugin.glotpress`.\n- The `options.domainPath` value is read from the Grunt configuration: `paths.languages`.\n- The `options.file_format` value is set to `\"%domainPath%/%textdomain%-%wp_locale%.%format%\"`.\n- The `options.slug` value is read from the `package.json`: `plugin.glotpress_path`.\n- The `options.textdomain` value is read from the `package.json`: `plugin.textdomain`.\n- The `options.formats` value is set to `['mo']`.\n- The `options.filter` value is set to:\n```js\n{\n    translation_sets  : false,\n    minimum_percentage: 50,\n    waiting_strings   : false\n}\n```\n\n#### Overview\nIn your project's Gruntfile, add a section named `glotpress_download` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n  glotpress_download: {\n    options: {},     // Task-specific options.\n    your_target: {}, // Target-specific file lists and/or options.\n  },\n} );\n```\n\n#### Options\n##### domainPath\nType: `String`  \nDefault value: `languages`\n\nThe folder where all downloaded files will be stored.\n\n##### url\nType: `String`  \nDefault value: `false`\n\nThe url of the GlotPress installation (required).\n\n##### slug\nType: `String`  \nDefault value: `false`\n\nThe slug is the path in the GlotPress installation which can also be main-folder/sub-folder (required).\n\n##### textdomain\nType: `String`  \nDefault value: `false`\n\nThe textdomain that is used for WordPress. This is needed for the files. If not set, it will fallback to the slug.\n\n##### file_format\nType: `String`  \nDefault value: `%domainPath%/%textdomain%-%wp_locale%.%format%`\n\nThe structure how the file is being stored. Is based on previous settings but you could create your own format.\nFor now only those four values and short locale can be used. You could however save the files in different folders if you move a placeholder.\n\n##### formats\nType: `Array`  \nDefault value: `['po','mo']`\n\nThe file formats that will be downloaded for each translation set.\n\n##### filter\nType: `object`  \nDefault value: `{translation_sets: false, minimum_percentage: 30, waiting_strings: false}`\n\nYou can filter which files you want to have. By default it only checks the minimum percentage translation sets need to be translated.\nThe other parameters still need to be implemented.\n\n### Usage Examples\n\n#### Default Options\nIn this example, the default options are used to download all translations sets from a project.\n\n```js\ngrunt.initConfig( {\n    glotpress_download: {\n        core: {\n            options: {\n                domainPath: \"languages\",\n                url: \"http://wp-translate.org\",\n                slug: \"tabify-edit-screen\",\n                textdomain: \"tabify-edit-screen\",\n            }\n        },\n    },\n} );\n```\n\n\n### The `imagemin` task\nSee: [gruntjs/grunt-contrib-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin)\n\n#### Using our configuration\nWe implement a `plugin` task:\n- The `options.use` value is set to `gifsicle`, `jpegtran`, `optipng` and `svgo`.\n- The `files` array contains two sets: `images` and `assets`.\n    - Both have the `files.expand` value set to `true`.\n    - Both have the `files.src` value set to `[ \"*.*\" ]`.\n    - Both have the `files.isFile` value set to `true`.\n    - `images` has the `files.cwd` and `files.dest` both read from the Grunt configuration: `paths.images`.\n    - `assets` has the `files.cwd` and `files.dest` both read from the Grunt configuration: `paths.assets`.\n\nThere is an exception for the `svgo` plugin in order to keep a11y attributes for SVGs. It gets the following configuration:\n```js\n{\n\tplugins: [\n\t\t{ removeTitle: true },\n\t\t{ removeDesc: true },\n\t\t{\n\t\t\tremoveUnknownsAndDefaults: {\n\t\t\t\tkeepRoleAttr: true,\n\t\t\t\tkeepAriaAttrs: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\taddAttributesToSVGElement: {\n\t\t\t\tattributes: [\n\t\t\t\t\t{ role: \"img\" },\n\t\t\t\t\t{ \"aria-hidden\": \"true\" },\n\t\t\t\t\t{ focusable: \"false\" },\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t],\n}\n```\n\n#### Overview\nIn your project's Gruntfile, add a section named `imagemin` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n  imagemin: {\n    options: {}, // Task-specific options.\n    files: [],   // Files to target.\n  },\n} );\n```\n\n#### Options\n##### optimizationLevel *(png)*\nType: `number`  \nDefault: `3`\n\nSelect optimization level between `0` and `7`.\n\n##### progressive *(jpg)*\nType: `boolean`  \nDefault: `true`\n\nLossless conversion to progressive.\n\n##### interlaced *(gif)*\nType: `boolean`  \nDefault: `true`\n\nInterlace gif for progressive rendering.\n\n##### svgoPlugins *(svg)*\nType: `Array`\n\nCustomize which SVGO plugins to use. [More here](https://github.com/sindresorhus/grunt-svgmin#available-optionsplugins).\n\n##### use\nType: `Array`  \nDefault: `[imagemin.gifsicle(), imagemin.jpegtran(), imagemin.optipng(), imagemin.svgo()]`\n\n[Plugins](https://www.npmjs.com/browse/keyword/imageminplugin) to use with imagemin. It comes bundled with the following **lossless** optimizers:\n\n- [gifsicle](https://github.com/imagemin/imagemin-gifsicle) — *Compress GIF images*\n- [jpegtran](https://github.com/imagemin/imagemin-jpegtran) — *Compress JPEG images*\n- [optipng](https://github.com/imagemin/imagemin-optipng) — *Compress PNG images*\n- [svgo](https://github.com/imagemin/imagemin-svgo) — *Compress SVG images*\n\nThese are bundled for convenience and most users will not need anything else.\n\n##### concurrency\nType: `number`  \nDefault: `os.cpus().length`\n\nControl the maximum number of image optimizations that may be performed in parallel.\n\n#### Usage Examples\n```js\nconst mozjpeg = require('imagemin-mozjpeg');\n\ngrunt.initConfig( {\n    imagemin: {\n        static: {\n            options: {\n                optimizationLevel: 3,\n                svgoPlugins: [ { removeViewBox: false } ],\n                // Example plugin usage.\n                use: [ mozjpeg() ]\n            },\n            files: {\n                \"dist/img.png\": \"src/img.png\",\n                \"dist/img.jpg\": \"src/img.jpg\",\n                \"dist/img.gif\": \"src/img.gif\"\n            }\n        },\n        dynamic: {\n            files: [ {\n                expand: true,\n                cwd: \"src/\",\n                src: [ \"**/*.{png,jpg,gif}\" ],\n                dest: \"dist/\"\n            } ]\n        }\n    }\n} );\n```\n\n\n### The `makepot` task\nSee: [cedaro/grunt-wp-i18n](https://github.com/cedaro/grunt-wp-i18n)\n\n#### Using our configuration\nWe implement a `plugin` task:\n- The `options.domainPath` value is read from the Grunt configuration: `paths.languages`.\n- The `options.potFilename` value is read from the `package.json`: `plugin.textdomain`.\n- The `options.potHeaders` value is set to:\n    - The `options.potHeaders.poedit` value is set to `true`.\n    - The `options.potHeaders.report-msgid-bugs-to` value is read from the Grunt configuration: `pot.reportmsgidbugsto`.\n    - The `options.potHeaders.language-team` value is read from the Grunt configuration: `pot.languageteam`.\n    - The `options.potHeaders.last-translator` value is read from the Grunt configuration: `pot.lasttranslator`.\n- The `options.type` value is set to `wp-plugin`.\n- The `options.exclude` value is set to `[]`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `makepot` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    makepot: {\n        target: {\n            options: {\n                cwd: \"\",                          // Directory of files to internationalize.\n                domainPath: \"\",                   // Where to save the POT file.\n                exclude: [],                      // List of files or directories to ignore.\n                include: [],                      // List of files or directories to include.\n                mainFile: \"\",                     // Main project file.\n                potComments: \"\",                  // The copyright at the beginning of the POT file.\n                potFilename: \"\",                  // Name of the POT file.\n                potHeaders: {\n                    poedit: true,                 // Includes common Poedit headers.\n                    \"x-poedit-keywordslist\": true // Include a list of all possible gettext functions.\n                },                                // Headers to add to the generated POT file.\n                processPot: null,                 // A callback function for manipulating the POT file.\n                type: \"wp-plugin\",                // Type of project (wp-plugin or wp-theme).\n                updateTimestamp: true,            // Whether the POT-Creation-Date should be updated without other changes.\n                updatePoFiles: false              // Whether to update PO files in the same directory as the POT file.\n            }\n        }\n    }\n} );\n```\n\n#### Options\nAll options are optional, but at the very least a target needs to exist. At a minimum, set an option specifying the type of project.\n\n```js\ngrunt.initConfig( {\n    makepot: {\n        target: {\n            options: {\n                type: \"wp-plugin\"\n            }\n        }\n    }\n} );\n```\n\n##### cwd\nType: `String`  \nDefault value: `''`  \nExample value: `'release'`\n\nThe directory that should be internationalized. Defaults to the project root, but can be set to a subdirectory, for instance, when used in a build process. Should be relative to the project root.\n\n##### domainPath\nType: `String`  \nDefault value: `''`  \nExample value: `'/languages'`\n\nThe directory where the POT file should be saved. Defaults to the value from the \"Domain Path\" header if it exists.\n\n##### exclude\nType: `String`  \nDefault value: `[]`  \nExample value: `['subdir/.*']`\n\nList of files or directories to ignore when generating the POT file. Note that the globbing pattern is a basic PHP [regular expression](https://github.com/blazersix/grunt-wp-i18n/blob/develop/vendor/wp-i18n-tools/extract.php#L66).\n\n##### include\nType: `String`  \nDefault value: `[]`  \nExample value: `['subdir/.*']`\n\nList of files or directories to include when generating the POT file. Note that the globbing pattern is a basic PHP [regular expression](https://github.com/blazersix/grunt-wp-i18n/blob/develop/vendor/wp-i18n-tools/extract.php#L66)\n\n##### mainFile\nType: `String`  \nDefault value: `''`  \nExample value: `'plugin-slug.php'` or `'style.css'`\n\nName of the main project file where the headers can be found. In themes, this will default to `style.css`. An attempt will be made to auto-discover the main file for plugins, but specifying it here can improve performance and will help disambiguate between multiple plugin files in the same project.\n\n##### potComments\nType: `String`  \nExample value: `'Custom Copyright (c) {{year}}'`\n\nComment at the beginning of the POT file. Defaults to the copyright message generated by makepot.php. Use `\\n` for newlines and `{{year}}` to insert the current year.\n\n##### potFilename\nType: `String`  \nDefault value: `''`  \nExample value: `'plugin-or-theme-slug.pot'`\n\nName of the POT file. Defaults to the \"Text Domain\" header if it exists, otherwise uses the project directory name.\n\n##### potHeaders\nType: `Object`  \nExample value: `{ 'report-msgid-bugs-to': 'https://github.com/blazersix/grunt-wp-i18n/issues' }`\n\nList of headers to add to the POT file in the form of key-value pairs.\n\nAdding a `poedit` property with a value of `true` will add the following commonly-used Poedit headers to ease setup for translators:\n\n```js\n{\n    \"language\": \"en\",\n    \"plural-forms\": \"nplurals=2; plural=(n != 1);\",\n    \"x-poedit-country\": \"United States\",\n    \"x-poedit-sourcecharset\": \"UTF-8\",\n    \"x-poedit-keywordslist\": \"__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c;_nc:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\",\n    \"x-poedit-basepath\": \"../\",\n    \"x-poedit-searchpath-0\": \".\",\n    \"x-poedit-bookmarks\": \"\",\n    \"x-textdomain-support\": \"yes\"\n}\n```\n\nIf custom values are used for the various Poedit headers, but you want to include WordPress gettext function calls, set the value of `x-poedit-keywordslist` to `true` and they will be included automatically.\n\n##### processPot\nType: `Function( pot, options )`  \nDefault value: `null`\n\nA callback function for advanced manipulation of the POT file after it's generated.\n\n##### type\nType: `String`  \nDefault value: `'wp-plugin'`  \nExample value: `'wp-plugin'` or `'wp-theme'`\n\nThe type of project.\n\n##### updateTimestamp\nType: `Boolean`  \nDefault value: `true`\n\nWhether the `POT-Creation-Date` header should be updated if no other changes to the POT file are detected.\n\n##### updatePoFiles\nType: `Boolean`  \nDefault value: `false`\n\n[GNU gettext](https://www.gnu.org/software/gettext/) must be in your system path to use this option.\n\nWhether to update the PO files that are present in the same directory as the POT file using the [msgmerge](https://www.gnu.org/software/gettext/manual/html_node/msgmerge-Invocation.html) program.\n\n#### Usage Examples\n##### Custom Working Directory (cwd)\nIf using with a custom build process, the following config would process strings in the `/dist` subdirectory and save the POT file to `/dist/languages/plugin-slug.pot`.\n\nThe `report-msgid-bugs-to` and `language-team` POT headers will also be replaced with custom values in the `processPot` callback.\n\n```js\ngrunt.initConfig( {\n    makepot: {\n        target: {\n            options: {\n                cwd: \"dist\"\n                domainPath: \"/languages\",\n                mainFile: \"plugin-slug.php\",\n                potFilename: \"plugin-slug.pot\",\n                processPot: function( pot, options ) {\n                    pot.headers[\"report-msgid-bugs-to\"] = \"http://example.com/issues\";\n                    pot.headers[\"language-team\"] = \"Team Name \u003cteam@example.com\u003e\";\n                    return pot;\n                },\n                type: \"wp-plugin\"\n            }\n        }\n    }\n} );\n```\n\n\n### The `postcss` task\nSee: [nDmitry/grunt-postcss](https://github.com/nDmitry/grunt-postcss)\n\n#### Using our configuration\nWe implement a `build-default` task:\n- The `options.map` value is read from the Grunt configuration: `developmentBuild`.\n- The `options.processors` value is set to:\n```js\n[\n    require( \"autoprefixer\" )(),\n    require( \"cssnano\" )(),\n]\n```\n- The `src` value is read from the Grunt configuration: `files.css`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `postcss` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    postcss: {\n        options: {}, // Task-specific options.\n        dist: {\n            src: \"\"  // Files to target.\n        },\n    },\n} );\n```\n\n#### Options\n##### processors\nType: `Array`  \nDefault value: `[]`\n\nAn array of PostCSS compatible post-processors.\n\n##### map\nType: `Boolean|Object`  \nDefault value: `false`\n\nIf the `map` option isn't defined or is set to `false`, PostCSS won't create or update sourcemaps.\n\nIf `true` is specified, PostCSS will try to locate a sourcemap from a previous compilation step using an annotation comment (e.g. from Sass) and create a new sourcemap based on the found one (or just create a new inlined sourcemap). The created sourcemap can be either a separate file or an inlined map depending on what the previous sourcemap was.\n\nYou can gain more control over sourcemap generation by assigning an object to the `map` option:\n\n* `prev` (string or `false`): a path to a directory where a previous sourcemap is (e.g. `path/`). By default, PostCSS will try to find a previous sourcemap using a path from the annotation comment (or using the annotation comment itself if the map is inlined). You can also set this option to `false` to delete the previous sourcemap.\n* `inline` (boolean): whether a sourcemap will be inlined or not. By default, it will be the same as a previous sourcemap or inlined.\n* `annotation` (boolean or string): by default, PostCSS will always add annotation comments with a path to a sourcemap file unless it is inlined or the input CSS does not have an annotation comment. PostCSS presumes that you want to save sourcemaps next to your output CSS files, but you can override this behavior and set a path to a directory as a string value for the option.\n* `sourcesContent` (boolean): whether original file contents (e.g. Sass sources) will be included to a sourcemap. By default, it's `true` unless a sourcemap from a previous compilation step has the original contents missing.\n\n##### diff\nType: `Boolean|String`  \nDefault value: `false`\n\nSet it to `true` if you want to get a patch file:\n\n```js\noptions: {\n  diff: true // Or 'custom/path/to/file.css.patch'.\n}\n```\nYou can also specify a path where you want the file to be saved.\n\n##### failOnError\nType: `Boolean`  \nDefault value: `false`\n\nSet it to `true` if you want grunt to exit with an error on detecting a warning or error.\n\n##### writeDest\nType: `Boolean`  \nDefault value: `true`\n\nSet it to `false` if you do not want the destination files to be written. This does not affect the processing of the `map` and `diff` options.\n\n##### syntax, parser, stringifier\nOptions to control [PostCSS custom syntaxes](https://github.com/postcss/postcss#custom-syntaxes).\n```js\noptions: {\n  parser: require( \"postcss-safe-parser\" ) // Instead of a removed `safe` option.\n}\n```\n```js\noptions: {\n  syntax: require( \"postcss-scss\" ) // Work with SCSS directly.\n}\n```\n\n#### Usage Examples\n```js\ngrunt.initConfig( {\n    postcss: {\n        options: {\n            map: true, // Inline sourcemaps.\n            map: {     // Or:\n                inline: false,               // Save all sourcemaps as separate files...\n                annotation: \"dist/css/maps/\" // ...to the specified directory\n            },\n            \n            processors: [\n                require( \"pixrem\" )(),                                        // Add fallbacks for rem units.\n                require( \"autoprefixer\" )( { browsers: \"last 2 versions\" } ), // Add vendor prefixes.\n                require( \"cssnano\" )()                                        // Minify the result.\n            ]\n        },\n        dist: {\n          src: \"css/*.css\"\n        }\n    }\n} );\n```\n\n### The `rtlcss` task\nSee: [MohammadYounes/grunt-rtlcss](https://github.com/MohammadYounes/grunt-rtlcss)\n\n#### Using our configuration\nWe implement a `build` task:\n- The `options.map` value is read from the Grunt configuration: `developmentBuild`.\n- The `options.clean` value is set to `true`.\n- The `options.plugins` is used to swap icons by having the value set to:\n```js\n[\n    {\n        name: \"swap-dashicons-left-right-arrows\",\n        priority: 10,\n        directives: {\n            control: {},\n            value: [],\n        },\n        processors: [\n            {\n                expr: /content/im,\n                action: function( prop, value ) {\n                    // For dashicons-arrow-left.\n                    if ( value === '\"\\\\f141\"' ) {\n                        value = '\"\\\\f139\"';\n                        // For dashicons-arrow-left-alt.\n                    } else if ( value === '\"\\\\f340\"' ) {\n                        value = '\"\\\\f344\"';\n                        // For dashicons-arrow-left-alt2.\n                    } else if ( value === '\"\\\\f341\"' ) {\n                        value = '\"\\\\f345\"';\n                        // For dashicons-arrow-right.\n                    } else if ( value === '\"\\\\f139\"' ) {\n                        value = '\"\\\\f141\"';\n                        // For dashicons-arrow-right-alt.\n                    } else if ( value === '\"\\\\f344\"' ) {\n                        value = '\"\\\\f340\"';\n                        // For dashicons-arrow-right-alt2.\n                    } else if ( value === '\"\\\\f345\"' ) {\n                        value = '\"\\\\f341\"';\n                    }\n                    return { prop: prop, value: value };\n                },\n            },\n        ],\n    },\n],\n```\n- The `options.expand` value is set to `true`.\n- The `options.cwd` value is read from the Grunt configuration: `paths.css`.\n- The `options.src` value is set to all `.css` files except ones that end with `-rtl.css` or `-rtl.min.css` depending on the Grunt configuration: `developmentBuild`.\n- The `options.dest` value is read from the Grunt configuration: `paths.css`.\n- The `options.ext` value is set to `-rtl.css` or `-rtl.min.css` depending on the Grunt configuration: `developmentBuild`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `imagemin` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    rtlcss: {}, // See the usage example for the content.\n} );\n```\n\n#### Options\n##### opts\nType: `Object`  \nDefault:\n```js\n{\n    \"autoRename\": false,\n    \"autoRenameStrict\": false,\n    \"blacklist\": {},\n    \"clean\": true,\n    \"greedy\": false,\n    \"processUrls\": false,\n    \"stringMap\": []\n}\n```\n\nSpecifies [RTLCSS options](https://github.com/MohammadYounes/rtlcss#options-object).\n\n##### plugins\nType: `Array`  \nDefault: `[]`\n\nSpecifies custom [RTLCSS plugins](https://github.com/MohammadYounes/rtlcss#plugins-array).\n\n##### map\nType: `Boolean` or `Object`    \nDefault: `false`\n\nSpecifies whether to generate source maps or not, If you want more control over source map generation, you can define the map option as an object. (see [postcss docs](https://github.com/postcss/postcss/blob/master/docs/source-maps.md#options)).\n\n#### saveUnmodified\nType: `Boolean`  \nDefault: `true`\n\nSpecifies whether to save unmodified files or not.\n\n#### Usage Examples\n```js\nrtlcss: {\n    myTask: {\n        // Task options.\n        options: {\n            // Generate source maps.\n            map: { inline: false },\n            // RTL CSS options.\n            opts: {\n                clean: false\n            },\n            // RTL CSS plugins.\n            plugins: [],\n            saveUnmodified: true,\n        },\n        expand: true,\n        cwd: \"ltr/\",\n        dest: \"rtl/\",\n        src: [ \"**/*.css\" ]\n    }\n}\n```\n\n### The 'set-version' task\n#### Using our configuration\nWe implement a `packageJSON` task:\n- The `options.base` value is set to `yoast`.\n- The `options.target` value is set to `pluginVersion`.\n- The `options.src` value is set to `package.json`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `yoast_tasks` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig( {\n    yoast_tasks: {\n        options: {},    // Task-specific options.\n        your_target: {} // Target-specific file lists and/or options\n    }\n} );\n```\n\n#### Options\n##### base\nType: `String`  \nDefault value: `''`\n\nThe JSON file base object for the target to be in.\n\n##### target\nType: `String`  \nDefault value: `''`\n\nThe child of the options.base object to replace the version string in.\n\n##### src\nType: `String`  \nDefault value: `''`\n\nThe source JSON file to set the version in.\n\n#### Usage Examples\n```js\npackageJSON: {\n    options: {\n        base: \"someOrganisation\",\n        target: \"pluginVersion\",\n    },\n    src: \"tmp/testPackage.json\",\n}\n```\n\n\n### The `shell` task\nSee: [sindresorhus/grunt-shell](https://github.com/sindresorhus/grunt-shell)\n\n#### Using our configuration\nWe implement the following tasks:\n- `composer-install-production`\n    - The `command` is set to `composer install --prefer-dist --optimize-autoloader --no-dev`.\n- `composer-install-dev`\n    - The `command` is set to `composer install`.\n- `composer-reset-config`\n    - The `command` is set to `git checkout composer.json`.\n    - The `options.failOnError` is set to `false`.\n- `composer-reset-lock`\n    - The `command` is set to `git checkout composer.lock`.\n    - The `options.failOnError` is set to `false`.\n- `php-lint`\n    - The `command` is set to:\n```\nfind -L . \n-path ./vendor -prune -o \n-path ./vendor_prefixed -prune -o \n-path ./node_modules -prune -o \n-path ./artifact -prune -o \n-name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l\n```\n- `phpcs`\n    - The `command` is set to `php ./vendor/squizlabs/php_codesniffer/scripts/phpcs`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `shell` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    compress: {\n        taskName: {      // The name of your task.\n            command: [], // The shell command to run.\n            options: {}, // Task-specific options.\n        },\n    }\n} )\n```\n\n#### Config\n##### command\n*Required*  \nType: `string`, `function`\n\nThe command you want to run or a function which returns it. Supports underscore templates.\n\n#### Options\n##### stdout\nType: `boolean`  \nDefault: `true`\n\nShow stdout in the Terminal.\n\n##### stderr\nType: `boolean`  \nDefault: `true`\n\nShow stderr in the Terminal.\n\n##### stdin\nType: `boolean`  \nDefault: `true`\n\nForward the terminal's stdin to the command.\n\n##### failOnError\nType: `boolean`  \nDefault: `true`\n\nFail task if it encounters an error. Does not apply if you specify a `callback`.\n\n##### stdinRawMode\nType: `boolean`  \nDefault: `false`\n\nThis sets `stdin` to [act as a raw device](http://nodejs.org/api/tty.html#tty_rs_setrawmode_mode).\n\n##### callback(err, stdout, stderr, cb)\nType: `function`  \nDefault: `function () {}`\n\nLets you override the default callback with your own.\n\n**Make sure to call the `cb` method when you're done.**\n\n##### execOptions\nType: `object`\n\nSpecify some options to be passed to the [.exec()](http://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback) method:\n\n- `cwd` String *Current working directory of the child process*\n- `env` Object *Environment key-value pairs*\n- `setsid` Boolean\n- `encoding` String *(Default: 'utf8')*\n- `timeout` Number *(Default: 0)*\n- `maxBuffer` Number *(Default: 200\\*1024)*\n- `killSignal` String *(Default: 'SIGTERM')*\n\n#### Usage Examples\n```js\ngrunt.initConfig( {\n    shell: {\n        subfolderLs: {\n            command: \"ls\",\n            options: {\n                stderr: false,\n                execOptions: {\n                    cwd: \"tasks\"\n                }\n            }\n        }\n    }\n} );\n```\n\n### The `uglify` task\nSee: [gruntjs/grunt-contrib-uglify](https://github.com/gruntjs/grunt-contrib-uglify)\n\n#### Using our configuration\nWe implement a `js` task:\n- The `options.preserveComments` value is set to `some`.\n- The `options.report` value is set to `gzip`.\n- The `options.sourceMap` value is read from the Grunt configuration: `developmentBuild`.\n- The `files` value is set to an array with one object:\n    - The `options.expand` value is set to `true`.\n    - The `options.src` value is read from the Grunt configuration: `files.js`.\n    - The `options.ext` value is set to `.min.js`.\n    - The `options.extDot` value is set to `first`.\n    - The `options.isFile` value is set to `true`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `uglify` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    uglify: {\n        options: {},     // Global options.\n        targetName: {    // The name of your target.\n            options: {}, // Task-specific options.\n            files: {},   // Target-specific file lists.\n        },\n    },\n} );\n```\n\n#### Options\n##### mangle\nType: `Boolean` `Object`  \nDefault: `{}`\n\nTurn on or off mangling with default options. If an `Object` is specified, it is passed directly to `ast.mangle_names()` *and* `ast.compute_char_frequency()` (mimicking command line behavior). [View all options here](https://github.com/mishoo/UglifyJS2#mangle-options).\n\n##### compress\nType: `Boolean` `Object`  \nDefault: `{}`\n\nTurn on or off source compression with default options. If an `Object` is specified, it is passed as options to `UglifyJS.Compressor()`. [View all options here](https://github.com/mishoo/UglifyJS2#compress-options).\n\n##### beautify\nType: `Boolean` `Object`  \nDefault: `false`\n\nTurns on beautification of the generated source code. [View all options here](https://github.com/mishoo/UglifyJS2#output-options)\n\n##### parse.expression\nType: `Boolean`  \nDefault: `false`\n\nParse a single expression, rather than a program (for parsing JSON)\n\n##### report\nType: `string`  \nChoices: `'min'`, `'gzip'`  \nDefault: `'min'`\n\nReport minification result or both minification and gzip results.\nThis is useful to see exactly how well uglify-js is performing but using `'gzip'` will make the task take 5-10x longer to complete. [Example output](https://github.com/sindresorhus/maxmin#readme).\n\n##### sourceMap\nType: `Boolean`  \nDefault: `false`\n\nIf `true`, a source map file will be generated in the same directory as the `dest` file. By default it will have the same basename as the `dest` file, but with a `.map` extension.\n\n##### sourceMapName\nType: `String` `Function`  \nDefault: `undefined`\n\nTo customize the name or location of the generated source map, pass a string to indicate where to write the source map to. If a function is provided, the uglify destination is passed as the argument and the return value will be used as the file name.\n\n##### sourceMapIn\nType: `String` `Function`  \nDefault: `undefined`\n\nThe location of an input source map from an earlier compilation, e.g. from CoffeeScript. If a function is provided, the\nuglify source is passed as the argument and the return value will be used as the sourceMap name. This only makes sense\nwhen there's one source file.\n\n##### sourceMap.includeSources\nType: `Boolean`  \nDefault: `false`\n\nPass this flag if you want to include the content of source files in the source map as sourcesContent property.\n\n##### sourceMap.root\nType: `String`  \nDefault: `undefined`\n\nWith this option you can customize root URL that browser will use when looking for sources.\n\nIf the sources are not absolute URLs after prepending of the `sourceMap.root`, the sources are resolved relative to the source map.\n\n##### sourceMap.url\nType: `String`  \nDefault: `undefined`\n\nOverride the calculated value for `sourceMappingURL` in the source map. This is useful if the source map location is not relative to the base path of the minified file, i.e. when using a CDN\n\n##### wrap\nType: `String`  \nDefault: `undefined`\n\nWrap all of the code in a closure, an easy way to make sure nothing is leaking.\nFor variables that need to be public `exports` and `global` variables are made available.\nThe value of wrap is the global variable exports will be available as.\n\n##### output.ascii_only\nType: `Boolean`  \nDefault: `false`\n\nEnables to encode non-ASCII characters as \\uXXXX.\n\n##### output.comments\nType: `Boolean` `String` `Function`  \nDefault: `undefined`  \nOptions: `false` `'all'` `'some'`\n\nTurn on preservation of comments.\n\n- `false` will strip all comments\n- `'all'` will preserve all comments in code blocks that have not been squashed or dropped\n- `'some'` will preserve all comments that include a closure compiler style directive (`@preserve` `@license` `@cc_on`)\n- `Function` specify your own comment preservation function. You will be passed the current node and the current comment and are expected to return either `true` or `false`\n- `RegExp` `'/[RegExp]/'` will preserve comments matching given RegExp or stringified RegExp\n\n##### banner\nType: `String`  \nDefault: `''`\n\nThis string will be prepended to the minified output. Template strings (e.g. `\u003c%= config.value %\u003e`) will be expanded automatically.\n\n##### footer\nType: `String`  \nDefault: `''`\n\nThis string will be appended to the minified output. Template strings (e.g. `\u003c%= config.value %\u003e`) will be expanded automatically.\n\n##### ie8\nType: `Boolean`  \nDefault: `false`\n\nSet this to `true` if you still care about full compliance with Internet Explorer 6-8 quirks.\n\n##### mangle.properties\nType: `Boolean` `Object`  \nDefault: `false`\n\nTurn on or off property mangling with default options. If an `Object` is specified, it is passed directly to `ast.mangle_properties()` (mimicking command line behavior). [View all options here](https://github.com/mishoo/UglifyJS2#mangle-options).\n\n##### reserveDOMProperties\nType: `Boolean`  \nDefault: `false`\n\nUse this flag in conjunction with `mangle.properties` to prevent built-in browser object properties from being mangled.\n\n##### exceptionsFiles\nType: `Array`  \nDefault: `[]`\n\nUse this with `mangle.properties` to pass one or more JSON files containing a list of variables and object properties\nthat should not be mangled. See the [UglifyJS docs](https://www.npmjs.com/package/uglify-js) for more info on the file syntax.\n\n##### nameCache\nType: `String`  \nDefault: `''`\n\nA string that is a path to a JSON cache file that uglify will create and use to coordinate symbol mangling between\nmultiple runs of uglify. Note: this generated file uses the same JSON format as the `exceptionsFiles` files.\n\n##### output.quote_style\nType: `Integer`  \nDefault: `0`\n\nPreserve or enforce quotation mark style.\n\n* `0` will use single or double quotes such as to minimize the number of bytes (prefers double quotes when both will do)\n* `1` will always use single quotes\n* `2` will always use double quotes\n* `3` will preserve original quotation marks\n\n#### Usage Examples\n```js\ngrunt.initConfig( {\n    uglify: {\n        my_target: {\n            options: {\n                sourceMap: true,\n                sourceMapName: \"path/to/sourcemap.map\"\n            },\n            files: {\n                \"dest/output.min.js\": [ \"src/input.js\" ]\n            }\n        }\n    }\n} );\n```\n\n### The 'update-version' task\n#### Using our configuration\nWe implement the following tasks:\n- `options`\n    - The `version` value is read from the Grunt configuration: `pluginVersion`.\n- `readme`\n    - The `options.regEx` value is set to `/(Stable tag:\\s+)(\\d+(\\.\\d+){0,3})([^\\n^\\.\\d]?.*?)(\\n)/`.\n    - The `options.preVersionMatch` value is set to `$1`.\n    - The `options.postVersionMatch` value is set to `$5`.\n    - The `src` value is set to `readme.txt`.\n- `readmeMd`\n    - The `options.regEx` value is set to `/(Stable tag:\\s+)(\\d+(\\.\\d+){0,3})([^\\n^\\.\\d]?.*?)(\\n)/`.\n    - The `options.preVersionMatch` value is set to `$1`.\n    - The `options.postVersionMatch` value is set to `$5`.\n    - The `src` value is set to `README.md`.\n- `pluginFile`\n    - The `options.regEx` value is set to `/(\\* Version:\\s+)(\\d+(\\.\\d+){0,3})([^\\n^\\.\\d]?.*?)(\\n)/`.\n    - The `options.preVersionMatch` value is set to `$1`.\n    - The `options.postVersionMatch` value is set to `$5`.\n    - The `src` value is read from the Grunt configuration: `pluginMainFile`.\n- `initializer`\n    - The `options.regEx` value is set to `(define\\\\( '\u003c%= pluginVersionConstant %\u003e'\\\\, \\\\')(\\\\d+(\\\\.\\\\d+){0,3})([^\\\\.^\\\\'\\\\d]?.*?)(\\\\' \\\\);\\\\n)`.\n    - The `options.preVersionMatch` value is set to `$1`.\n    - The `options.postVersionMatch` value is set to `$5`.\n    - The `src` value is read from the Grunt configuration: `pluginMainFile`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `yoast_tasks` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig( {\n    yoast_tasks: {\n        options: {},     // Task-specific options.\n        your_target: {}, // Target-specific file lists and/or options.\n    },\n} );\n```\n\n#### Options\n##### version\nType: `String`  \nDefault value: `''`\n\nThe string value that will be the new version string.\n\n##### regex\nType: `String`  \nDefault value: `''`\n\nA regex string that is used to find the line to be updated in the file.\n\n##### preVersionMatch\nType: `String`  \nDefault value: `''`\n\nA prefix to the version string, for example a regex capture group.\n\n##### postVersionMatch\nType: `String`  \nDefault value: `''`\n\nA postfix to the version string, for example a regex capture group.\n\n#### Usage Example\n```js\nreadme: {\n    options: {\n        version: \"1.1\",\n        regEx: /(Stable tag: )(\\d+(\\.\\d+){0,3})([^\\n^\\.\\d]?.*?)(\\n)/,\n        preVersionMatch: \"$1\",\n        postVersionMatch: \"$5\"\n    },\n    src: \"tmp/README.md\"\n}\n```\n\n### The `watch` task\nSee: [gruntjs/grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch)\n\n#### Using our configuration\nWe implement a `plugin` task:\n- The `options.url` value is read from the `package.json`: `plugin.glotpress`.\n- The `options.domainPath` value is read from the Grunt configuration: `paths.languages`.\n- The `options.formats` value is set to `['mo']`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `watch` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    watch: {\n        options: {},    // Global options.\n        your_target: {  // The name of your target.\n            files: [],  // Files to target.\n            tasks: [],  // Tasks to perform on the targets.\n            options: {} // Target-specific file lists and/or options.\n        },\n    },\n} );\n```\n\n#### Settings\nThere are a number of options available. Please review the [minimatch options here](https://github.com/isaacs/minimatch#options). As well as some additional options as follows:\n\n##### files\nType: `String|Array`\n\nThis defines what file patterns this task will watch. It can be a string or an array of files and/or minimatch patterns.\n\n##### tasks\nType: `String|Array`\n\nThis defines which tasks to run when a watched file event occurs.\n\n#### Options\n##### spawn\nType: `Boolean`  \nDefault: `true`\n\nWhether to spawn task runs in a child process. Setting this option to `false` speeds up the reaction time of the watch (usually 500ms faster for most) and allows subsequent task runs to share the same context. Not spawning task runs can make the watch more prone to failing so please use as needed.\n\n##### interrupt\nType: `Boolean`  \nDefault: `false`\n\nAs files are modified this watch task will spawn tasks in child processes. The default behavior will only spawn a new child process per target when the previous process has finished. Set the `interrupt` option to true to terminate the previous process and spawn a new one upon later changes.\n\n##### debounceDelay\nType: `Integer`  \nDefault: `500`\n\nHow long to wait before emitting events in succession for the same filepath and status. For example if your `Gruntfile.js` file was `changed`, a `changed` event will only fire again after the given milliseconds.\n\n##### interval\nType: `Integer`  \nDefault: `100`\n\nThe `interval` is passed to `fs.watchFile`. Since `interval` is only used by `fs.watchFile` and this watcher also uses `fs.watch`; it is recommended to ignore this option. *Default is 100ms*.\n\n##### event\nType: `String|Array`  \nDefault: `'all'`\n\nSpecify the type of watch events that triggers the specified task. This option can be one or many of: `'all'`, `'changed'`, `'added'` and `'deleted'`.\n\n##### reload\nType: `Boolean`  \nDefault: `false`\n\nBy default, if `Gruntfile.js` is being watched, then changes to it will trigger the watch task to restart, and reload the `Gruntfile.js` changes.\nWhen `reload` is set to `true`, changes to *any* of the watched files will trigger the watch task to restart.\nThis is especially useful if your `Gruntfile.js` is dependent on other files.\n\n##### forever\nType: `Boolean`  \nDefault: `true`\n\nThis is *only a task level option* and cannot be configured per target. By default the watch task will duck punch `grunt.fatal` and `grunt.warn` to try and prevent them from exiting the watch process. If you don't want `grunt.fatal` and `grunt.warn` to be overridden set the `forever` option to `false`.\n\n##### dateFormat\nType: `Function`\n\nThis is *only a task level option* and cannot be configured per target. By default when the watch has finished running tasks it will display the message `Completed in 1.301s at Thu Jul 18 2013 14:58:21 GMT-0700 (PDT) - Waiting...`. You can override this message by supplying your own function.\n\n##### atBegin\nType: `Boolean`  \nDefault: `false`\n\nThis option will trigger the run of each specified task at startup of the watcher.\n\n##### livereload\nType: `Boolean|Number|Object`  \nDefault: `false`\n\nSet to `true` or set `livereload: 1337` to a port number to enable live reloading. Default and recommended port is `35729`.\n\nIf enabled a live reload server will be started with the watch task per target. Then after the indicated tasks have run, the live reload server will be triggered with the modified files.\n\nSee also how to [enable livereload on your HTML](https://github.com/gruntjs/grunt-contrib-watch/blob/master/docs/watch-examples.md#enabling-live-reload-in-your-html).\n\nPassing an object to `livereload` allows listening on a specific port and hostname/IP or over https connections (by specifying `key` and `cert` paths).\n\n##### cwd\nType: `String|Object`  \nDefault: `process.cwd()`\n\nAbility to set the current working directory. Defaults to `process.cwd()`. Can either be a string to set the cwd to match files and spawn tasks or an object to set each independently.\n\nTo strip off a path before emitting events:\n```js\noptions: {\n  cwd: {\n    files: 'a/path',\n    event: 'a/path'\n  }\n}\n```\nThis will strip off `a/path` before emitting events. This option is useful for specifying the base directory to use with livereload.\n\n##### livereloadOnError\nType: `Boolean`  \nDefault: `true`  \n\nOption to prevent the livereload if the executed tasks encountered an error. If set to `false`, the livereload will only be triggered if all tasks completed successfully.\n\n#### Usage Examples\n```js\nwatch: {\n    css: {\n        files: \"**/*.sass\",\n        tasks: [ \"sass\" ],\n        options: {\n            livereload: true,\n        },\n    },\n},\n```\n\n### The `wp_deploy` task\nSee: [gruntjs/grunt-contrib-imagemin](https://github.com/gruntjs/grunt-contrib-imagemin)\n\n#### Using our configuration\nWe implement the following tasks:\n- `trunk`\n    - The `options.plugin_slug` value is read from the Grunt configuration: `pluginSlug`.\n    - The `options.build_dir` value is set to `artifact`.\n    - The `options.plugin_main_file` value is read from the Grunt configuration: `pluginMainFile`.\n    - The `options.deploy_trunk` value is set to `true`.\n    - The `options.deploy_tag` value is set to `false`.\n    - The `options.max_buffer` value is set to `10000 * 1024` (about 10MB).\n    - The `options.tmp_dir` value is read from the Grunt configuration: `paths.svnCheckoutDir`.\n- `master`\n    - The `options.plugin_slug` value is read from the Grunt configuration: `pluginSlug`.\n    - The `options.build_dir` value is set to `artifact`.\n    - The `options.plugin_main_file` value is read from the Grunt configuration: `pluginMainFile`.\n    - The `options.deploy_trunk` value is set to `true`.\n    - The `options.deploy_tag` value is set to `false`.\n    - The `options.assets_dir` value is read from the Grunt configuration: `paths.assets`.\n    - The `options.max_buffer` value is set to `10000 * 1024` (about 10MB).\n    - The `options.tmp_dir` value is read from the Grunt configuration: `paths.svnCheckoutDir`.\n\n#### Overview\nIn your project's Gruntfile, add a section named `wp_deploy` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    wp_deploy: {\n        your_target: {  // The name of your target.\n            options: {} // Target-specific file lists and/or options.\n        }\n    }\n} )\n```\n\n#### Options\n##### plugin_slug\nType: `String`  \nDefault value: `false`\n\nYour plug-in's slug as indicated by its repository url *https://wordpress.org/plugins/{plugin-slug}*\n\n##### plugin_main_file\nType: `String`  \nDefault value: `false`\n\nUse this option if the name of your plug-in's main file (the PHP file with WordPress plugin headers) differs from the slug name. Pass the full file name with extension, e.g.: *my-plugin.php*\n\n##### svn_user\nType: `String`  \nDefault value: `false`\n\nYour WordPress repository username. If not provided, you'll be prompted for this when the task runs.\n\n##### build_dir\nType: `String`  \nDefault value: `false`\n\nThe directory where the plug-in exists as you want it on the repo.\n\n##### assets_dir\nType: `String`  \nDefault value: `false`\n\nThe directory where the plug-in's assets (i.e. screenshots) exist. This gets copied into the 'assets' directory in the root of your WordPress SVN repo. Typically\nthis directory contains your plug-in's screenshots, which you want uploaded to the WordPress repo, but do not necessary want included in the plug-in distrubted \nto users. For more details see: [https://wordpress.org/plugins/about/faq/](https://wordpress.org/plugins/about/faq/).\n\n##### svn_url\nType: `String`  \nDefault value: `https://plugins.svn.wordpress.org/{plugin-slug}/`\n\nFor flexibilty this plug-in can work with other repos. Simple provide the SVN url, using `{plugin-slug}` as placeholder indicating where the plug-in slug should be.\n\n##### max_buffer\nType: `Integer`  \nDefault value: `200*1024`\n\nSets the maximum buffer for the SVN checkout of the repo. \n\n##### tmp_dir\nType: `String`  \nDefault value: `/tmp/`\n\nLocation where your SVN repository is checked out to. **Note:** Before the the repository is checked out `\u003ctmp_dir\u003e/\u003cplugin_slug\u003e` is deleted.\n\n##### skip_confirmation\nType: `Bool`  \nDefault value: `false`\n\nIf `false`, you will be asked for confirmation before commiting the plug-in to the repository. This will give you the opportunity to inspect the `trunk` in the `options.tmp_dir` to see what is being committed.\n\n##### deploy_trunk\nType: `Bool`  \nDefault value: `true`\n\nWhether to deploy to trunk. This could be set to `false` to only commit the assets directory.\n\n##### deploy_tag\nType: `Bool`  \nDefault value: `true`\n\nWhether to deploy to a tag. You will need to have set to `options.deploy_trunk` to `true`. This can set to `false` to only deploy to trunk (e.g. when only updating the 'Tested up to' value and not deploying a release).\n\n#### Usage Examples\n```js\ngrunt.initConfig( {\n    wp_deploy: {\n        deploy: { \n            options: {\n                plugin_slug: \"your-plugin-slug\",\n                svn_user: \"your-wp-repo-username\",\n                build_dir: \"build\",     // Relative path to your build directory.\n                assets_dir: \"wp-assets\" // Relative path to your assets directory (optional).\n            },\n        }\n    },\n} )\n```\n\n\n### The `update-changelog-with-latest-pr-texts` task\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.useEditDistanceComapair` value is set to `true`.\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    - The `options.commitChangelog` value is set to `true`,\n    - The `useANewLineAfterHeader` value is set to `true`,\n\t- The `defaultChangelogEntries` value is set to `\"\"`,\n\t- The `daysToAddForNextRelease` value is set to `14`,\n    - The `useTodayasReleaseDate` value is set to  `false`,\n    - The `options.addTheseExtraFiles`is set to a empty array [ ],\n\n#### Overview\nIn your project's Gruntfile, add a section named `update-changelog-with-latest-pr-texts` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-changelog-with-latest-pr-texts: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n#### Options\n##### useEditDistanceCompare\nType: `Boolean`  \nDefault: `false`\n\nSetting this to `true` allows the deletion duplicate line items with a Distance Compare value higher than 90.\n\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n\n##### commitChangelog\nType: `Boolean`  \nDefault: `false`\n\nSetting this to `true` will commit the changes made to git.\n\n##### readmeFile\nType: `String`  \nDefault value: null\n\nThe source and destination file to update the changelog section in.\n\n##### releaseInChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchChangelogHeader\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct the header.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### newHeadertemplate\nType: `String`  \nDefault value: null\n\nTemplate used to create a new changelog header.\n\n_Note: Both `VERSIONNUMBER` and `DATESTRING` will be replaced by dynamic values_\n\n##### matchCorrectHeader\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct header in the changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchCorrectLines\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct lines in the changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchCleanedChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to match the cleaned (removed older entries) changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### replaceCleanedChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to replace the cleaned (removed older entries) changelog section with the new.\n\n##### defaultChangelogEntries\nType: `String`  \nDefault value: `\"\"`\n\nOptional value to add default entries to a new created section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### useANewLineAfterHeader\nType: `Boolean`  \nDefault: `true`\n\nSetting this will effect the format of the resulting changelog.\n\n##### daysToAddForNextRelease\nType: `Integer`\nDefault: `14`\n\nSetting this will effect the release date guessing to pick the next tuesday after 7 days before 14 (if default is used).\n\n##### addTheseExtraFiles:\nType: Array if `strings`\nDefault `[]`\n\nSetting this will add that file content (parsed) to the changelog\n\n##### useTodayasReleaseDate:\nType `Boolean`\nDefault: `false`\n\nSetting this will set the release date (if not already set) to today\n\n##### Usages Example\n```js\nupdate-changelog-with-latest-pr-texts: {\n    \"wordpress-seo\": {\n        options: {\n            readmeFile: \"./readme.txt\",\n            releaseInChangelog: /[=] \\d+\\.\\d+(\\.\\d+)? =/g,\n            matchChangelogHeader:  /[=]= Changelog ==\\n\\n/ig,\n            newHeadertemplate: \"== Changelog ==\\n\\n\" +\"= \" + \"VERSIONNUMBER\" + \" =\\nRelease Date: \" + \"DATESTRING\"  + \"\\n\\n\",\n            matchCorrectHeader: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*?\\\\n(?=(\\\\w\\+?:\\\\n|= \\\\d+[\\.\\\\d]+ =|= Earlier versions =))\",\n            matchCorrectLines: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*?(?=(= \\\\d+[\\.\\\\d]+ =|= Earlier versions =))\",\n            matchCleanedChangelog: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*= Earlier versions =\",\n            replaceCleanedChangelog: \"= Earlier versions =\",\n            pluginSlug: \"wordpress-seo\",\n            defaultChangelogEntries: \"\",\n            useANewLineAfterHeader: true,\n            useEditDistanceCompare: true,\n            commitChangelog: false,\n        },\n    },\n}\n```\n\n### The `get-latest-pr-texts` task\nThis is a support task for the `update-changelog-with-latest-pr-texts` task.\n\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    \n#### Overview\nIn your project's Gruntfile, add a section named `get-latest-pr-texts` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-changelog-with-latest-pr-texts: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n##### Usages Example\n```js\nget-latest-pr-texts: {\n    \"wordpress-seo\": {\n        options: {\n            pluginSlug: \"wordpress-seo\",\n        },\n    },\n}\n```\n\n### The `extract-extra-pr-texts-from-yoast-cli-md` task\nThis is a support task for the `update-package-changelog` task.\n\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    - The `options.outputFile` value is set to `\"tmp/extracted.md\"`,\n\t- The `options.deleteOutputFile`value is set to `false`,\n\t- The `options.findThesePackages`value is set to empty array,\n\t- The `options.findTheseAddons`value is set to empty array,\n\t- The `options.outputFolder`value is set to `\"tmp/\"`,\n\n\n#### Overview\nIn your project's Gruntfile, add a section named `extract-extra-pr-texts-from-yoast-cli-md` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-changelog-with-latest-pr-texts: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n##### outputFile\nType: `String`  \nDefault value: `\"tmp/extracted.md\"`\n\nths sets the filename, for items that are left over \n\t\n##### deleteOutputFile\nType: `Boolean`  \nDefault value: `false`\n\nIf set to `true` the outputfile will be deleted (if exists)  during initialize\n\n##### findThesePackages\nType: `Array` of `Array` of two `strings`\nDefault value: `[]` \n\nFind these package items need items need to have this form: [`packageheader to search for`,`filename to add found item`]\n\t\n##### findTheseAddons\nType: `Array`  of `Array` of two `strings`\nDefault value: `[]`\n\nFind these plugin items need items need to have this form:  [`pluginsheader to search for`,`filename to add found item`]\n\n##### outputFolder\nType: `String`  \nDefault value: `\"tmp/\"`\n\n\nHere the files contianing the items will be written to\n\n\n##### Usages Example\n```js\nextract-extra-pr-texts-from-yoast-cli-md: {\n    \"wordpress-seo\": {\n        options: {\n            pluginSlug: \"wordpress-seo\",\n        },\n    },\n}\n```\n\n### The `update-package-changelog` task\nThis is a task.\n\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.useEditDistanceCompare`value is set to `false`\n\t- The `options.commitChangelog`value is set to `false`\n\t- The `options.useANewLineAfterHeader`value is set to `false`\n\t- The `options.addTheseChangeLogs`value is set to `[  ]`\n\n#### Overview\nIn your project's Gruntfile, add a section named `update-package-changelog` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-package-changelog: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n##### useEditDistanceCompare\nType: `Boolean`  \nDefault value: `false`\n\n##### commitChangelog\nType: `Boolean`  \nDefault value: `foalse`\n\n\t\n##### useANewLineAfterHeader\nType: `Boolean`  \nDefault value: `false`\n\nIf set to `true` the outputfile will be deleted (if exists)  during initialize\n\n##### addTheseChangeLogs\nType: `Array`  of `Array` of two `strings`\nDefault value: `[]` \n\nFind these package items need items need to have this form: [`filename to chnagelog where to add`,`filename with items to add`]\n\t\n\n\n##### Usages Example\n```js\nupdate-package-changelog: {\n    \"wordpress-seo\": {\n        options: {\n            pluginSlug: \"wordpress-seo\",\n        },\n    },\n}\n```\n\n\n\n### The `build-qa-changelog` task\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.useEditDistanceComapair` value is set to `false`.\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    - The `options.useANewLineAfterHeader` value is set to `false`.\n\t- The `options.outputFile` is set to `.tmp/QA-Changelog.md`.\n    - The `options.pluginSlug` value is from the Grunt configuration: `pluginSlug`.\n    - The `options.addTheseExtraFiles`is set to a empty array [ ],\n\n#### Overview\nIn your project's Gruntfile, add a section named `build-qa-changelog` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    build-qa-changelog: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n#### Options\n##### useEditDistanceCompare\nType: `Boolean`  \nDefault: `false`\n\nSetting this to `true` allows the deletion of duplicate lines with a Distance Compare value higher than 90.\n\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n##### outputFile\nType: `String`  \nDefault value: `.tmp/QA-Changelog.md`\n\nThe destination file to write the built changelog in.\n\n##### useANewLineAfterHeader\nType: `Boolean`  \nDefault: `false`\n\nSetting this will effect the format of the resulting changelog.\n\n##### addTheseExtraFiles:\nType: `Array` of `strings`\nDefault `[]`\n\nSetting this will add that file content (parsed) to the changelog\n\n##### Usages Example\n```js\nupdate-changelog-with-latest-pr-texts: {\n    \"wordpress-seo\": {\n        options: {\n            readmeFile: \".tmp/QA-Changelog.md\",\n            pluginSlug: \"wordpress-seo\",\n            useANewLineAfterHeader: false,\n            useEditDistanceComapair: false,\n            addTheseExtraFiles: [ ],\n        },\n    },\n}\n```\n\n### The `download-qa-changelog` task\nThis is a support task for the `build-qa-changelog` task.\n\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    \n#### Overview\nIn your project's Gruntfile, add a section named `get-latest-pr-texts` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-changelog-with-latest-pr-texts: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n##### Usages Example\n```js\nget-latest-pr-texts: {\n    \"wordpress-seo\": {\n        options: {\n            pluginSlug: \"wordpress-seo\",\n        },\n    },\n}\n```\n### The `update-changelog-to-latest` task\n#### Using our configuration\nWe implement the following configuration:\n- `options`\n    - The `options.pluginSlug` value is  from the Grunt configuration: `pluginSlug`.\n    - The `options.commitChangelog` value is set to `true`,\n    - The `options.useANewLineAfterHeader` value is set to `true`,\n\t- The `options.defaultChangelogEntries` value is set to `\"\"`,\n\t- The `options.daysToAddForNextRelease` value is set to `14`,\n    - The `options.useTodayasReleaseDate` value is set to  `false`,\n    - The `options.changelogToInject`value is set to  `\"\"`,\n\n#### Overview\nIn your project's Gruntfile, add a section named `update-changelog-to-latest` to the data object passed into `grunt.initConfig()`.\n```js\ngrunt.initConfig( {\n    update-changelog-to-latest: {\n        options: {},     // Global options.\n        taskName: {      // The name of your task.\n            options: {}, // Task-specific options.\n        }\n    }\n} )\n```\n\n#### Options\n##### pluginSlug\nType: `String`  \nDefault value: ``\n\n\n##### commitChangelog\nType: `Boolean`  \nDefault: `false`\n\nSetting this to `true` will commit the changes made to git.\n\n##### readmeFile\nType: `String`  \nDefault value: null\n\nThe source and destination file to update the changelog section in.\n\n##### releaseInChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchChangelogHeader\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct the header.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### newHeadertemplate\nType: `String`  \nDefault value: null\n\nTemplate used to create a new changelog header.\n\n_Note: Both `VERSIONNUMBER` and `DATESTRING` will be replaced by dynamic values_\n\n##### matchCorrectHeader\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct header in the changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchCorrectLines\nType: `String`  \nDefault value: null\n\nRegular expression to match the correct lines in the changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### matchCleanedChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to match the cleaned (removed older entries) changelog section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### replaceCleanedChangelog\nType: `String`  \nDefault value: null\n\nRegular expression to replace the cleaned (removed older entries) changelog section with the new.\n\n##### defaultChangelogEntries\nType: `String`  \nDefault value: `\"\"`\n\nOptional value to add default entries to a new created section.\n\n_Note: `VERSIONNUMBER` will be replaced by a dynamic value_\n\n##### useANewLineAfterHeader\nType: `Boolean`  \nDefault: `true`\n\nSetting this will effect the format of the resulting changelog.\n\n##### daysToAddForNextRelease\nType: `Integer`\nDefault: `14`\n\nSetting this will effect the release date guessing to pick the next tuesday after 7 days before 14 (if default is used).\n\n##### useTodayasReleaseDate:\nType `Boolean`\nDefault: `false`\n\nSetting this will set the release date (if not already set) to today\n\n##### changelogToInject\nType: `String`  \nDefault value: `\"\"`\n\nSetting this will replace the items whith the file content in the changelog\n\n##### Usages Example\n```js\nupdate-changelog-to-latest: {\n    \"wordpress-seo\": {\n        options: {\n            readmeFile: \"./readme.txt\",\n            releaseInChangelog: /[=] \\d+\\.\\d+(\\.\\d+)? =/g,\n            matchChangelogHeader:  /[=]= Changelog ==\\n\\n/ig,\n            newHeadertemplate: \"== Changelog ==\\n\\n\" +\"= \" + \"VERSIONNUMBER\" + \" =\\nRelease Date: \" + \"DATESTRING\"  + \"\\n\\n\",\n            matchCorrectHeader: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*?\\\\n(?=(\\\\w\\+?:\\\\n|= \\\\d+[\\.\\\\d]+ =|= Earlier versions =))\",\n            matchCorrectLines: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*?(?=(= \\\\d+[\\.\\\\d]+ =|= Earlier versions =))\",\n            matchCleanedChangelog: \"= \" + \"VERSIONNUMBER\" + \"(.|\\\\n)*= Earlier versions =\",\n            replaceCleanedChangelog: \"= Earlier versions =\",\n            pluginSlug: \"wordpress-seo\",\n            defaultChangelogEntries: \"\",\n            useANewLineAfterHeader: true,\n            changelogToInject: \".tmp/currentitems.txt\"\n            commitChangelog: false,\n        },\n    },\n}\n```\n\n\n\n## Release History\n\n### 2.5\n- Updates `grunt-contrib-compress` dependency to 2.0.0.\n- Updates `eslint-config-yoast` dependency to 6.0.0.\n\n### 2.4\n- breaking change, the date format used in `update-changelog-to-latest` and `update-changelog-with-latest-pr` is changed from `November 29th, 2022` to `2022-10-29`\n\n### 2.3\n- Adds `update-changelog-to-latest` Grunt task \u0026 config.\n\n### 2.2.1\n- FIXES a issue with `update-changelog-with-latest-pr-texts.js` selecting the todays date on a hotfix. \n\n### 2.2\n- Adds `update-package-changelog` Grunt task \u0026 config.\n- Adds `extract-extra-pr-texts-from-yoast-cli-md` Grunt task \u0026 config.\n- Adds features to `build-qa-changelog` to use more input files\n- Adds features to `update-changelog-with-latest-pr-texts.js` to use more input files\n\n### 2.1.2\n- Fixes a issue with Z cutting of changelog lines\n- Fixes a issue with the install command. Props to [chrisschwartze](ttps://github.com/chrisschwartze).\n\n### 2.1.1\n- fix issue with finding correct yoast-cli option\n\n### 2.1\n- Adds `build-qa-changelog` Grunt task \u0026 config.\n- Adds `download-qa-changelog` Grunt task \u0026 config.\n- Adds `get-latest-pr-texts` Grunt task \u0026 config.\n- Adds `update-changelog-with-latest-pr-texts` Grunt task \u0026 config.\n\n\n### 2.0.0\n- Removes watch configuration for JS \u0026 CSS. From now on plugins need to have their own `watch.js` file.\n- Adds Grunt config file watching.\n- Fixes Config/Shell PHPCS command\n- Excludes Artifact and WordPress SVN checkout from POT file generation to prevent duplicates.\n\n### 1.6.2\n- Bump version of `grunt-contrib-compress` to add node 12 support.\n\n### 1.6.1\n- No longer use `.min` when generating RTL CSS files to be consistent with non-RTL files.\n\n### 1.6\n- Fix the call to `phpcs` to be useful.\n- Breaking change: rename `build` to `build-default`.\n\n### 1.5\n- Makes postcss use the new [Yoast browserslist](https://github.com/Yoast/javascript/tree/develop/packages/browserslist-config) package to determine browsers we support.\n- Update autoprefixer to prevent version clashes with browserslist.\n\n### 1.4.2\n- Fixes a bug where the stable version would not be updated in README.md when running the update-version task.\n\n### 1.4.1\n- Fixes a bug where the initializer regex in the update version config would never match.\n- The update-version task now accepts both strings and regexes in `options.regEx`.\n\n### 1.4.0\n- Add .min as possible extension in rtlcss.\n- Move developmentBuild to grunt configuration.\n\n### 1.3.1\n- Fixes the RTL configuration.\n\n### 1.3.0\n- Adds task configurations.\n- Switches to Yoast `grunt-glotpress` variant.\n- Updates `grunt-sass`.\n- Adds dependency: `node-sass`.\n\n### 1.2.0\n- Updates `grunt-replace`.\n- Adds dependency: `cssnano`.\n\n### 1.1.0\n- Adds grunt dependencies: `grunt`, `grunt-shell`, `grunt-replace`, `load-grunt-config`.\n- Adds grunt contrib dependencies: `grunt-contrib-clean`, `grunt-contrib-compress`, `grunt-contrib-copy`, `grunt-contrib-cssmin`, `grunt-contrib-imagemin`, `grunt-contrib-watch`.\n- Adds linting dependencies: `grunt-phpcs`, `grunt-eslint`.\n- Adds css dependencies: `grunt-postcss`, `autoprefixer`, `grunt-sass`, `grunt-rtlcss`.\n- Adds translations dependencies: `grunt-glotpress`, `grunt-wp-i18n`, `grunt-checktextdomain`.\n- Adds deploy dependencies: `grunt-wp-deploy`, `time-grunt`.\n\n### 1.0.0\n- Initial creation of the plugin.\n- Adds unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoast%2Fplugin-grunt-tasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoast%2Fplugin-grunt-tasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoast%2Fplugin-grunt-tasks/lists"}