{"action":"created","issue":{"url":"https://api.github.com/repos/nstudio/xplat-issues/issues/4","repository_url":"https://api.github.com/repos/nstudio/xplat-issues","labels_url":"https://api.github.com/repos/nstudio/xplat-issues/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/nstudio/xplat-issues/issues/4/comments","events_url":"https://api.github.com/repos/nstudio/xplat-issues/issues/4/events","html_url":"https://github.com/nstudio/xplat-issues/issues/4","id":317162281,"number":4,"title":"Question about Prefix when generating xplat","user":{"login":"emmalivingstone","id":29950128,"avatar_url":"https://avatars1.githubusercontent.com/u/29950128?v=4","gravatar_id":"","url":"https://api.github.com/users/emmalivingstone","html_url":"https://github.com/emmalivingstone","followers_url":"https://api.github.com/users/emmalivingstone/followers","following_url":"https://api.github.com/users/emmalivingstone/following{/other_user}","gists_url":"https://api.github.com/users/emmalivingstone/gists{/gist_id}","starred_url":"https://api.github.com/users/emmalivingstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmalivingstone/subscriptions","organizations_url":"https://api.github.com/users/emmalivingstone/orgs","repos_url":"https://api.github.com/users/emmalivingstone/repos","events_url":"https://api.github.com/users/emmalivingstone/events{/privacy}","received_events_url":"https://api.github.com/users/emmalivingstone/received_events","type":"User","site_admin":false},"labels":[{"id":893259149,"url":"https://api.github.com/repos/nstudio/xplat-issues/labels/question","name":"question","color":"d876e3","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-24T10:20:44Z","updated_at":"2018-04-25T08:48:49Z","closed_at":null,"author_association":"NONE","body":"I noticed when setting up a workspace it doesn't seem to respect the prefix option you pass in the command. If I run:\r\n\r\n`create-nx-workspace new-workspace --npm-scope=test`\r\n`ng g xplat --prefix=test`\r\n\r\nAll my files still use the workspace name ('new-workspace') when importing from the scope, e.g.\r\n\r\n`import { BaseComponent } from '@new-workspace/core/base`\r\n\r\nI've also tried not setting the --npm-scope option in the initial Nx workspace creation, and just setting the --prefix with the xplat generator with the same result. \r\n\r\nNot sure if it's related but I get the same error I was getting on the admin tool issue when I run the xplat generator, even though it completes the rest of the operation:\r\n\r\nIDE Settings could not be updated at this time: { Error: EISDIR: illegal operation on a directory, read\r\n    at Object.fs.readSync (fs.js:675:18)\r\n    at tryReadSync (fs.js:540:20)\r\n    at Object.fs.readFileSync (fs.js:583:19)\r\n    at Object.updateIDESettings\r\n"},"comment":{"url":"https://api.github.com/repos/nstudio/xplat-issues/issues/comments/384211009","html_url":"https://github.com/nstudio/xplat-issues/issues/4#issuecomment-384211009","issue_url":"https://api.github.com/repos/nstudio/xplat-issues/issues/4","id":384211009,"user":{"login":"emmalivingstone","id":29950128,"avatar_url":"https://avatars1.githubusercontent.com/u/29950128?v=4","gravatar_id":"","url":"https://api.github.com/users/emmalivingstone","html_url":"https://github.com/emmalivingstone","followers_url":"https://api.github.com/users/emmalivingstone/followers","following_url":"https://api.github.com/users/emmalivingstone/following{/other_user}","gists_url":"https://api.github.com/users/emmalivingstone/gists{/gist_id}","starred_url":"https://api.github.com/users/emmalivingstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmalivingstone/subscriptions","organizations_url":"https://api.github.com/users/emmalivingstone/orgs","repos_url":"https://api.github.com/users/emmalivingstone/repos","events_url":"https://api.github.com/users/emmalivingstone/events{/privacy}","received_events_url":"https://api.github.com/users/emmalivingstone/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T08:48:49Z","updated_at":"2018-04-25T08:48:49Z","author_association":"NONE","body":"Ah right, I see what you mean for the prefix. But in terms of the barrel name - if you set the Nx workspace up initially using:\r\n`create-nx-workspace another-workspace --npm-scope=test`\r\nWhen you set up xplat afterwards, should the generated files be importing using the workspace directory name ('another-workspace') or the npmScope ('test')? At the moment it uses the workspace directory name but I would have thought it should default to the npmScope if it is provided. \r\n\r\nIt kind of creates a mismatch in the tsconfig.json:\r\n`    \"paths\": {\r\n      \"@test/*\": [\r\n        \"libs/*\"\r\n      ],\r\n      \"@another-workspace/*\": [\r\n        \"libs/*\"\r\n      ],`\r\n\r\nWhereas the Nx workspace without xplat would only have the 'test' path. "}}
{"actor":{"display_login":"emmalivingstone"}}