{"id":19220088,"url":"https://github.com/nativescript-community/plugin-seed","last_synced_at":"2025-10-23T18:04:47.159Z","repository":{"id":46342376,"uuid":"311109023","full_name":"nativescript-community/plugin-seed","owner":"nativescript-community","description":"The plugin seed used for NativeScript Community plugins.","archived":false,"fork":false,"pushed_at":"2025-10-05T17:31:04.000Z","size":5815,"stargazers_count":3,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-05T17:41:09.725Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nativescript-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["farfromrefug"]}},"created_at":"2020-11-08T16:47:33.000Z","updated_at":"2025-10-05T17:31:07.000Z","dependencies_parsed_at":"2024-02-01T18:20:29.096Z","dependency_job_id":"ac5efd54-da29-4aaa-bf5b-8029920fdaad","html_url":"https://github.com/nativescript-community/plugin-seed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nativescript-community/plugin-seed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nativescript-community","download_url":"https://codeload.github.com/nativescript-community/plugin-seed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fplugin-seed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280666449,"owners_count":26369925,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-09T14:33:55.827Z","updated_at":"2025-10-23T18:04:47.143Z","avatar_url":"https://github.com/nativescript-community.png","language":"TypeScript","funding_links":["https://github.com/sponsors/farfromrefug"],"categories":[],"sub_categories":[],"readme":"# NativeScript Community Plugin Seed\n\nThis is a repo for the NativeScript Community plugin seed. Its goal is to standardize and streamline the plugin development of community plugins. This is an alternative to NativeScript's monorepo plugin seed. \n\nThis plugin seed contains demos (Angular, Vue, Svelte, and React), documentation generation, and release management w/ Lerna.\n\nYou must clone this repo recursively to download the submodules as well.\n```\ngit clone https://github.com/nativescript-community/plugin-seed.git --recursive\n```\n\n| \u003cimg src=\"images/plugin-seed-diagram.png\" /\u003e |\n| --- |\n| Plugin Seed Project Structure |\n## Table of Contents\n1. [Development](#development)\n2. [Demos](#demos)\n3. [Tools](#tools)\n4. [Docs](#docs)\n5. [Community Website](#community-website)\n6. [README Template](#readme-template)\n7. [Contribution Guide](#contribution-guide)\n\n## Development\n\nTo build the plugin's source code and run demos use the following steps:\n\n## Install Dependencies:\n```bash\nnpm i # or 'yarn install' or 'pnpm install'\n```\n\n### Interactive Menu:\nTo start the interactive menu, run `npm start` (or `yarn start` or `pnpm start`). This will list all of the commonly used scripts.\n\n\u003cimg src=\"images/interactive-menu.png\" /\u003e\n\n### Building Plugin:\n```bash\nnpm run build\n\n# or for Angular\nnpm run build.angular\n```\n\n### Running Demos:\n```bash\nnpm run demo.[ng|react|svelte|vue].[ios|android]\n\n# Example:\nnpm run demo.svelte.ios\n```\n\n### Plugin Config\n\nThere is a plugin config file called `config.json` which allows you to specify what demos are supported for the plugin as well as if Angular building is enabled.\n\nExample of plugin config:\n\n```json\n{\n    \"angular\": true,\n    \"demos\": [\n        \"ng\",\n        \"react\",\n        \"svelte\",\n        \"vue\"\n    ]\n}\n```\n\n### Automatic Redirect\nIn some cases, you might want to be redirected to a specific demo every time the app starts. This can be done by adding a `--env.redirect=[demo_name]` to the run demo command.\n\nThe `[demo_name]` comes from whatever the demo's `path` is that is defined in the framework's `install.ts` script.\n\nFor example, the Vue demo snippet's `install.ts` contains the following demos:\n```ts\nexport const demos = [\n    { name: 'Demo 1', path: \"demo1\", component: Demo1 },\n    { name: 'Demo 2', path: \"demo2\", component: Demo2 },\n    { name: 'Development', path: \"development\", component: Development }\n];\n```\nThis means you can set `[demo_name]` to `demo1`, `demo2`, or `development`.\n\n## Demos\n\n### Structure\n\n\nAs stated aboved, there is a demo for each framework: Angular, Vue, Svelte, and React. Each demo flavor is a Git submodule and the actual demo code is not meant to edited directly, but rather there are demo snippets for each flavor that will be linked to the demos. This allows for significantly simplier maintenance for developers.\n\n\u003cimg src=\"https://i.imgur.com/anV3Pxq.png\" height=\"500\" /\u003e\n\nThe demo template has a menu system that allows for the ability to show off multiple examples of the plugin in an organized way. \n\nThere is also a dedicated development demo which is a workspace for the development of the plugin. Sometimes in development there are special cases and obscure things you need to test, but don't need to be shown in the \"show-off\" demos. \n\nThe non-development demos should be for new users testing out the plugin to see the capabilities and understand how it works. These should *ideally* be the same across all demos.\n\n### Snippets\n\n\u003cimg src=\"images/demo-snippets-structure.png\" /\u003e\n\nThe `demo-snippets` directory contains the specific demo code for the plugin. Each component is essentially another demo page. Each framework directory has a `install.ts` file which will allow you at add any specific code that needs to be ran in the top-level of the demo. This is also where you register what components you want to be added to the demo.\n\nThere is also a `package.json` inside the `demo-snippets` directory. This allows you to add (or modify) any dependencies you need to be added to the demos.\n\n### Modifying App_Resources\n\nYou can add/overwrite files for each demo's `App_Resources` by adding the modifications to the `demo-snippets/App_Resources` directory. These files will be copied over to the correct location when a demo is ran. (Use `ns clean` before running a demo to force-sync the `App_Resources` directory).\n\n### Shared Assets\n\nThere is the ability to share assets across all of the demos. Simply create a directory called `assets` in the `demo-snippets` directory and its contents will be copied into the built app and be available by using a `~/`. Look at Demo 2 for a simple example of this.\n\n## Tools\n\nThere is a linked submodule called `tools`. This contains utility scripts that can be ran on the plugin. \n\n### Setup Plugins\n`setup.js` is used to link the plugin's demo snippets to the actual demo code. This script is ran from each demo's `preinstall` script in their `package.json`.\n\n### Sync\n`sync.js` is used to update the `dependencies`, `devDependencies`, and `scripts` portions of the `package.json` in order to match the \"template\" `package.json` (`./tools/package.json`). This is used to quickly and easily update plugins and keep a common set of dependencies. That can also be ran with `npm run sync` (or `npm run sync.test` for a dry-run).\n\n\n## Community Website\n\nPublishing your plugin on the [NativeScript Community Website](https://nativescript-community.github.io/) is as simple as publishing under the `@nativescript-community` scope and modifying your `plugin/package.json` file. \n\nSee the following image to understand what fields in the `package.json` correspond to the parts of the website.\n\n\u003cimg src=\"https://i.imgur.com/b2VhI3y.png\" /\u003e\n\n## README Template\n\nA boilerplate README for youl plugin is located [here](README_TEMPLATE.md). Rename this file to just `README.md` to make it your actual readme and update it with your plugin's content.\n\n## Contribution Guide\n\nA basic contribution guide for your plugin is located [here](CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fplugin-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript-community%2Fplugin-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fplugin-seed/lists"}