{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/352","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/352/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/352/events","html_url":"https://github.com/jspm/jspm-cli/issues/352","id":53318044,"number":352,"title":"override conflicts with npm/browserify usage?","user":{"login":"trusktr","id":297678,"avatar_url":"https://avatars.githubusercontent.com/u/297678?v=3","gravatar_id":"","url":"https://api.github.com/users/trusktr","html_url":"https://github.com/trusktr","followers_url":"https://api.github.com/users/trusktr/followers","following_url":"https://api.github.com/users/trusktr/following{/other_user}","gists_url":"https://api.github.com/users/trusktr/gists{/gist_id}","starred_url":"https://api.github.com/users/trusktr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trusktr/subscriptions","organizations_url":"https://api.github.com/users/trusktr/orgs","repos_url":"https://api.github.com/users/trusktr/repos","events_url":"https://api.github.com/users/trusktr/events{/privacy}","received_events_url":"https://api.github.com/users/trusktr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-03T22:56:26Z","updated_at":"2015-01-04T13:03:15Z","closed_at":"2015-01-04T01:16:22Z","body":"I've come up on a issue. I've been using my npm packages with jspm, so in my package source files I can have something like\r\n\r\n```js\r\nimport Surface from 'famous/core/Surface'\r\n```\r\n\r\nThis works with jspm because in the override I specify \r\n\r\n```\r\n\"directories\": { \"lib\": \"src\" }\r\n```\r\n\r\nso it puts the source files at the root of the package folder, and `famous/core/Surface` works. Now I'm testing my libraries to make sure they are consumable, so first I'm trying with browserify. I install infamous by doing\r\n\r\n```\r\nnpm install infamous --save\r\n```\r\n\r\nwhich results in a simple package.json like\r\n\r\n```json\r\n{\r\n  \"dependencies\": {\r\n    \"infamous\": \"^0.0.10\"\r\n  }\r\n}\r\n```\r\n\r\nthen in a the project's `src/app.js` I have\r\n\r\n```\r\nvar Molecule = require('infamous/dist/Molecule') //  you might foresee the problem here\r\nconsole.log(new Molecule)\r\n```\r\n\r\nNow I use browserify to make a bundle by doing\r\n\r\n```\r\nbrowserify src/app.js -o public/app.js\r\n```\r\n\r\nwhich results in the error\r\n\r\n```\r\nError: Cannot find module 'famous/core/Modifier' from '/Users/josephpea/test/infamous-with-browserify/node_modules/infamous/dist'\r\n```\r\n\r\nand this is because the string `\"famous/core/Modifier\"` refers to a file that doesn't exist. I can temporarily work around it by manually changing the import statements in the source of infamous after installing it.\r\n\r\nAny recommendation on how can we handle this? I like using `\"famous/core/Modifier\"`. I could settle with just changing all the statements to the form `\"famous/src/core/Modifier\"`, but it doesn't look as nice. Is there another way you might know of that wouldn't require changing the import statements?"},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/68632152","html_url":"https://github.com/jspm/jspm-cli/issues/352#issuecomment-68632152","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/352","id":68632152,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T13:03:15Z","updated_at":"2015-01-04T13:03:15Z","body":"That does seem like the best solution for now. Support of browserify transforms in jspm is tracked at https://github.com/jspm/npm/issues/10.\r\n\r\nAlso, did we consider using famous from npm for jspm? If other projects rely on famous, the npm registry may be a better option."}}