{"action":"created","issue":{"url":"https://api.github.com/repos/bendrucker/discuss/issues/7","labels_url":"https://api.github.com/repos/bendrucker/discuss/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/bendrucker/discuss/issues/7/comments","events_url":"https://api.github.com/repos/bendrucker/discuss/issues/7/events","html_url":"https://github.com/bendrucker/discuss/issues/7","id":56215561,"number":7,"title":"Writing a library with browserify","user":{"login":"thaiat","id":4806944,"avatar_url":"https://avatars.githubusercontent.com/u/4806944?v=3","gravatar_id":"","url":"https://api.github.com/users/thaiat","html_url":"https://github.com/thaiat","followers_url":"https://api.github.com/users/thaiat/followers","following_url":"https://api.github.com/users/thaiat/following{/other_user}","gists_url":"https://api.github.com/users/thaiat/gists{/gist_id}","starred_url":"https://api.github.com/users/thaiat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaiat/subscriptions","organizations_url":"https://api.github.com/users/thaiat/orgs","repos_url":"https://api.github.com/users/thaiat/repos","events_url":"https://api.github.com/users/thaiat/events{/privacy}","received_events_url":"https://api.github.com/users/thaiat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-02T09:54:03Z","updated_at":"2015-02-02T17:36:55Z","closed_at":null,"body":"Hi @bendrucker,\r\n\r\nThis post is a continuation of our discussion here: https://github.com/substack/node-browserify/issues/1102\r\n\r\nSo i published to npm this repo: https://github.com/Yoobic/yoobic-angular-core\r\n\r\nWhen i `require('yoobic-angular-core')` in a new project (let's say `app-directive`)  everything works fine.\r\nThen, if i change the browser-shim entry of `package.json` in `yoobic-angular-core` from \"global:angular\" to \"angular\", i get the following error when trying to bundle the consumer package (`app-directive`).\r\n```\r\nBrowserify failed\r\n ENOENT, open '/Users/thaiat/Documents/Dev/app-directive/node_modules/yoobic-angular-core/bower_components/angular/angular.js'\r\n```\r\n\r\nThe `package.json` of the consumer project properly defines a `browser-shim` for angular. I'm trying to figure out how to make browserify understand it should uses the location of angular coming from the consumer package.\r\n\r\nA similar use case, is that my library package uses let's say angular-famous. So in it's code i will do require('famous-angular') with the proper browserify-shim defined in its package.json\r\nThen on the consumer side, i want also to require ('famous-angular'), and i don't want to end up with 2 copies of 'famous-angular'. Also i don't think `famous-angular` can be defined as global.\r\n \r\nLe me know what you think."},"comment":{"url":"https://api.github.com/repos/bendrucker/discuss/issues/comments/72500296","html_url":"https://github.com/bendrucker/discuss/issues/7#issuecomment-72500296","issue_url":"https://api.github.com/repos/bendrucker/discuss/issues/7","id":72500296,"user":{"login":"thaiat","id":4806944,"avatar_url":"https://avatars.githubusercontent.com/u/4806944?v=3","gravatar_id":"","url":"https://api.github.com/users/thaiat","html_url":"https://github.com/thaiat","followers_url":"https://api.github.com/users/thaiat/followers","following_url":"https://api.github.com/users/thaiat/following{/other_user}","gists_url":"https://api.github.com/users/thaiat/gists{/gist_id}","starred_url":"https://api.github.com/users/thaiat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaiat/subscriptions","organizations_url":"https://api.github.com/users/thaiat/orgs","repos_url":"https://api.github.com/users/thaiat/repos","events_url":"https://api.github.com/users/thaiat/events{/privacy}","received_events_url":"https://api.github.com/users/thaiat/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T17:36:55Z","updated_at":"2015-02-02T17:36:55Z","body":"cool, i will prepare for you a clean and simple repo so you can reproduce on your side, thks"}}