{"action":"created","issue":{"url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/8","labels_url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/8/comments","events_url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/8/events","html_url":"https://github.com/tomfulton/grunt-umbraco-package/pull/8","id":103934765,"number":8,"title":"Added support for automatically generating the manifest (+some other stuff)","user":{"login":"abjerner","id":3634580,"avatar_url":"https://avatars.githubusercontent.com/u/3634580?v=3","gravatar_id":"","url":"https://api.github.com/users/abjerner","html_url":"https://github.com/abjerner","followers_url":"https://api.github.com/users/abjerner/followers","following_url":"https://api.github.com/users/abjerner/following{/other_user}","gists_url":"https://api.github.com/users/abjerner/gists{/gist_id}","starred_url":"https://api.github.com/users/abjerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abjerner/subscriptions","organizations_url":"https://api.github.com/users/abjerner/orgs","repos_url":"https://api.github.com/users/abjerner/repos","events_url":"https://api.github.com/users/abjerner/events{/privacy}","received_events_url":"https://api.github.com/users/abjerner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-30T17:10:22Z","updated_at":"2015-10-07T19:10:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/pulls/8","html_url":"https://github.com/tomfulton/grunt-umbraco-package/pull/8","diff_url":"https://github.com/tomfulton/grunt-umbraco-package/pull/8.diff","patch_url":"https://github.com/tomfulton/grunt-umbraco-package/pull/8.patch"},"body":"Hi Tom,\r\n\r\nAs a follow up to #7, I have now committed a bunch of changes:\r\n\r\n1. Specifying a manifest is now optional. If specified, the task will now give the same result as before, and work with the Grunt template transformations that you described in #7.<br /><br />When not specifying a manifest, the task will now automatically generate the manifest based on the task configuration. The manifest is generated using `js2xmlparser` which now has been added as a dependency.\r\n\r\n1. The documentation for `v0.0.6` says that `readme` is optional, but the task still requires a value to be entered. With this pull request, it is now optional. If specified together with `manifest`, `readme` is the path to a text file with the readme value. If `manifest` is not specified, `readme` is the string value representing the readme.\r\n\r\n2. I have introduced a new config option called `outputName`. If specified, this will determine the name of the generated ZIP archive. If not specified, it will just be `{name}_{version}.zip` as before.\r\n\r\n3. The existing code will create a temp directory in `sourceDir`, but not remove the directory after the task has completed, which quickly would create a mess if not manually removing the temp directory after each run. I have now updated the code not create a temp folder at all.\r\n\r\n4. With the existing code, new files would just be appended to the ZIP file if one with the same name already existed. The task will now automatically start with deleting the ZIP file if it already exists.\r\n\r\n5. When creating a new package via the Umbraco backoffice, files in the ZIP archive are not always named `{guid}.{ext}`. Files are typically be named `{name}.{ext}`, or if multiple files have the same name, additional files will be named `{guid}_{name}.{ext}`."},"comment":{"url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/comments/146298359","html_url":"https://github.com/tomfulton/grunt-umbraco-package/pull/8#issuecomment-146298359","issue_url":"https://api.github.com/repos/tomfulton/grunt-umbraco-package/issues/8","id":146298359,"user":{"login":"abjerner","id":3634580,"avatar_url":"https://avatars.githubusercontent.com/u/3634580?v=3","gravatar_id":"","url":"https://api.github.com/users/abjerner","html_url":"https://github.com/abjerner","followers_url":"https://api.github.com/users/abjerner/followers","following_url":"https://api.github.com/users/abjerner/following{/other_user}","gists_url":"https://api.github.com/users/abjerner/gists{/gist_id}","starred_url":"https://api.github.com/users/abjerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abjerner/subscriptions","organizations_url":"https://api.github.com/users/abjerner/orgs","repos_url":"https://api.github.com/users/abjerner/repos","events_url":"https://api.github.com/users/abjerner/events{/privacy}","received_events_url":"https://api.github.com/users/abjerner/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T19:10:43Z","updated_at":"2015-10-07T19:10:43Z","body":"#### Readme\r\nGrunt offers good possibilities to read files, so I personally I think being able to specify a string is sufficient. As an example, for one of my packages I have defined the readme as part of `package.json`, and then read the JSON from `Gruntfile.js`:\r\n\r\nhttps://github.com/skybrud/Skybrud.Umbraco.GridData/blob/master/package.json\r\nhttps://github.com/skybrud/Skybrud.Umbraco.GridData/blob/master/Gruntfile.js#L6\r\n\r\nWith the readme defined in `package.json`, one could use it for something else as well.\r\n\r\n#### Manifest\r\nI haven't seen the double extensions before, and it shouldn't happen - so it is a bug. Adding an option for whether file names should just be GUIDs and the extension, or a combination of the GUID, filename and extension would make sense. I will look into fixing the bug and possibly adding the option, and then update the pull request ;)"}}