mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
platforms to engines
This commit is contained in:
@ -4,7 +4,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Battery',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-battery-status'
|
||||
}
|
||||
})
|
||||
|
@ -4,7 +4,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Camera',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-camera'
|
||||
},
|
||||
pluginCheck: () => {
|
||||
|
@ -7,7 +7,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Contacts',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-contacts'
|
||||
}
|
||||
})
|
||||
|
@ -6,7 +6,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Device Motion',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-device-motion'
|
||||
}
|
||||
})
|
||||
|
@ -6,7 +6,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Device Orientation',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-device-orientation'
|
||||
}
|
||||
})
|
||||
|
@ -6,7 +6,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Device',
|
||||
platforms: {
|
||||
plugins: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-device'
|
||||
},
|
||||
pluginCheck: () => {
|
||||
|
@ -10,7 +10,8 @@ import {NativePlugin} from '../plugin';
|
||||
*/
|
||||
@NativePlugin({
|
||||
name: 'Dialogs',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-dialogs'
|
||||
}
|
||||
})
|
||||
|
@ -5,7 +5,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Geolocation',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-geolocation'
|
||||
}
|
||||
})
|
||||
|
@ -10,7 +10,8 @@ import {NativePlugin} from '../plugin';
|
||||
*/
|
||||
@NativePlugin({
|
||||
name: 'Keyboard',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android'],
|
||||
engines: {
|
||||
cordova: 'ionic-plugin-keyboard'
|
||||
},
|
||||
pluginCheck: () => {
|
||||
|
@ -27,8 +27,8 @@ export class NativePluginDecorator {
|
||||
}
|
||||
|
||||
let platformString = [];
|
||||
for(var k in this.config.platforms) {
|
||||
platformString.push('\t' + k + ': '+ this.config.platforms[k]);
|
||||
for(var k in this.config.engines) {
|
||||
platformString.push('\t' + k + ': '+ this.config.engines[k]);
|
||||
}
|
||||
console.warn('Plugin for ' + this.config.name +
|
||||
' not installed. For native functionality, please install the correct plugin for your platform:\n' +
|
||||
|
@ -8,7 +8,8 @@ import {NativePlugin} from '../plugin';
|
||||
*/
|
||||
@NativePlugin({
|
||||
name: 'StatusBar',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-statusbar'
|
||||
},
|
||||
pluginCheck: () => {
|
||||
|
@ -5,7 +5,8 @@ import {NativePlugin} from '../plugin';
|
||||
|
||||
@NativePlugin({
|
||||
name: 'Vibration',
|
||||
platforms: {
|
||||
platforms: ['ios', 'android', 'web'],
|
||||
engines: {
|
||||
cordova: 'cordova-plugin-vibration'
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user