{"action":"created","issue":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/649","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/649/labels{/name}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/649/comments","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/649/events","html_url":"https://github.com/IMA-WorldHealth/bhima/pull/649","id":103713352,"number":649,"title":"Build client + server to /bin with gulp","user":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/labels/requires%20npm%20install","name":"requires npm install","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T12:47:57Z","updated_at":"2015-08-28T12:58:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/pulls/649","html_url":"https://github.com/IMA-WorldHealth/bhima/pull/649","diff_url":"https://github.com/IMA-WorldHealth/bhima/pull/649.diff","patch_url":"https://github.com/IMA-WorldHealth/bhima/pull/649.patch"},"body":"This PR introduces lots of breaking changes to the application.  In short, it breaks everything.\r\n\r\n### Building\r\nThe gulp file has been completely rewritten and moved to the top of the directory hierarchy.  This allow gulp to build both the client and the server from the same location.  The gulp output folder is now `/bin`, which creates subfolders `/client`, `/server`, and `/plugins`.   \r\n\r\n**NOTE** The `/plugins/` folder is deprecated and here for compatibility purposes.  It will be removed once we complete plugin migration to individual git repositories, and `pluginManager.js` will reside in `server/lib/pluginManager.js`.\r\n\r\nThe gulp methods have changed to `gulp build-server` (copies server into `/bin/server`) and `gulp build-client`, which runs a large number of tasks to ultimately copy the client into `/bin/client`.  `gulp build` runs both client and server.\r\n\r\n### What does this mean to run the application?\r\nIt's quite simple.  Just do this:\r\n```sh\r\ngulp build\r\ncd bin\r\nnode server/app.js\r\n```\r\n\r\n### Why was this necessary?\r\nThe specific application was e2e tests locally.  By unifying the builds we can also unify the tests and allow use to spin up unit tests for the client and server, and e2e tests.\r\n\r\n### What else changed?\r\n - We now concat  `app.js` into `bhima.min.js`.  Our index.html only loads one app file now!\r\n - `index.html` refers to items as `vendor/` instead of `lib/`.  It makes more sense.\r\n - Gulp tasks clean their targets using [del](https://www.npmjs.com/package/del) before writing to the target.\r\n - Lots of things got deleted.  We will miss them, but they were no longer useful."},"comment":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/comments/135767781","html_url":"https://github.com/IMA-WorldHealth/bhima/pull/649#issuecomment-135767781","issue_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/649","id":135767781,"user":{"login":"DedrickEnc","id":5418919,"avatar_url":"https://avatars.githubusercontent.com/u/5418919?v=3","gravatar_id":"","url":"https://api.github.com/users/DedrickEnc","html_url":"https://github.com/DedrickEnc","followers_url":"https://api.github.com/users/DedrickEnc/followers","following_url":"https://api.github.com/users/DedrickEnc/following{/other_user}","gists_url":"https://api.github.com/users/DedrickEnc/gists{/gist_id}","starred_url":"https://api.github.com/users/DedrickEnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DedrickEnc/subscriptions","organizations_url":"https://api.github.com/users/DedrickEnc/orgs","repos_url":"https://api.github.com/users/DedrickEnc/repos","events_url":"https://api.github.com/users/DedrickEnc/events{/privacy}","received_events_url":"https://api.github.com/users/DedrickEnc/received_events","type":"User","site_admin":false},"created_at":"2015-08-28T12:58:03Z","updated_at":"2015-08-28T12:58:03Z","body":"You are right, got it!"}}