{"action":"opened","issue":{"url":"https://api.github.com/repos/mathiasbynens/grunt-template/issues/9","labels_url":"https://api.github.com/repos/mathiasbynens/grunt-template/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/mathiasbynens/grunt-template/issues/9/comments","events_url":"https://api.github.com/repos/mathiasbynens/grunt-template/issues/9/events","html_url":"https://github.com/mathiasbynens/grunt-template/issues/9","id":92703630,"number":9,"title":"Task vs. Target specific options [looks doesn't work]","user":{"login":"alundiak","id":2131633,"avatar_url":"https://avatars.githubusercontent.com/u/2131633?v=3","gravatar_id":"","url":"https://api.github.com/users/alundiak","html_url":"https://github.com/alundiak","followers_url":"https://api.github.com/users/alundiak/followers","following_url":"https://api.github.com/users/alundiak/following{/other_user}","gists_url":"https://api.github.com/users/alundiak/gists{/gist_id}","starred_url":"https://api.github.com/users/alundiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alundiak/subscriptions","organizations_url":"https://api.github.com/users/alundiak/orgs","repos_url":"https://api.github.com/users/alundiak/repos","events_url":"https://api.github.com/users/alundiak/events{/privacy}","received_events_url":"https://api.github.com/users/alundiak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-02T18:37:36Z","updated_at":"2015-07-02T18:37:36Z","closed_at":null,"body":"This config works fine:\r\n```\r\ntemplate: {\r\n      options: {\r\n        data: {\r\n          componentID: componentID,\r\n          componentName: componentName,\r\n          componentCapitalized: componentCapitalized,\r\n          componentUnderscored: componentUnderscored\r\n        }\r\n      },\r\n      'README.md' : {\r\n        files: {\r\n          'README.md': [ 'README.md.tpl']\r\n        }\r\n      },\r\n      'docs/README.md' : {\r\n        files: {\r\n          'docs/README.md': [ 'README.md.tpl']\r\n        }\r\n      }\r\n    }\r\n```\r\nOr this silly config, also work:\r\n\r\n```\r\ntemplate: {\r\n      'README.md' : {\r\n        options: {\r\n          data: {\r\n          componentID: componentID,\r\n          componentName: componentName,\r\n          componentCapitalized: componentCapitalized,\r\n          componentUnderscored: componentUnderscored,\r\n            docsDir: 'docs',\r\n            mainPage: true\r\n          }\r\n        },\r\n        files: {\r\n          'README.md': [ 'README.md.tpl']\r\n        }\r\n      },\r\n      'docs/README.md' : {\r\n        options: {\r\n          data: {\r\n          componentID: componentID,\r\n          componentName: componentName,\r\n          componentCapitalized: componentCapitalized,\r\n          componentUnderscored: componentUnderscored,\r\n            docsDir: '.',\r\n            mainPage: false\r\n          }\r\n        },\r\n        files: {\r\n          'docs/README.md': [ 'README.md.tpl']\r\n        }\r\n      }\r\n    }\r\n```\r\n\r\n\r\n**But this doesn't work**:\r\n```\r\ntemplate: {\r\n      options: {\r\n        data: {\r\n          componentID: componentID,\r\n          componentName: componentName,\r\n          componentCapitalized: componentCapitalized,\r\n          componentUnderscored: componentUnderscored\r\n        }\r\n      },\r\n      'README.md' : {\r\n        options: {\r\n          data: {\r\n            docsDir: 'docs',\r\n            mainPage: true\r\n          }\r\n        },\r\n        files: {\r\n          'README.md': [ 'README.md.tpl']\r\n        }\r\n      },\r\n      'docs/README.md' : {\r\n        options: {\r\n          data: {\r\n            docsDir: '.',\r\n            mainPage: false\r\n          }\r\n        },\r\n        files: {\r\n          'docs/README.md': [ 'README.md.tpl']\r\n        }\r\n      }\r\n    }\r\n```\r\n\r\nSo as you see, I want to extract common options from target levelto task level, and leave target options ability to override task options.  **Is is this expected order of overriding in grunt options at all?**\r\n\r\nI run simply: `grunt template` and it gives me:\r\n```\r\n$ grunt template\r\nRunning \"template:README.md\" (template) task\r\nWarning: An error occurred while processing a template (componentName is not def\r\nined). Use --force to continue.\r\n```\r\nor similar ...\r\nSimply, **target options override task options, and they just disappear**. \r\n\r\nOr Am I mistaken somewhere?\r\n\r\nShould I play with  grunt.registerTask() vs.  grunt.registerMultitaskTask()  ?"}}