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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nativescript-ngx-fusion-icon

v0.1.3

Published

NativeScript + Angular Cedrus Fusion icon component

Downloads

15

Readme

Develop a NativeScript plugin Build Status

This repo is heavily based on @NathanWalker's Plugin Seed. Thanks Nathan!

TL;DR

The NativeScript plugin seed is built to be used as a starting point by NativeScript plugin developers. To bootstrap your plugin development execute the following:

  1. git clone https://github.com/NativeScript/nativescript-plugin-seed nativescript-yourplugin where nativescript--yourplugin is the name of your plugin.
  2. cd nativescript-yourplugin/src
  3. npm run postclone
  4. npm run demo.ios or npm run demo.android to run the demo.
  5. In another command prompt/terminal npm run plugin.tscwatch to watch to typescript changes in the plugin and to autmatically apply them in the demo.

Long Description

What is NativeScript plugin seed?

The NativeScript plugin seed is built to be used as a starting point by NativeScript plugin developers. It expands on several things presented here. What does the seed give you out of the box?

  • the plugin structure with option for easy development and debugging (see Development setup section below)
  • a simple working plugin
  • a demo project working with the plugin. It is useful during development and for running tests via Travis CI
  • plugin tests
  • a guideline how to structure your plugin README file that will be published to NPM
  • a shell script to create your plugin package
  • a proper .gitignore to keep GitHub tidy
  • a proper .npmignore to ensure everyone is happy when you publish your plugin to NPM.

Plugin seed demo

Plugin folder structure

|Folder/File name| Description |---|---| |demo| The plugin demo source code| |demo/tests| The tests for your plugin| |src| The plugin source code| |src/platform/android| Plugin Android specific configuration| |src/platform/ios|Plugin ios specific configuration| |src/README|Your plugin README stub explaining how other developers can use your plugin in their applications. Used when you publish your plugin to NPM. On postclone step, the README in the root is replaced with this one.| |src/scripts|The postclone script run when you execute npm run postclone. Feel free to delete it after you have executed the postclone step from the Getting started section| |publish|Contains a shell script to create and publish your package. Read more on creating a package and publishing in the Publish to NPM section|

Getting started

  1. Open a command prompt/terminal and execute git clone https://github.com/NativeScript/nativescript-plugin-seed nativescript-yourplugin to clone the plugin seed repository into the nativescript-yourplugin folder where nativescript--yourplugin is the name of your plugin..
  2. Open a command prompt/terminal and navigate to nativescript-yourplugin/src folder using cd nativescript-yourplugin/src
  3. Execute npm run postclone to:
    • configure your github username - it will be changed in the package.json for you
    • configure your plugin name - all files and classes in the seed will be renamed for you
    • stub your plugin README.md file
    • create a new repository for your plugin
    • npm link your plugin the demo app - this will install the plugin dependencies and will add a sym link to the plugin code in the demo project allowing you to do changes and review them in the demo without adding/removing the plugin every time you make a change. Read more about npm link. If you encounter an "EACCES" permission denied error, please fix you global npm permissions, which is perfectly explained here.

Now you can continue with the development of your plugin by using the Development setup described below.

Development setup

For easier development and debugging purposes continue with the following steps:

  1. Open a command prompt/terminal, navigate to src folder and run npm run demo.ios or npm run demo.android to run the demo.
  2. Open another command prompt/terminal, navigate to src folder and run npm run plugin.tscwatch to watch for file changes in your plugin.

Now go and make a change to your plugin. It will be automatically applied to the demo project.

NOTE: If you need to use a native library in your plugin or do some changes in Info.plist/AndroidManifest.xml, these cannot be applied to the demo project only by npm link. In such scenario you need to use tns plugin add ../src from the demo so that the native libraries and changes in the above mentioned files are applied in the demo. Then you can link again the code of your plugin in the demo by using npm run plugin.link from the src.

Linking to CocoaPod or Android Arsenal plugins

You will want to create these folders and files in the src folder in order to use native APIs:

platforms --
  ios --
    Podfile
  android --
    include.gradle

Doing so will open up those native apis to your plugin :)

Take a look at these existing plugins for how that can be done very simply:

Clean plugin and demo files

Sometimes you may need to wipe away the node_modules and demo/platforms folders to reinstall them fresh.

  1. Run npm run clean to wipe those clean then you can can run npm i to install fresh dependencies.

Unittesting

The plugin seed automatically adds Jasmine-based unittest support to your plugin. Open demo/app/tests/tests.js and adjust its contents so the tests become meaningful in the context of your plugin and its features.

You can read more about this topic here.

Once you're ready to test your plugin's API go to src folder and execute one of these commands:

npm run test.ios
npm run test.android

Publish to NPM

When you have everything ready to publish:

  • Bump the version number in src/package.json
  • Go to publish and execute publish.sh (run chmod +x *.sh if the file isn't executable)

If you just want to create a package, go to publish folder and execute pack.sh. The package will be created in publish/package folder.

NOTE: To run bash script on Windows you can install GIT SCM and use Git Bash.

TravisCI

The plugin structure comes with fully functional .travis.yml file that deploys the testing app on Android emulator and iOS simulator and as a subsequent step runs the tests from UnitTesting section. All you have to do, after cloning the repo and implementing your plugin and tests, is to sign up at https://travis-ci.org/. Then enable your plugin's repo on "https://travis-ci.org/profile/<your github user>" and that's it. Next time a PR is opened or change is commited to a branch TravisCI will trigger a build testing the code.

To properly show current build status you will have to edit the badge at the start of the README.md file so it matches your repo, user and branch.