{"id":13661248,"url":"https://github.com/NathanWalker/nativescript-ngx-plugin-seed","last_synced_at":"2025-04-24T23:32:12.097Z","repository":{"id":142263010,"uuid":"54596486","full_name":"NathanWalker/nativescript-ngx-plugin-seed","owner":"NathanWalker","description":"Get started building NativeScript + Angular plugins quickly.","archived":false,"fork":false,"pushed_at":"2017-01-15T06:35:38.000Z","size":2476,"stargazers_count":43,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T14:12:51.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NathanWalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-23T22:11:21.000Z","updated_at":"2023-08-18T11:29:50.000Z","dependencies_parsed_at":"2024-01-15T20:51:51.408Z","dependency_job_id":"cf13ad72-cfc8-4950-8e78-9812484ac801","html_url":"https://github.com/NathanWalker/nativescript-ngx-plugin-seed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ngx-plugin-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ngx-plugin-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ngx-plugin-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ngx-plugin-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanWalker","download_url":"https://codeload.github.com/NathanWalker/nativescript-ngx-plugin-seed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250727781,"owners_count":21477372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:01:31.540Z","updated_at":"2025-04-24T23:32:10.637Z","avatar_url":"https://github.com/NathanWalker.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"## Develop a nativescript-angular plugin now\n\n[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Dependency Status](https://david-dm.org/NathanWalker/nativescript-ngx-plugin-seed/status.svg)](https://david-dm.org/NathanWalker/nativescript-ngx-plugin-seed#info=dependencies)\n\n| ![Demo](/resources/demo.png) |\n| :---: |\n| Android and iPhone running the same {N} + Angular plugin. |\n\nThe seed is setup to allow you to create a [nativescript-angular](https://github.com/NativeScript/nativescript-angular) plugin quickly.\n\n* Sample demo app ready for you to try out your plugin as you develop it.\n* Sample `Component`, `Directive`, `Pipe` and `Service` created for you (*tests coming soon*) to get started right away.\n* Customize whichever is helpful to your plugin and remove the others.\n\n## Get started\n\n1. Download a zip of this seed.\n2. `cd ... path/to/unzip/folder ...`\n3. `npm install -g nativescript`\n4. `npm run setup`\n5. Get to work.\n\n## Changes needed\n\nYou will want to change a couple things for your plugin.\n\n1. Replace all instances of `nativescript-ngx-yourplugin` with name of *your* plugin:\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/package.json\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/package.json#L22\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/tsconfig.json#L13 (And likely modify more to tailor to your specific plugins typescript definition needs)\n2. Modify the demo to import your plugin files, etc: \n  * Here:  https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/main.ts#L12\n  * Here:  https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/main.ts#L18\n  * Here:  https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/app.component.ts#L3\n  * Here:  https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/app.component.ts#L22\n  \n3. Replace the 'YourPluginModule' with *your* plugin module name:\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/nativescript-ngx-yourplugin.ts#L30\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/main.ts#L12\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/src/app/main.ts#L18\n  \n4. If you modified the name of services,components,... or created new ones that you want to export them:\n  * Here: https://github.com/NathanWalker/nativescript-ngx-plugin-seed/blob/master/nativescript-ngx-yourplugin.ts#L3-L28\n\n  \n\n## Develop Workflow\n\nMake changes to plugin files, then:\n\n```\nnpm run demo.ios\n\n// or...\n\nnpm run demo.android\n```\n\n### Build Plugin\n\nYou'll want to run this before publishing.\n\n```\nnpm run build\n```\n\n### Publishing\n\n`packagedev.json` should always mirror your `package.json` for development.\nAfter installing dependencies for your plugin and running your demo, just copy contents of `package.json` to `packagedev.json`.\n\nThen to publish:\n\n1. Setup `packagepublish.json` the way you want your plugin published (Bumping correct version and setting the description, author, keywords, repo, main, and typings correctly for instance).\n2. `node prep publish` (This will set your `package.json` to be your `packagepublish.json`).\n3. `npm run build` (Create a fresh build of your library)\n4. `npm publish`\n\n### Back to development\n\nAfter publishing, it's a good idea to set your `package.json` back to development mode before committing your changes. Your `packagedev.json` should be exactly what your development mode package was before publishing above.\n\n1. `node prep dev`\n2. Continue developing.\n\n### Troubleshooting\n\nWhen preparing your demo if you get the following error message:\n\n```\nPlugin \"nativescript-ngx-yourplugin\" is not installed.\nSending exception report (press Ctrl+C to stop).....\n```\nThis 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``.\n\n## Why the TNS prefixed name?\n\n`TNS` stands for **T**elerik **N**ative**S**cript\n\niOS uses classes prefixed with `NS` (stemming from the [NeXTSTEP](https://en.wikipedia.org/wiki/NeXTSTEP) days of old):\nhttps://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/\n\nTo avoid confusion with iOS native classes, `TNS` is used instead.\n\n# License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNathanWalker%2Fnativescript-ngx-plugin-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNathanWalker%2Fnativescript-ngx-plugin-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNathanWalker%2Fnativescript-ngx-plugin-seed/lists"}