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