{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/1345","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1345/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1345/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1345/events","html_url":"https://github.com/jspm/jspm-cli/issues/1345","id":120867826,"number":1345,"title":"Jspm config and wrong packages path ","user":{"login":"Nipher","id":7523828,"avatar_url":"https://avatars.githubusercontent.com/u/7523828?v=3","gravatar_id":"","url":"https://api.github.com/users/Nipher","html_url":"https://github.com/Nipher","followers_url":"https://api.github.com/users/Nipher/followers","following_url":"https://api.github.com/users/Nipher/following{/other_user}","gists_url":"https://api.github.com/users/Nipher/gists{/gist_id}","starred_url":"https://api.github.com/users/Nipher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nipher/subscriptions","organizations_url":"https://api.github.com/users/Nipher/orgs","repos_url":"https://api.github.com/users/Nipher/repos","events_url":"https://api.github.com/users/Nipher/events{/privacy}","received_events_url":"https://api.github.com/users/Nipher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T21:07:02Z","updated_at":"2015-12-08T11:59:56Z","closed_at":null,"body":"Hey everyone!\r\nThank you all for this amazing project.\r\n\r\nI'm having some troubles, hope you guys can help me.\r\n\r\nfolder structure:\r\n```\r\nmy-app/\r\n|── package.json\r\n|── node_modules\r\n|── client\r\n    |── assets                      \r\n        |── jspm_packages\r\n        |── jspm_config.js               # jspm config file \r\n```\r\n\r\npackage.json\r\n```json\r\n\"jspm\": {\r\n    \"directories\": {\r\n      \"packages\": \"client/assets/jspm_packages\"\r\n    },\r\n    \"configFile\": \"client/assets/jspm_config.js\",\r\n    \"dependencies\": {\r\n      \"systemjs/plugin-json\": \"github:systemjs/plugin-json@^0.1.0\"\r\n    },\r\n    \"devDependencies\": {\r\n      \"core-js\": \"npm:core-js@^1.1.4\"\r\n    }\r\n  }\r\n```\r\n\r\njspm_config.js\r\n```javascript\r\nSystem.config({\r\n  baseURL: \"../\",\r\n  defaultJSExtensions: true,\r\n  transpiler: \"babel\",\r\n  babelOptions: {\r\n    \"optional\": [\r\n      \"runtime\",\r\n      \"optimisation.modules.system\"\r\n    ]\r\n  },\r\n  paths: {\r\n    \"github:*\": \"client/assets/jspm_packages/github/*\",\r\n    \"npm:*\": \"client/assets/jspm_packages/npm/*\"\r\n  },\r\n\r\n  meta: { // meta config\r\n  },\r\n\r\n  map: { // maps\r\n  }\r\n});\r\n```\r\n\r\n\r\nThe problem is, when I run jspm install, It sets the path beginning with client on jspm_config file.\r\n```javascript\r\npaths: {\r\n    \"github:*\": \"client/assets/jspm_packages/github/*\",\r\n    \"npm:*\": \"client/assets/jspm_packages/npm/*\"\r\n  },\r\n```\r\nMy web server is serving the client folder, so when systemjs tries to load the packages, it sets the http request to a wrong url.\r\nlike this `http://localhost:3000/client/assets/jspm_packages/ ...`\r\nbut what I need is `http://localhost:3000/assets/jspm_packages/ ...`\r\n\r\nSo, I'm able to fix this by changing manually the jspm_config file after each `jspm install`, everytime.\r\n\r\njspm version: `^0.16.15`\r\n\r\nI'm confused about this, can you guys help me?\r\nThanks :)"},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/162861317","html_url":"https://github.com/jspm/jspm-cli/issues/1345#issuecomment-162861317","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1345","id":162861317,"user":{"login":"rafagomes","id":565337,"avatar_url":"https://avatars.githubusercontent.com/u/565337?v=3","gravatar_id":"","url":"https://api.github.com/users/rafagomes","html_url":"https://github.com/rafagomes","followers_url":"https://api.github.com/users/rafagomes/followers","following_url":"https://api.github.com/users/rafagomes/following{/other_user}","gists_url":"https://api.github.com/users/rafagomes/gists{/gist_id}","starred_url":"https://api.github.com/users/rafagomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafagomes/subscriptions","organizations_url":"https://api.github.com/users/rafagomes/orgs","repos_url":"https://api.github.com/users/rafagomes/repos","events_url":"https://api.github.com/users/rafagomes/events{/privacy}","received_events_url":"https://api.github.com/users/rafagomes/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T11:59:55Z","updated_at":"2015-12-08T11:59:55Z","body":"What you guys think about add an option to use jspm-config to be the base path for jspm packages? Like:\r\n\r\n```\r\n\"jspm\": {\r\n    \"directories\": {\r\n      \"packages\": \"jspm_packages\"  //change to relative path\r\n    },\r\n    \"configFile\": \"client/assets/jspm_config.js\",\r\n    \"jspm_config_as_base_path\": true,\r\n    \"dependencies\": {\r\n      \"systemjs/plugin-json\": \"github:systemjs/plugin-json@^0.1.0\"\r\n    },\r\n    \"devDependencies\": {\r\n      \"core-js\": \"npm:core-js@^1.1.4\"\r\n    }\r\n  }\r\n```"}}