tns-template-plugin icon indicating copy to clipboard operation
tns-template-plugin copied to clipboard

A NativeScript plugin generator...

npm npm npm

NativeScript Plugin Generator

A command-line generator that automatically builds NativeScript plugins with the following:

  • Source code templates for iOS, Android, or both;
  • A preconfigured package.json file, ready for publishing to npm;
  • A fully-functional demo project;
  • Complete TypeScript support, including tsconfig.json configuration (if needed).
  • License, README.md, and .gitignore files.

Instructions

To get started with the generator, clone this repository, navigate to the cloned directory, and run the npm start command.

git clone https://github.com/NathanaelA/tns-template-plugin nativescript-plugin-name
cd nativescript-plugin-name
npm start

The generator will ask you a series of questions, and use your answers to scaffold the plugin you desire. The generator will even remember answers to common questions in your $HOME/.tns-plugin folder, so that you don’t have to provide those answers on future plugins.

Sample1

License

This project itself is released under the MIT license; however, the code generated is released under no license, so that you can release your plugin under any license and claim all rights to the code contained here.

I also do contract work; so if you have a module you want built for NativeScript (or any other software projects), feel free to contact me [email protected].

Donate Patreon

Updates

Please feel free to fork this repo and update it!!!

Features

The $HOME/.tns-plugin/ folder is used to store settings and additional files you may want added to any new plugins.

So if you would like to have your OWN custom README.md or package.json template used as the source, create a file in your %HOMEPATH% or $HOME /.tns-plugin/files/ folder.

When parsing the files, the generator will look for any \[[name]], \[[github]], \[[plugin]], \[[email]], \[[os], and \[[license] tokens, and replace them with the values you typed.

Contributors

Alexander Ziskind TJ VanToll