Skip to content

Using grunt.config to access JSON object #542

@johnruane

Description

@johnruane

Can anyone help me access a JSON object using the grunt.config command?

The filepath i want to replace on my 'watch' event is formatted as so:

render: {
  files: [{
    expand: true,
    src: "**/*.nunjucks",
    dest: "build/",
    ext: ".html"
  }]
}

I have tried every combination to access the 'src' property but none work. The documentation only gives the following format as an example: grunt.config('render.files.src', filepath);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions