Skip to content

Rewrite all tns-core-modules short imports #1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sis0k0 opened this issue Oct 2, 2018 · 1 comment · Fixed by #1550
Closed

Rewrite all tns-core-modules short imports #1535

sis0k0 opened this issue Oct 2, 2018 · 1 comment · Fixed by #1550
Assignees

Comments

@sis0k0
Copy link
Contributor

sis0k0 commented Oct 2, 2018

Problem

There are short imports in the source code of nativescript-angular. They should be removed, because they may be deprecated in later versions of the framework.
A short definition of short import:

An import that is shortened from tns-core-modules/something to something.

Example of short import:

import { device } from "platform";

The above code should be rewritten to:

import { device } from "tns-core-modules/platform"; 

Note 1

All valid short-imports are the files and directories that are on the root level of the tns-core-modules package - https://github.com/NativeScript/NativeScript/tree/master/tns-core-modules. Here's a (not exhaustive) list:

  • application-settings
  • application
  • color
  • connectivity
  • ...

Note 2

The nativescript-angular plugin is written in TypeScript. A nice solution would be to parse the source files, then find and replace all AST nodes that contain short imports.

@sis0k0
Copy link
Contributor Author

sis0k0 commented Jul 28, 2019

resolved with #1559

@sis0k0 sis0k0 closed this as completed Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant