Downgrade module
Weex downgrade to web module. Version should be semver format.
install
install from npm command: npm install @weex-project/downgrade --save
sample
import Downgrade from '@weex-project/downgrade'
Downgrade.force()
Downgrade.check({
ios: {
osVersion: '>1.0',
appVersion: '>1.0.0',
weexVersion: '>1',
deviceModel: ['iPhone5,1']
},
android: {
osVersion: '>1.0',
appVersion: '>1.0.0',
weexVersion: '>1',
deviceModel: ['G-2PW2100']
}
})
Downgrade.check({
ios: {
osVersion: '>1.0',
appVersion: {
MY_APP_A: '>1.0.0',
MY_APP_B: '>2.0.0'
},
weexVersion: '>1',
deviceModel: ['iPhone5,1']
},
android: {
osVersion: '>1.0',
appVersion: {
MY_APP_A: '>1.0.0',
MY_APP_C: '>3.0.0'
},
weexVersion: '>1',
deviceModel: ['G-2PW2100']
}
})
Downgrade.condition({
ios: {
osVersion: '>1.0',
appVersion: '>1.0.0',
weexVersion: '>1',
deviceModel: ['iPhone5,1']
},
android: {
osVersion: '>1.0',
appVersion: '>1.0.0',
weexVersion: '>1',
deviceModel: ['G-2PW2100']
}
})
Downgrade.condition({
ios: {
osVersion: '>1.0',
appVersion: {
MY_APP_A: '>1.0.0',
MY_APP_B: '>2.0.0'
},
weexVersion: '>1',
deviceModel: ['iPhone5,1']
},
android: {
osVersion: '>1.0',
appVersion: {
MY_APP_A: '>1.0.0',
MY_APP_C: '>3.0.0'
},
weexVersion: '>1',
deviceModel: ['G-2PW2100']
}
})