{"id":489,"date":"2017-03-27T22:06:18","date_gmt":"2017-03-27T22:06:18","guid":{"rendered":"http:\/\/fluentreports.com\/blog\/?p=489"},"modified":"2017-03-27T23:34:19","modified_gmt":"2017-03-27T23:34:19","slug":"nativescript-plugins-let-fix-the-data","status":"publish","type":"post","link":"http:\/\/fluentreports.com\/blog\/?p=489","title":{"rendered":"NativeScript: Plugins - Let Fix the Data!"},"content":{"rendered":"<p>Some of you might not be aware but I wrote the <a href=\"http:\/\/plugins.nativescript.rocks\">plugins.nativescript.rocks. \u00a0<\/a> I also helped write the <a href=\"http:\/\/plugins.nativescript.org\">plugins.nativescript.org<\/a> site (if something doesn't work on plugins.nativescript.org; please blame my cohorts in crime, Nathan Walker and George Edwards. \u00a0 I had NOTHING to do with any bugs!\u00a0 \ud83d\ude1b\u00a0 )<\/p>\n<p>Well, with the new upcoming changes in 3.0 and some data that we have been unable to determine I have decided to request that the plugin authors add a little bit more metadata to the package.json file that comes with the plugin.<\/p>\n<p>So lets look at the existing \"nativescript\" key.<br \/>\n<pre>&quot;nativescript&quot;: {\n&nbsp;&nbsp; &quot;platforms&quot;: {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;android&quot;: &quot;2.3.0&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ios&quot;: &quot;2.3.0&quot;\n&nbsp;&nbsp;&nbsp;&nbsp;}\n },<\/pre><br \/>\nThis tells nativescript which version of NativeScript runttimes are supported.\u00a0\u00a0 This allows the TNS command line to throw and error\/warning if you are not using the proper versions.\u00a0\u00a0 This is useful information as this tells us what platforms are supported.\u00a0\u00a0 However, this fails when people (like me) write dummy wrappers to support the plugin not crashing on the other platform.\u00a0\u00a0\u00a0\u00a0 On the plugins site it will say this plugin supports both Android and iOS, but in all reality the plugin only really supports iOS, and actually doesn't really do anything on Android.\u00a0\u00a0\u00a0 I would like to have the plugins site actually reflect this reality rather than you downloading a plugin you thing works on Android and it turns out it doesn't.<\/p>\n<p>In addition since Angular was introduced to the eco-system, there are a large number of plugins that actually do NOT work with NAN (NativeScript Angular) code. \u00a0 And even some that don't work with PAN (Plain Awesome NativeScript) code.\u00a0 In addition in the future we might get other frameworks supported like VueJS (VAN?), etc.<\/p>\n<p>So I would like to start capturing the data so that we can do these additional cool things.\u00a0\u00a0 And so I am proposing the following additional OPTIONAL meta data to be added.<br \/>\n<pre>&quot;nativescript&quot;: {\n&nbsp;&nbsp; &quot;platforms&quot;: {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;android&quot;: &quot;2.3.0&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ios&quot;: &quot;2.3.0&quot;\n&nbsp;&nbsp;&nbsp;&nbsp;},\n&nbsp;&nbsp;&nbsp;&nbsp;&quot;plugin&quot;: {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;nan&quot;: &quot;false&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;pan&quot;: &quot;true&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;core3&quot;: &quot;true&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;wrapper&quot;: &quot;ios&quot;,\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;category&quot;: &quot;visual&quot;\n&nbsp;&nbsp;&nbsp;&nbsp;}\n },<\/pre><\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>nan<\/strong> = NativeScript ANgular<\/td>\n<td>will be assumed to be false, unless Angular is detected in the Keywords\/name\/description.<\/td>\n<\/tr>\n<tr>\n<td><strong>pan<\/strong> = Plain Awesome NativeScript<\/td>\n<td>Will be assumed to be true.<\/td>\n<\/tr>\n<tr>\n<td><strong>core3<\/strong> = Supports NS Core Modules 3.<\/td>\n<td>Will be assumed FALSE if platforms.ios\/.android &lt; 3<br \/>\nWill be assumed TRUE if platforms.ios\/andorid &gt;= 3.<\/td>\n<\/tr>\n<tr>\n<td><strong>wrapper<\/strong> = Using a dummy wrapper<\/td>\n<td>Will default to false, use \"ios\" or \"android\" to signify platform which is using a wrapper.<\/td>\n<\/tr>\n<tr>\n<td><strong>category<\/strong><\/td>\n<td>This is the category to put the plugin in.\u00a0\u00a0 Valid categories currently are: \"Interface\", \"Processing\", \"Templates\", \"Developer\", \"Utilities\"<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I am up for other category suggestions.\u00a0\u00a0 But at this point these are the primary categories that I use on <a href=\"http:\/\/plugins.nativescript.rocks\">plugins.nativescript.rocks<\/a>.<\/p>\n<p>Please note each key is optional; however, your plugin will get extra points for having an category key.\u00a0 And you will LOSE points if we detect a plugin is using a wrapper and you haven't tagged it, as this is a issue the plugin users really hate seeing faulty data about the plugins support.<\/p>\n<p>I would recommend plugin authors start adding this to any releases of there plugins so that we can capture the data.\u00a0 This will become critical with the 3.0 release as a large chunk of plugins are not going to be compatible between NS 2 &amp; NS 3.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of you might not be aware but I wrote the plugins.nativescript.rocks. \u00a0 I also helped write the plugins.nativescript.org site (if something doesn't work on plugins.nativescript.org; please blame my cohorts in crime, Nathan Walker and George Edwards. \u00a0 I had NOTHING to do with any bugs!\u00a0 \ud83d\ude1b\u00a0 ) Well, with the new upcoming changes in&hellip; <a class=\"more-link\" href=\"http:\/\/fluentreports.com\/blog\/?p=489\">Continue reading <span class=\"screen-reader-text\">NativeScript: Plugins - Let Fix the Data!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,51],"tags":[16,100,34],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-nativescript","category-plugins","tag-nativescript","tag-ns-3-0","tag-plugins","entry"],"_links":{"self":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=489"}],"version-history":[{"count":3,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":493,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/489\/revisions\/493"}],"wp:attachment":[{"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fluentreports.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}