I have a simple Gruntfile written in Coffeescript:
"use strict"
module.exports = (grunt) ->
config =
src: "app"
dist: "build"
grunt.initConfig =
config: config
copy:
dist:
files: [
expand: true
cwd: "<%= config.app %>"
dest: "<%= config.dist %>"
src: [
"*.{ico,png}"
"{*/}*.html"
]
]
grunt.loadNpmTasks "grunt-contrib-copy"
grunt.registerTask "build", [
"copy:dist"
]
grunt.registerTask "default", [
"build"
]
Which throws the following error when run:
Verifying property copy.dist exists in config...ERROR
>> Unable to process task.
Warning: Required config property "copy.dist" missing. Use --force to continue.
What is this referring too? It seems like copy.dist is present, so why is it not being read?
Also, I assume this is a Coffeescript formatting issue because the equivalent Gruntfile written in Javascript doesn't throw this issue:
"use strict";
module.exports = function (grunt) {
// Configurable paths
var config = {
scr: "app",
dist: "build"
}
grunt.initConfig({
// Project settings
config: config,
copy: {
dist: {
files: [{
expand: true,
cwd: "<%= config.app %>",
dest: "<%= config.dist %>",
src: [
"*.{ico,png}",
"{*/}*.html"
]
}]
}
}
});
// Install plugins
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.registerTask("build", [
"copy:dist"
]);
grunt.registerTask("default", [
"build"
]);
};