Title: Scoped packages for {N} 3.0 - @nativescript/core instead of tns-core-modules · Issue #4041 · NativeScript/NativeScript · GitHub
Open Graph Title: Scoped packages for {N} 3.0 - @nativescript/core instead of tns-core-modules · Issue #4041 · NativeScript/NativeScript
X Title: Scoped packages for {N} 3.0 - @nativescript/core instead of tns-core-modules · Issue #4041 · NativeScript/NativeScript
Description: If possible, this would be nice: import { Page, ObservableArray, isIOS, isAndroid } from '@nativescript/core'; I believe it would make for a clear and consistent approach to bundling and usage. Cons to: import { Page } from 'tns-core-mod...
Open Graph Description: If possible, this would be nice: import { Page, ObservableArray, isIOS, isAndroid } from '@nativescript/core'; I believe it would make for a clear and consistent approach to bundling and usage. Con...
X Description: If possible, this would be nice: import { Page, ObservableArray, isIOS, isAndroid } from '@nativescript/core'; I believe it would make for a clear and consistent approach to bundling and us...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/4041
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Scoped packages for {N} 3.0 - @nativescript/core instead of tns-core-modules","articleBody":"If possible, this would be nice:\r\n\r\n```\r\nimport { Page, ObservableArray, isIOS, isAndroid } from '@nativescript/core';\r\n```\r\n\r\nI believe it would make for a clear and consistent approach to bundling and usage.\r\n\r\nCons to:\r\n\r\n```\r\nimport { Page } from 'tns-core-modules/ui/page';\r\nimport { isIOS, isAndroid } from 'tns-core-modules/platforms';\r\nimport { ObservableArray } from 'tns-core-modules/data/observable-array';\r\n```\r\n\r\n* `tns` is the command line utility and doesn't have great meaning here (too techy)\r\n* `-core-modules`, redundant, yes we know it's a module import and part of core\r\n* hard to remember paths/directories where classes are (even with auto-import mucks understanding of where things are simply)\r\n* not consistent with other modern approaches/ideas to bundling\r\n* too long and dashes are inconvenient to type\r\n* muddies up class files\r\n\r\nI know 3.0 is close but organizing into a scoped package may not be troublesome to do and would be appreciated if considered since it appears there is already an attempt to scope the packages. If scoping is going to happen, please consider the above before going through 2 iterations of scoped naming.\r\n\r\n### Updated for clarity\r\n\r\ntns-core-modules could then be published as:\r\n**@nativescript/core**\r\n\r\n\u003cbountysource-plugin\u003e\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/44386019-scoped-packages-for-n-3-0-nativescript-core-instead-of-tns-core-modules?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github).\r\n\u003c/bountysource-plugin\u003e","author":{"url":"https://github.com/NathanWalker","@type":"Person","name":"NathanWalker"},"datePublished":"2017-04-21T15:32:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":23},"url":"https://github.com/4041/NativeScript/issues/4041"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d4d6e23e-8f5d-a98c-413c-2533a9253b9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB06:1A10D7:19B0E75:226E244:69798700 |
| html-safe-nonce | 122422d498c7ead79b95f247a1446eef3b3a79f148571d6865ef6257016b8592 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjA2OjFBMTBENzoxOUIwRTc1OjIyNkUyNDQ6Njk3OTg3MDAiLCJ2aXNpdG9yX2lkIjoiNzEyMjEzNjY1NDMwMjI1MDc1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f20c7608c4d89f5dc17daa1b514618300715a5662f3e1e6fdc4e2c1872839dc6 |
| hovercard-subject-tag | issue:223419169 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/4041/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16465e7a36cd523ab83751f55b040a6e0f21ef0d9b63c2a83485acc056e33443/NativeScript/NativeScript/issues/4041 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16465e7a36cd523ab83751f55b040a6e0f21ef0d9b63c2a83485acc056e33443/NativeScript/NativeScript/issues/4041 |
| og:image:alt | If possible, this would be nice: import { Page, ObservableArray, isIOS, isAndroid } from '@nativescript/core'; I believe it would make for a clear and consistent approach to bundling and usage. Con... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NathanWalker |
| hostname | github.com |
| expected-hostname | github.com |
| None | c049b65ec7e54cbf2521f5a560b6527714c612b0bd169188e2ea6e16f83bd5f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 87b137883e35e2766c3d0f6a257c4044f6390b83 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width