Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yoast/grunt-plugin-tasks

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yoast/grunt-plugin-tasks

Custom Yoast grunt tasks

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
68
decreased by-24.44%
Maintainers
4
Weekly downloads
 
Created
Source

Grunt-Yoast-tasks

The plugin that contains all custom Yoast tasks

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-yoast-tasks --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks( "grunt-yoast-tasks" );

The 'set-version' task

Overview

In your project's Gruntfile, add a section named yoast_tasks to the data object passed into grunt.initConfig().

grunt.initConfig({
    yoast_tasks: {
        options: {
            // Task-specific options go here.
        },
           your_target: {
            // Target-specific file lists and/or options go here.
        }
    }
});

Options

options.base

Type: String Default value: ''

The JSON file base object for the target to be in.

options.target

Type: String Default value: ''

The child of the options.base object to replace the version string in.

src

Type: String Default value: ''

The source JSON file to set the version in.

Usage Examples

packageJSON: {
	options: {
	    base: "someOrganisation",
	    target: "pluginVersion",
	},
	src: "tmp/testPackage.json",
}

The 'update-version' task

Overview

In your project's Gruntfile, add a section named yoast_tasks to the data object passed into grunt.initConfig().

grunt.initConfig({
  yoast_tasks: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    },
  },
});

Options

options.version

Type: String Default value: ''

The string value that will be the new version string.

options.regex

Type: String Default value: ''

A regex string that is used to find the line to be updated in the file.

options.preVersionMatch

Type: String Default value: ''

A prefix to the version string, for example a regex capture group.

options.postVersionMatch

Type: String Default value: ''

A postfix to the version string, for example a regex capture group.

Usage Example

readme: {
	options: {
	    version: "1.1",
	    regEx: /(Stable tag: )(\d+(\.\d+){0,3})([^\n^\.\d]?.*?)(\n)/,
	    preVersionMatch: "$1",
	    postVersionMatch: "$5"
	},
    src: "tmp/README.md"
}

Release History

1.0.0

  • initial creation of the plugin
  • added unit tests

Keywords

FAQs

Package last updated on 07 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc