@tarojs/plugin-platform-jd 3.6.2 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/types/index.d.ts +2 -0
package/LICENSE
CHANGED
|
@@ -137,3 +137,24 @@ MIT (miniprogram-render):
|
|
|
137
137
|
The following files embed [miniprogram-render](https://github.com/Tencent/kbone) MIT:
|
|
138
138
|
`/packages/taro-plugin-http/src/runtime/Cookie.ts`
|
|
139
139
|
See `/LICENSE` for details of the license.
|
|
140
|
+
|
|
141
|
+
==================
|
|
142
|
+
|
|
143
|
+
MIT (stencil-ds-output-targets):
|
|
144
|
+
The following files embed [stencil-ds-output-targets](https://github.com/ionic-team/stencil-ds-output-targets/) MIT:
|
|
145
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/attachProps.ts`
|
|
146
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/case.ts`
|
|
147
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/dev.ts`
|
|
148
|
+
`/packages/taro-components-library-react/src/react-component-lib/utils/index.tsx`
|
|
149
|
+
`/packages/taro-components-library-react/src/react-component-lib/createComponent.tsx`
|
|
150
|
+
`/packages/taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx`
|
|
151
|
+
`/packages/taro-components-library-react/src/react-component-lib/interfaces.ts`
|
|
152
|
+
`/packages/taro-components-library-vue3/src/vue-component-lib/utils.ts`
|
|
153
|
+
See `/LICENSE` for details of the license.
|
|
154
|
+
|
|
155
|
+
==================
|
|
156
|
+
|
|
157
|
+
MIT (stencil-vue2-output-target):
|
|
158
|
+
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
|
+
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
|
+
See `/LICENSE` for details of the license.
|
package/dist/index.js
CHANGED
|
@@ -53,7 +53,7 @@ const components = {
|
|
|
53
53
|
class Template extends template.UnRecursiveTemplate {
|
|
54
54
|
constructor() {
|
|
55
55
|
super(...arguments);
|
|
56
|
-
this.supportXS =
|
|
56
|
+
this.supportXS = true;
|
|
57
57
|
this.Adapter = {
|
|
58
58
|
if: 'jd:if',
|
|
59
59
|
else: 'jd:else',
|
|
@@ -65,6 +65,9 @@ class Template extends template.UnRecursiveTemplate {
|
|
|
65
65
|
type: 'jd'
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
+
buildXsTemplate() {
|
|
69
|
+
return '<jds src="./utils.jds" module="xs" />';
|
|
70
|
+
}
|
|
68
71
|
replacePropName(name, value, componentName) {
|
|
69
72
|
if (value === 'eh') {
|
|
70
73
|
const nameLowerCase = name.toLowerCase();
|
|
@@ -96,7 +99,8 @@ class JD extends service.TaroPlatformBase {
|
|
|
96
99
|
templ: '.jxml',
|
|
97
100
|
style: '.jxss',
|
|
98
101
|
config: '.json',
|
|
99
|
-
script: '.js'
|
|
102
|
+
script: '.js',
|
|
103
|
+
xs: '.jds'
|
|
100
104
|
};
|
|
101
105
|
this.template = new Template();
|
|
102
106
|
this.setupTransaction.addWrapper({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/components.ts","../src/template.ts","../src/program.ts","../src/index.ts"],"sourcesContent":["import { singleQuote } from '@tarojs/shared'\n\nexport const components = {\n // ======== 调整属性 ========\n Swiper: {\n 'easing-function': singleQuote('default')\n },\n Canvas: {\n type: ''\n },\n Button: {\n bindGetPhoneNumber: ''\n },\n Map: {\n bindRegionChange: ''\n },\n WebView: {\n height: ''\n }\n}\n","import { UnRecursiveTemplate } from '@tarojs/shared/dist/template'\n\nexport class Template extends UnRecursiveTemplate {\n supportXS =
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components.ts","../src/template.ts","../src/program.ts","../src/index.ts"],"sourcesContent":["import { singleQuote } from '@tarojs/shared'\n\nexport const components = {\n // ======== 调整属性 ========\n Swiper: {\n 'easing-function': singleQuote('default')\n },\n Canvas: {\n type: ''\n },\n Button: {\n bindGetPhoneNumber: ''\n },\n Map: {\n bindRegionChange: ''\n },\n WebView: {\n height: ''\n }\n}\n","import { UnRecursiveTemplate } from '@tarojs/shared/dist/template'\n\nexport class Template extends UnRecursiveTemplate {\n supportXS = true\n Adapter = {\n if: 'jd:if',\n else: 'jd:else',\n elseif: 'jd:elif',\n for: 'jd:for',\n forItem: 'jd:for-item',\n forIndex: 'jd:for-index',\n key: 'jd:key',\n type: 'jd'\n }\n\n buildXsTemplate () {\n return '<jds src=\"./utils.jds\" module=\"xs\" />'\n }\n\n replacePropName (name, value, componentName) {\n if (value === 'eh') {\n const nameLowerCase = name.toLowerCase()\n if (nameLowerCase === 'bindlongtap' && componentName !== 'canvas') return 'bindlongpress'\n return nameLowerCase\n }\n return name\n }\n}\n","import { TaroPlatformBase } from '@tarojs/service'\n\nimport { components } from './components'\nimport { Template } from './template'\n\nconst PACKAGE_NAME = '@tarojs/plugin-platform-jd'\n\nexport default class JD extends TaroPlatformBase {\n platform = 'jd'\n globalObject = 'jd'\n projectConfigJson = 'project.jd.json'\n runtimePath = `${PACKAGE_NAME}/dist/runtime`\n fileType = {\n templ: '.jxml',\n style: '.jxss',\n config: '.json',\n script: '.js',\n xs: '.jds'\n }\n\n template = new Template()\n\n /**\n * 1. setupTransaction - init\n * 2. setup\n * 3. setupTransaction - close\n * 4. buildTransaction - init\n * 5. build\n * 6. buildTransaction - close\n */\n constructor (ctx, config) {\n super(ctx, config)\n\n this.setupTransaction.addWrapper({\n close: this.modifyTemplate\n })\n }\n\n /**\n * 增加组件或修改组件属性\n */\n modifyTemplate () {\n this.template.mergeComponents(this.ctx, components)\n }\n}\n","import { isString } from '@tarojs/shared'\n\nimport JD from './program'\n\nimport type { IPluginContext } from '@tarojs/service'\n\n// 让其它平台插件可以继承此平台\nexport { JD }\n\nexport default (ctx: IPluginContext) => {\n ctx.registerPlatform({\n name: 'jd',\n useConfigName: 'mini',\n async fn ({ config }) {\n const program = new JD(ctx, config)\n await program.start()\n }\n })\n\n ctx.modifyRunnerOpts(({ opts }) => {\n if (!opts?.compiler) return\n\n if (isString(opts.compiler)) {\n opts.compiler = {\n type: opts.compiler\n }\n }\n const { compiler } = opts\n if (compiler.type === 'webpack5') {\n compiler.prebundle ||= {}\n const prebundleOptions = compiler.prebundle\n if (prebundleOptions.enable === false) return\n prebundleOptions.swc ||= {\n jsc: {\n target: 'es5'\n }\n }\n prebundleOptions.exclude ||= []\n prebundleOptions.include ||= []\n }\n })\n}\n"],"names":["singleQuote","UnRecursiveTemplate","TaroPlatformBase","isString"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,UAAU,GAAG;;AAExB,IAAA,MAAM,EAAE;AACN,QAAA,iBAAiB,EAAEA,kBAAW,CAAC,SAAS,CAAC;AAC1C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,EAAE;AACT,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,kBAAkB,EAAE,EAAE;AACvB,KAAA;AACD,IAAA,GAAG,EAAE;AACH,QAAA,gBAAgB,EAAE,EAAE;AACrB,KAAA;AACD,IAAA,OAAO,EAAE;AACP,QAAA,MAAM,EAAE,EAAE;AACX,KAAA;CACF;;ACjBK,MAAO,QAAS,SAAQC,4BAAmB,CAAA;AAAjD,IAAA,WAAA,GAAA;;QACE,IAAS,CAAA,SAAA,GAAG,IAAI,CAAA;AAChB,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,EAAE,OAAO;AACX,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,QAAQ,EAAE,cAAc;AACxB,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,IAAI,EAAE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AAA;YACD,gBAAgB,CAAC,OAAO,KAAxB,gBAAgB,CAAC,OAAO,GAAK,EAAE,CAAA,CAAA;YAC/B,gBAAgB,CAAC,OAAO,KAAxB,gBAAgB,CAAC,OAAO,GAAK,EAAE,CAAA,CAAA;AAChC,SAAA;AACH,KAAC,CAAC,CAAA;AACJ,CAAC;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-jd",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.3",
|
|
4
4
|
"description": "京东小程序平台插件",
|
|
5
5
|
"author": "Chen-jj",
|
|
6
6
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-jd#readme",
|
|
@@ -23,8 +23,13 @@
|
|
|
23
23
|
"url": "https://github.com/NervJS/taro/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tarojs/service": "3.6.
|
|
27
|
-
"@tarojs/shared": "3.6.
|
|
26
|
+
"@tarojs/service": "3.6.3",
|
|
27
|
+
"@tarojs/shared": "3.6.3"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"rollup": "^2.79.0",
|
|
31
|
+
"rollup-plugin-ts": "^3.0.2",
|
|
32
|
+
"typescript": "^4.7.4"
|
|
28
33
|
},
|
|
29
34
|
"scripts": {
|
|
30
35
|
"build": "rollup -c",
|
package/types/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ declare class Template extends UnRecursiveTemplate {
|
|
|
12
12
|
key: string;
|
|
13
13
|
type: string;
|
|
14
14
|
};
|
|
15
|
+
buildXsTemplate(): string;
|
|
15
16
|
replacePropName(name: any, value: any, componentName: any): any;
|
|
16
17
|
}
|
|
17
18
|
declare class JD extends TaroPlatformBase {
|
|
@@ -24,6 +25,7 @@ declare class JD extends TaroPlatformBase {
|
|
|
24
25
|
style: string;
|
|
25
26
|
config: string;
|
|
26
27
|
script: string;
|
|
28
|
+
xs: string;
|
|
27
29
|
};
|
|
28
30
|
template: Template;
|
|
29
31
|
/**
|