Skip to content

Commit 8b54f4c

Browse files
Merge pull request NativeScript#891 from NativeScript/atsvetkov/verified-plugin
Add verified plugins criteria
2 parents d558ffa + e007adb commit 8b54f4c

File tree

1 file changed

+179
-0
lines changed

1 file changed

+179
-0
lines changed

docs/plugins/verified-plugins.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
title: Verified Plugins Criteria
3+
description: Verified vs. not verified plugins. Want to know the difference?
4+
position: 29
5+
slug: verified-plugins
6+
---
7+
8+
# Verified Plugins
9+
10+
We are on a mission to increase the reliability of the NativeScript plugins ecosystem.
11+
12+
One of the problems today is that there are several plugins that solve the same problem (e.g. social login) and it is hard to determine the quality of any of these plugins.
13+
14+
There is a list of requirements that should assure the high quality of the NativeScript plugins. We call this list the Verified Plugins Criteria. We want these verified plugins to become the best choice for developers. We are committed to promote high quality work and propose to promote verified plugins as a mark of high quality.
15+
16+
## Your Benefits
17+
18+
- The time for building of NativeScript applications will be decreased. The more quality are the plugins, the faster mobile apps will be build.
19+
20+
- Since the high quality plugins will be more discoverable in the [Marketplace](http://market.nativescript.org) - the plugin authors of these plugin will be also more discoverable
21+
22+
23+
## Criteria
24+
25+
The Verified Plugins Criteria outlines the mandatory requirements that each NativeScript plugin should meet in order to be marked as verified.
26+
27+
Each criterion has 3 attributes:
28+
29+
- **Motivation** - why it is important to satisfy the criterion
30+
- **Documentation** - link to the documentation that provide more details regarding the criterion
31+
- **Implementation Time** - rough estimate how long it will take to implement the criterion. This is applicable for existing NativeScript plugins.
32+
33+
<br>
34+
35+
### 1. The plugin has been transpiled successfully (tsc) (For TypeScript plugins).
36+
37+
#### Motivation
38+
NativeScript plugin is installed in application as JavaScript package. It is critical to have the TypeScript successfully transpiled to JavaScript.
39+
40+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#checking-for-readability-maintainability-and-functionality-errors)
41+
42+
#### Implementation Time: 30 min
43+
44+
<br>
45+
46+
### 2. The plugin has a demo app
47+
> Note: By convention we recommend to have folder "demo" and/or `demo-angular`/`demo-ng`. If there is a demo app, but it is in a folder named other way, we will return a recommendation to rename it. This will not be a showstopper for the plugin to become verified.
48+
49+
#### Motivation
50+
Demo application will ease the testing of your plugin. It will enable the NativeScript developers that plan to use it to test the plugin in real application prior to install it. Demo application will be an example how to use the plugin in NativeScript app. Demo application is required in order to run tests. Having a demo app in place will enable you to record a short video (GIF) and embed it in README.md as a showcase.
51+
52+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#prerequisites)
53+
54+
#### Implementation Time: 2h
55+
56+
<br>
57+
58+
### 3. The plugin should be eligible to be used in both Angular and non-Angular app.
59+
>Note: UI Plugins should have Angular wrappers (e.g. [nativescript-facebook](https://github.com/NativeScript/nativescript-facebook/tree/master/src/angular)) or the README file that explains how to use it in the Angular app ([nativescript-cardview](https://github.com/bradmartin/nativescript-cardview#angular-nativescript)).
60+
61+
#### Motivation
62+
63+
NativeScript plugins should support all the technologies that NativeScript officially support. It is very unpleasant when you install a plugin in your NativeScript Angular application and it breaks your app or just doesn’t work. The verified plugin should imply Angular support.
64+
65+
#### [Documentation](http://docs.nativescript.org/angular/plugins/angular-plugin.html)
66+
67+
#### Implementation Time: 30min
68+
69+
<br>
70+
71+
### 4. The demo app has been built successfully (with latest official {N} version) for iOS version 10.x.
72+
73+
#### Motivation
74+
75+
The successful building of your demo application is clear sign that your plugin do not break the application build. It is really a small step that will assure quality of your plugin.
76+
77+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#checking-in-application-built-for-android-and-ios)
78+
79+
#### Implementation Time: 30min
80+
81+
<br>
82+
83+
### 5. The demo app has been built successfully (with latest official {N} version) for Android API Level 25.
84+
85+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#checking-in-application-built-for-android-and-ios)
86+
87+
<br>
88+
89+
### 6. The demo app has been bundled (webpack) and built successfully (with latest official {N} version) for iOS version 10.x.
90+
>Note: Uglify option is required `npm run ns-bundle --ios --build-app --uglify`
91+
92+
#### Motivation
93+
94+
webpack (AOT) is the key tool that makes the NativeScript Angular application fast. It is critical to have all plugins compatible with webpack requirements.
95+
96+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#checking-in-bundled-nativescript-applications)
97+
98+
#### Implementation Time: 2h
99+
100+
<br>
101+
102+
### 7. The demo app has been bundled (webpack) and built successfully (with latest official {N} version) for Android API Level 25.
103+
>Note: Uglify option is required `npm run ns-bundle --android --build-app --uglify`
104+
105+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#checking-in-bundled-nativescript-applications)
106+
107+
<br>
108+
109+
### 8. Weekly builds in Travis CI with the previous checks have been set up.
110+
111+
#### Motivation
112+
113+
Executing these simple checks on every change of your plugin will make you more confident in its quality and will help you to keep that quality through the time.
114+
115+
#### [Documentation](http://docs.nativescript.org/plugins/ensure-plugins-quality#automate-all-checks-with-travis-ci)
116+
117+
#### Implementation Time: 30min
118+
119+
<br>
120+
121+
### 9. README file explains clearly what are the features and limitations of the plugin
122+
>Note: See [nativescript-plugin-seed](https://github.com/NativeScript/nativescript-plugin-seed).
123+
124+
Following sections are required:
125+
126+
- Installation
127+
- Configuration
128+
- API
129+
- Usage - code snippets for all supported platforms (iOS, Android) and technologies (Angular, Vue)
130+
131+
#### Motivation
132+
133+
Common documentation style will increase the readability of plugin’s documentation. Also it is critical when you have to evaluate whether the particular plugin satisfy all the requirements you have. This will ease the decision which plugin to use as well.
134+
135+
#### Implementation Time: 30min
136+
137+
<br>
138+
139+
### 10. There is a `LICENSE` file and same license is defined in `package.json` file.
140+
141+
#### Motivation
142+
143+
GitHub display license based on the content of LICENSE file. Npm display license based on the package.json. This is required in order to be visible what is the license that your plugin is distributed under.
144+
145+
#### Implementation Time: 30min
146+
147+
<br>
148+
149+
### 11. NativeScript team review.
150+
>IMPORTANT: All existing NativeScript plugins will be listed in the NativeScript Marketplace. Verified ones will be on top. NativeScript team needs to perform an initial review of every verified plugin with the idea to provide guidance and help the plugin authors.
151+
152+
#### Motivation
153+
154+
In order to provide guidance and help you with the development of your NativeScript plugin, we need to review it. This process will be a great indicator how the NativeScript community actually use the technology to build plugins and applications. We need to work more closely with you!
155+
156+
<br>
157+
158+
### Total Estimated Implementation Time: 7h
159+
160+
<br>
161+
162+
## Recommendations
163+
164+
The Verified Plugins Recommendations outline best practices that is going to be observed during NativeScript team review. These are not mandatory for a plugin to become verified.
165+
166+
#### 1. UI Plugins implement NS core theme (NS core theme for Angular). [Read more](http://docs.nativescript.org/plugins/implementing-core-theme)
167+
#### 2. There are tests and all tests pass. [Read more](http://docs.nativescript.org/plugins/unit-tests)
168+
#### 3. Comply with [nativescript-plugin-seed](https://github.com/NativeScript/nativescript-plugin-seed) structure.
169+
#### 4. No `*.ts` files in the plugin (define exclude rule in `.npmignore` file).
170+
#### 5. Publish the `*.d.ts` files (typescript plugins only) and have a `index.d.ts` file or typings key in the `package.json` pointing to definitions.
171+
#### 6. Dev dependencies are not added as dependencies.
172+
#### 7. For dev plugins (such as [nativescript-dev-webpack](https://github.com/NativeScript/nativescript-dev-webpack)) - make sure demo runs when it is started with --path.
173+
#### 8. Make sure you have "nativescript" property in plugin's package.json that correctly specifies the platforms the plugin supports. [Read more](http://docs.nativescript.org/plugins/plugin-reference#packagejson-specification)
174+
#### 9. Test whether the demo application can be snapshotted `npm run ns-bundle --android --build-app --uglify --snapshot`
175+
176+
177+
## See Also
178+
179+
* [Ensure Plugins Quality]({% slug ensure-plugins-quality %})

0 commit comments

Comments
 (0)