{"action":"created","issue":{"url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/140","labels_url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/140/comments","events_url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/140/events","html_url":"https://github.com/JSRocksHQ/harmonic/issues/140","id":69002470,"number":140,"title":"Proposal for plugin architecture","user":{"login":"soapdog","id":23247,"avatar_url":"https://avatars.githubusercontent.com/u/23247?v=3","gravatar_id":"","url":"https://api.github.com/users/soapdog","html_url":"https://github.com/soapdog","followers_url":"https://api.github.com/users/soapdog/followers","following_url":"https://api.github.com/users/soapdog/following{/other_user}","gists_url":"https://api.github.com/users/soapdog/gists{/gist_id}","starred_url":"https://api.github.com/users/soapdog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soapdog/subscriptions","organizations_url":"https://api.github.com/users/soapdog/orgs","repos_url":"https://api.github.com/users/soapdog/repos","events_url":"https://api.github.com/users/soapdog/events{/privacy}","received_events_url":"https://api.github.com/users/soapdog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-04-16T20:23:20Z","updated_at":"2015-05-08T04:38:03Z","closed_at":null,"body":"Hi Friends,\r\n\r\nI have an idea on how to implement plugins for Harmonic that is very lightweight and requires minimal coding. If this idea is accepted then we'd be able to extend harmonic without touch harmonic itself.\r\n\r\nAll harmonic plugins would be normal node modules that would be installed with npm. These modules would follow a naming convention such as ```harmonic-plugin-*```. The configuration for each plugin would reside in ```harmonic.json``` like:\r\n\r\n~~~~~~~\r\n{\r\n    \"name\": \"AndreGarzia.com\",\r\n    \"title\": \"All We Do Is Code\",\r\n    \"domain\": \"http://awesome.com\",\r\n    \"bio\": \"I work for the web\",\r\n    \"plugins\": {\r\n      \"deploy-gihub\": {\r\n        \"repo\": \"soapdog/site\",\r\n        \"branch\": \"gh-pages\"\r\n      }\r\n    }\r\n}\r\n~~~~~~~~ \r\n\r\nIn the case above there would be a node module named ```harmonic-plugin-deploy-github``` installed on the site. Harmonic would read ```harmonic.json```, find the plugin key and load all necessary modules on start. We'd use a publisher/subscriber like pattern where upon loading each plugin could subscribe to a given message. As harmonic workflow cycled it would dispatch the messages like *preBuild*, *prePageGeneration*, *postPageGeneration*, *prePostGeneration*, *postPostGeneration*, *preCopyResources*, *postCopyResources*, *postBuild* and so on.\r\n\r\nModules could be built with ES6 or any other technology needed as long as they register their interest in some messages upon loading.\r\n\r\nWhat do you folks think?"},"comment":{"url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/comments/100098521","html_url":"https://github.com/JSRocksHQ/harmonic/issues/140#issuecomment-100098521","issue_url":"https://api.github.com/repos/JSRocksHQ/harmonic/issues/140","id":100098521,"user":{"login":"jaydson","id":72206,"avatar_url":"https://avatars.githubusercontent.com/u/72206?v=3","gravatar_id":"","url":"https://api.github.com/users/jaydson","html_url":"https://github.com/jaydson","followers_url":"https://api.github.com/users/jaydson/followers","following_url":"https://api.github.com/users/jaydson/following{/other_user}","gists_url":"https://api.github.com/users/jaydson/gists{/gist_id}","starred_url":"https://api.github.com/users/jaydson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaydson/subscriptions","organizations_url":"https://api.github.com/users/jaydson/orgs","repos_url":"https://api.github.com/users/jaydson/repos","events_url":"https://api.github.com/users/jaydson/events{/privacy}","received_events_url":"https://api.github.com/users/jaydson/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T04:38:03Z","updated_at":"2015-05-08T04:38:03Z","body":"@soapdog any progress on the plugin stuff?\r\nIf so, i want to help build it."}}