Just store the pkg in a variable:
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
pkg: pkg,
copy: {
iisDeploy: {
options: {
process: function (content, srcpath) {
return content.replace("pre-release", "v" + pkg.version);
}
},
files: [
{ expand: true, cwd: 'build/pre-release/', src: '**', dest: '/location/v<%= pkg.version %>/' }
]
}
})
}