{"action":"closed","issue":{"url":"https://api.github.com/repos/segmentio/metalsmith/issues/87","labels_url":"https://api.github.com/repos/segmentio/metalsmith/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/metalsmith/issues/87/comments","events_url":"https://api.github.com/repos/segmentio/metalsmith/issues/87/events","html_url":"https://github.com/segmentio/metalsmith/issues/87","id":44390636,"number":87,"title":"1.0.0","user":{"login":"ianstormtaylor","id":311752,"avatar_url":"https://avatars.githubusercontent.com/u/311752?v=3","gravatar_id":"","url":"https://api.github.com/users/ianstormtaylor","html_url":"https://github.com/ianstormtaylor","followers_url":"https://api.github.com/users/ianstormtaylor/followers","following_url":"https://api.github.com/users/ianstormtaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianstormtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianstormtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianstormtaylor/subscriptions","organizations_url":"https://api.github.com/users/ianstormtaylor/orgs","repos_url":"https://api.github.com/users/ianstormtaylor/repos","events_url":"https://api.github.com/users/ianstormtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianstormtaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-09-30T04:22:25Z","updated_at":"2015-01-26T00:12:55Z","closed_at":"2015-01-26T00:12:55Z","body":"Hey all, \r\n\r\nJust a heads up to anyone watching this repository, just released `1.0.0` which adds a few features and cleans up some of the existing debt. Feel free to open issues if you encounter unexpected things.\r\n\r\n##### Generators\r\n\r\nAll of the asynchronous methods now have generator support so that the API is nicer to use in node `0.11+`, but still falls back for use in `0.10`. There's a good chance I did this wrong, so if you see anything dumb let me know.\r\n\r\n```js\r\nyield metalsmith.build();\r\n```\r\n\r\n##### Granular Writes/Reads\r\n\r\nAdded `#readFile` and `#writeFile` methods, to keep the logic smaller and nicely expose smaller pieces of logic in case people are looking to override things for really complex use cases. This combined with the generator support has made the source code a lot simpler to read through (as long as you're familiar with `yield`).\r\n\r\n```js\r\nmetalsmith.readFile = function(path){\r\n  // your custom reading logic...\r\n}\r\n```\r\n\r\n##### Synchronous Plugins\r\n\r\nBy upgrading `ware` to `1.0.0` we now have support for synchronous plugin functions, so you can give them a signature of `plugin(files)` instead of `plugin(files, metalsmith, done)` which is much nicer. This also means that basic object utilities (functions that just mutate an object as the first parameter) can be used straight on the files object.\r\n\r\n```js\r\nfunction plugin(files){\r\n  files['index.md'] = { contents: new Buffer('#yay') };\r\n}\r\n```\r\n\r\n##### Breaking Changes\r\n\r\nThere are also a few breaking changes to the API, that would only have been used in edge cases:\r\n\r\n  - `#join` is now `#path` for clarity since it uses `path.resolve` instead of `path.join`.\r\n  - `.dir` is now a `#directory` getter/setter\r\n  - `.data` is now `._metadata`, but this never should have been depended on\r\n  - `._src` is now `._source` for consistency\r\n  - `._dest` is now `._destination` for consistency\r\n  - `clean` defaults to `true` now from the CLI, like it always should have for consistency\r\n  - a `directory` must be passed to the constructor, like it always should have\r\n  - `#clean` and `#frontmatter` now coerce to booleans, like they always should have\r\n\r\n"}}