chore(): add paid tag to documentation

This commit is contained in:
Samuel Goodell 2017-07-10 14:16:11 -05:00 committed by GitHub
commit 927bd1a9ba
6 changed files with 28 additions and 11 deletions

View File

@ -24,6 +24,18 @@ module.exports = function jekyll(renderDocsProcessor) {
.replace('content/', '');
});
const betaDocs = [];
docs = docs.filter(doc => {
if (doc.beta === true) {
betaDocs.push(doc);
return false;
}
return true;
});
docs = docs.concat(betaDocs);
// add side menu
docs.push({
docType: 'nativeMenu',

View File

@ -6,5 +6,6 @@ module.exports = [
{'name': 'usage'},
{'name': 'hidden'}, // hide from docs
{'name': 'classes'}, // related classes
{'name': 'interfaces'} // related interfaces
{'name': 'interfaces'}, // related interfaces
{'name': 'paid', transforms: (doc, tag, value) => typeof value !== 'undefined'} // paid plugin, set value to true
];

View File

@ -147,6 +147,9 @@ docType: "<$ doc.docType $>"
<@- if doc.beta == true -@>
<span class="beta" title="beta">&beta;</span>
<@- endif -@>
<@- if doc.paid == true -@>
<span class="paid" title="paid">Paid</span>
<@- endif -@>
</h1>
<a class="improve-v2-docs" href="http://github.com/ionic-team/ionic-native/edit/master/<$ doc.fileInfo.relativePath|replace('/home/ubuntu/ionic-native/', '')|replace('//','/') $>#L<$ doc.location.start.line $>">
@ -163,6 +166,12 @@ docType: "<$ doc.docType $>"
href="<$ prop.repo $>/issues">plugin repo</a>.
</p>
<@ endif @>
<@ if doc.paid == true @>
<p class="paid-notice">
This plugin might require a paid license, or might take a share of your app's earnings.
Check the <a target="_blank" rel="nofollow" href="<$ prop.repo $>">plugin's repo</a> for more information.
</p>
<@ endif @>
<# --- Plugin description --- #>
<$ doc.description | marked $>

View File

@ -4,11 +4,7 @@
<li class="capitalize {% if page.id == 'mocking' %}active{% endif %}">
<a href="/docs/native/browser.html">Browser Usage</a>
</li>
<@- for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
<@- for doc in docs @><@ if doc.URL and doc.private != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|dashify $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>
<@- for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|dashify $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $> <span class="beta">&beta;</span></a>
<a href="/<$ doc.URL $>"><$ doc.name $><@ if doc.paid == true @> <span class="paid">Paid</span><@ endif @><@ if doc.beta == true @> <span class="beta">&beta;</span><@ endif @></a>
</li><@ endif @><@ endfor @>

View File

@ -90,7 +90,8 @@ export interface AdExtras {
}
/**
* @name AdMobPro Pro
* @paid
* @name AdMob
* @description
* Plugin for Google Ads, including AdMob / DFP (DoubleClick for publisher) and mediations to other Ad networks.
*

View File

@ -172,14 +172,12 @@ export interface NativeKeyboardUpdateMessengerOptions {
}
/**
* @paid
* @name Native Keyboard
* @description
* A cross platform WhatsApp / Messenger / Slack -style keyboard even. For your Cordova app.
*
*
* IMPORTANT NOTICE: this plugin is paid, please read more about this at the [plugin's repo](https://github.com/EddyVerbruggen/cordova-plugin-native-keyboard#i-like-it-hook-me-up).
*
*
* @usage
* ```
* import { NativeKeyboard } from '@ionic-native/native-keyboard';