@tarojs/plugin-platform-jd 4.0.0-beta.0 → 4.0.0-beta.2
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 +14 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
|
|
|
158
158
|
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
159
|
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
160
|
See `/LICENSE` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
MIT (weui):
|
|
165
|
+
The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
|
|
166
|
+
`/packages/taro-components/src/components/*.scss`
|
|
167
|
+
See `/LICENSE.txt` for details of the license.
|
|
168
|
+
|
|
169
|
+
==================
|
|
170
|
+
|
|
171
|
+
Apache-2.0 (intersection-observer):
|
|
172
|
+
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
173
|
+
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
174
|
+
See `/LICENSE.txt` for details of the license.
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
29
29
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
30
30
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
31
31
|
});
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
35
|
+
var e = new Error(message);
|
|
36
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
37
|
+
};
|
|
33
38
|
|
|
34
39
|
const components = {
|
|
35
40
|
// ======== 调整属性 ========
|
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 Input: {\n 'adjust-position': 'true',\n },\n Textarea: {\n 'show-confirm-bar': 'true',\n 'adjust-position': 'true',\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":"
|
|
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 Input: {\n 'adjust-position': 'true',\n },\n Textarea: {\n 'show-confirm-bar': 'true',\n 'adjust-position': 'true',\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 ||= []\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C,CAAC,CAAA;AACJ,CAAC;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-jd",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
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,8 @@
|
|
|
23
23
|
"url": "https://github.com/NervJS/taro/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tarojs/
|
|
27
|
-
"@tarojs/
|
|
26
|
+
"@tarojs/service": "4.0.0-beta.2",
|
|
27
|
+
"@tarojs/shared": "4.0.0-beta.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"rollup": "^2.79.0",
|