Skip to content
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

Feature request: support non-ui plugin types #42

Open
alexziskind1 opened this issue Aug 22, 2017 · 0 comments
Open

Feature request: support non-ui plugin types #42

alexziskind1 opened this issue Aug 22, 2017 · 0 comments
Labels
Milestone

Comments

@alexziskind1
Copy link

While the structure that the plugin seed creates is very handy for plugins that are destined to add some functionality with native libraries, there is no clear path to enhance existing functionality.
For example, let's say I wanted to add a new method to the EXISTING View class, I need a plugin that creates the new method, appends the new method to the existing structure, and adds the necessary typescript definitions.
If I wanted to add a fadeIn method to the existing View class, I need to add this typescript definition:

import { View } from 'tns-core-modules/ui/core/view';

declare module 'tns-core-modules/ui/core/view' {
  interface View {
    fadeIn(duration?: string | number): Promise<void>;
}
}
...

Then I need to add the extra method to the existing View prototype.

import * as viewModule from 'tns-core-modules/ui/core/view';

viewModule.View.prototype.fadeIn = function(duration) {
...
}

So in this case I also don't need the extra platforms/android and platforms/ios folders or the files within.

This is one example of a plugin and would be great if it's supported.

@angeltsvetkov angeltsvetkov added this to the vFuture milestone Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants