npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nativescript-ng2-plugin-seed

v1.0.0

Published

Your awesome NativeScript + Angular plugin.

Downloads

5

Readme

Develop a nativescript-angular plugin now

Angular 2 Style Guide MIT license Dependency Status

| Demo | | :---: | | Android and iPhone running the same {N} + Angular2 plugin. |

The seed is setup to allow you to create a nativescript-angular plugin quickly.

  • Sample demo app ready for you to try out your plugin as you develop it.
  • Sample Component, Directive, Pipe and Service created for you (tests coming soon) to get started right away.
  • Customize whichever is helpful to your plugin and remove the others.

Get started

  1. Download a zip of this seed.
  2. cd ... path/to/unzip/folder ...
  3. npm install -g typescript
  4. npm install -g nativescript
  5. npm install
  6. npm run setup
  7. Get to work.

Changes needed

You will want to change a couple things for your plugin.

  1. Replace all instances of nativescript-ng2-yourplugin with name of your plugin:
  • Here: https://github.com/NathanWalker/nativescript-ng2-plugin-seed/blob/master/package.json
  • Here: https://github.com/NathanWalker/nativescript-ng2-plugin-seed/blob/master/src/package.json#L16
  • Here: https://github.com/NathanWalker/nativescript-ng2-plugin-seed/blob/master/tsconfig.json#L14 (And likely modify more to tailor to your specific plugins typescript definition needs)
  1. Modify the demo to import your plugin files, etc: https://github.com/NathanWalker/nativescript-ng2-plugin-seed/blob/master/src/app/app.ts#L10-L15

Develop Workflow

Make changes to plugin files, then:

npm run demo.ios

// or...

npm run demo.android

Build Plugin

You'll want to run this before publishing.

npm run build

VERY IMPORTANT: You need to modify package.json for your plugin. Most likely, you will want to remove 3 sections completely: scripts, dependencies, and devDependencies as those are setup for the demo. When publishing, it's important to ensure no unnecessary scripts or dependencies are installed when comsumers use your plugin. You can add those sections back after publishing.

Testing

Work in progress. Coming soon.

npm test

Troubleshooting

When preparing your demo if you get the following error message:

Plugin "nativescript-ng2-yourplugin" is not installed.
Sending exception report (press Ctrl+C to stop).....

This means your plugin has not been copied over to the demo project, or failed when running the demo command previously. To resolve this run npm run repair.

Why the TNS prefixed name?

TNS stands for Telerik NativeScript

iOS uses classes prefixed with NS (stemming from the NeXTSTEP days of old): https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/

To avoid confusion with iOS native classes, TNS is used instead.

License

MIT