Skip to content

Commit

Permalink
feat: 支持京东小程序
Browse files Browse the repository at this point in the history
  • Loading branch information
石小磊 authored and zhetengbiji committed Dec 15, 2021
1 parent 2aaef88 commit 90fb079
Show file tree
Hide file tree
Showing 30 changed files with 2,554 additions and 18 deletions.
4 changes: 4 additions & 0 deletions build/rollup.config.mp.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ const PLATFORMS = {
prefix: 'tt',
title: '飞书小程序'
},
'mp-jd': {
prefix: 'jd',
title: '京东小程序'
},
'quickapp-webview': {
prefix: 'qa',
title: '快应用(Webview)版'
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
"build:mp-toutiao": "cross-env UNI_PLATFORM=mp-toutiao rollup -c build/rollup.config.mp.js",
"build:mp-kuaishou": "cross-env UNI_PLATFORM=mp-kuaishou rollup -c build/rollup.config.mp.js",
"build:mp-lark": "cross-env UNI_PLATFORM=mp-lark rollup -c build/rollup.config.mp.js",
"build:mp-jd": "cross-env UNI_PLATFORM=mp-jd rollup -c build/rollup.config.mp.js",
"build:quickapp-webview": "cross-env UNI_PLATFORM=quickapp-webview rollup -c build/rollup.config.mp.js",
"build:mp-weixin:mp": "cross-env UNI_PLATFORM=mp-weixin UNI_MP=true rollup -c build/rollup.config.mp.js",
"build:mp-weixin:wxs": "rollup -c build/rollup.config.wxs.js",
"build:quickapp-native": "cross-env NODE_ENV=development node build/build.qa.js && cross-env NODE_ENV=production node build/build.qa.js",
"build:runtime": "npm run lint && npm run build:mp-weixin && npm run build:mp-qq && npm run build:mp-alipay && npm run build:mp-baidu && npm run build:mp-toutiao && npm run build:app-plus && npm run build:quickapp-webview && npm run build:quickapp-native && npm run build:mp-kuaishou && npm run build:mp-lark",
"build:runtime": "npm run lint && npm run build:mp-weixin && npm run build:mp-qq && npm run build:mp-alipay && npm run build:mp-baidu && npm run build:mp-toutiao && npm run build:mp-jd && npm run build:app-plus && npm run build:quickapp-webview && npm run build:quickapp-native && npm run build:mp-kuaishou && npm run build:mp-lark",
"build:stat": "npm run lint && rollup -c build/rollup.config.stat.js",
"build:web-view": "rollup -c build/rollup.config.web-view.js",
"test:cli": "cross-env NODE_ENV=test jest",
Expand Down
3 changes: 2 additions & 1 deletion packages/uni-cli-shared/lib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const PLATFORMS = [
'mp-qq',
'mp-baidu',
'mp-alipay',
'mp-toutiao'
'mp-toutiao',
'mp-jd',
]

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions packages/uni-cli-shared/lib/url-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const inlineLimit =
process.env.UNI_PLATFORM === 'mp-toutiao' ||
process.env.UNI_PLATFORM === 'mp-kuaishou' ||
process.env.UNI_PLATFORM === 'mp-lark' ||
process.env.UNI_PLATFORM === 'mp-jd' ||
process.env.UNI_PLATFORM === 'app-plus' // v2需要base64,v3需要rewriteUrl

// mp-weixin,mp-qq,app-plus 非v3(即:需要base64的平台)
Expand Down
11 changes: 11 additions & 0 deletions packages/uni-mp-jd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# `uni-mp-jd`

> TODO: description
## Usage

```
const uniMpJD = require('uni-mp-jd');
// TODO: DEMONSTRATE API
```
Loading

0 comments on commit 90fb079

Please sign in to comment.