Skip to content

Instantly share code, notes, and snippets.

@toepoke
Created August 22, 2015 12:46
Show Gist options
  • Save toepoke/4f6b30f1a4ab47129d53 to your computer and use it in GitHub Desktop.
Save toepoke/4f6b30f1a4ab47129d53 to your computer and use it in GitHub Desktop.
module.exports ..... blah {
var target = (grunt.option("target") || "live");
var webConfig = "deployment/" + target + "/website/web.config";
xmlpoke: {
website: {
options{
....
},
files: {
"<%= webConfig %>": "<%= webConfig %>"
... or
webConfig: webConfig
}
}
}
}
@gregorypratt
Copy link

So you want to use the webConfig variable and assign it to a property on the xmlpoke object? But it's not working?

@JasonHewison
Copy link

Try moving the var's outside the object definition?

var target = (grunt.option("target") || "live");
var webConfig = "deployment/" + target + "/website/web.config";

module.exports ..... blah {

xmlpoke: {
website: {
options{
....
},
files: {
"<%= webConfig %>": "<%= webConfig %>"

    ... or 

    webConfig: webConfig
  }
}

}

}

@JasonHewison
Copy link

Why is files an object with key/values that are identical?

Sorry, not really understanding what you are trying to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment