Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scoped packages for {N} 3.0 - @nativescript/core instead of tns-core-modules #4041

Closed
@NathanWalker

Description

@NathanWalker

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-modules/ui/page';
import { isIOS, isAndroid } from 'tns-core-modules/platforms';
import { ObservableArray } from 'tns-core-modules/data/observable-array';
  • tns is the command line utility and doesn't have great meaning here (too techy)
  • -core-modules, redundant, yes we know it's a module import and part of core
  • hard to remember paths/directories where classes are (even with auto-import mucks understanding of where things are simply)
  • not consistent with other modern approaches/ideas to bundling
  • too long and dashes are inconvenient to type
  • muddies up class files

I 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.

Updated for clarity

tns-core-modules could then be published as:
@nativescript/core


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions