@tarojs/plugin-platform-h5 3.6.0-canary.12

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # `@tarojs/plugin-platform-h5`
2
+
3
+ Taro 插件。用于支持编译为 Web 应用。
@@ -0,0 +1,15 @@
1
+ import { TaroPlatformWeb, IPluginContext, TConfig } from "@tarojs/service";
2
+ declare class H5 extends TaroPlatformWeb {
3
+ platform: string;
4
+ runtimePath: string;
5
+ constructor(ctx: IPluginContext, config: TConfig);
6
+ get framework(): string;
7
+ get useHtmlComponents(): boolean;
8
+ get componentLibrary(): string;
9
+ /**
10
+ * 修改 Webpack 配置
11
+ */
12
+ modifyWebpackConfig(): void;
13
+ }
14
+ declare const _default: (ctx: IPluginContext) => void;
15
+ export { _default as default, H5 };
package/dist/index.js ADDED
@@ -0,0 +1,122 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var service = require('@tarojs/service');
7
+ var resolve = require('resolve');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var resolve__namespace = /*#__PURE__*/_interopNamespace(resolve);
28
+
29
+ function resolveSync(id, opts = {
30
+ basedir: __dirname
31
+ }) {
32
+ return resolve__namespace.sync(id, opts);
33
+ }
34
+
35
+ const compLibraryAlias = {
36
+ 'vue': 'vue2',
37
+ 'vue3': 'vue3'
38
+ };
39
+ const PACKAGE_NAME = '@tarojs/plugin-platform-h5';
40
+ class H5 extends service.TaroPlatformWeb {
41
+ constructor(ctx, config) {
42
+ super(ctx, config);
43
+ this.platform = 'h5';
44
+ this.runtimePath = `${PACKAGE_NAME}/dist/runtime`;
45
+ this.setupTransaction.addWrapper({
46
+ close() {
47
+ this.modifyWebpackConfig();
48
+ }
49
+ });
50
+ }
51
+ get framework() {
52
+ return this.ctx.initialConfig.framework || 'react';
53
+ }
54
+ get useHtmlComponents() {
55
+ var _a;
56
+ return !!((_a = this.ctx.initialConfig.h5) === null || _a === void 0 ? void 0 : _a.useHtmlComponents);
57
+ }
58
+ get componentLibrary() {
59
+ if (this.useHtmlComponents && this.framework === 'react') {
60
+ return './runtime/components';
61
+ }
62
+ else {
63
+ return `@tarojs/components/lib/${compLibraryAlias[this.framework] || 'react'}`;
64
+ }
65
+ }
66
+ /**
67
+ * 修改 Webpack 配置
68
+ */
69
+ modifyWebpackConfig() {
70
+ this.ctx.modifyWebpackChain(({ chain }) => {
71
+ const rules = chain.module.rules;
72
+ const script = rules.get('script');
73
+ const babelLoader = script.uses.get('babelLoader');
74
+ babelLoader.set('options', Object.assign(Object.assign({}, babelLoader.get('options')), { plugins: [
75
+ [require('babel-plugin-transform-taroapi'), {
76
+ packageName: '@tarojs/taro',
77
+ apis: require(resolveSync('./taroApis'))
78
+ }]
79
+ ] }));
80
+ const alias = chain.resolve.alias;
81
+ alias.set('@tarojs/taro', require.resolve('./runtime/apis'));
82
+ alias.set('@tarojs/components$', require.resolve(this.componentLibrary));
83
+ alias.set('@tarojs/router$', require.resolve('@tarojs/router'));
84
+ chain.plugin('mainPlugin')
85
+ .tap(args => {
86
+ var _a;
87
+ if (this.useHtmlComponents) {
88
+ (_a = args[0]).loaderMeta || (_a.loaderMeta = {
89
+ extraImportForWeb: '',
90
+ execBeforeCreateWebApp: ''
91
+ });
92
+ args[0].loaderMeta.extraImportForWeb += `import { PullDownRefresh } from '@tarojs/components'\n`;
93
+ args[0].loaderMeta.execBeforeCreateWebApp += `config.PullDownRefresh = PullDownRefresh\n`;
94
+ }
95
+ return args;
96
+ });
97
+ });
98
+ }
99
+ }
100
+
101
+ var index = (ctx) => {
102
+ ctx.registerPlatform({
103
+ name: 'h5',
104
+ useConfigName: 'h5',
105
+ fn({ config }) {
106
+ return tslib.__awaiter(this, void 0, void 0, function* () {
107
+ const program = new H5(ctx, config);
108
+ yield program.start();
109
+ });
110
+ }
111
+ });
112
+ ctx.modifyRunnerOpts(({ opts }) => {
113
+ opts.defineConstants = {
114
+ USE_HTML_COMPONENTS: JSON.stringify(!!opts.useHtmlComponents),
115
+ };
116
+ // TODO 为 postcss-html-transform 更新组件转换列表
117
+ });
118
+ };
119
+
120
+ exports.H5 = H5;
121
+ exports["default"] = index;
122
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/utils.ts","../src/program.ts","../src/index.ts"],"sourcesContent":["import * as resolve from 'resolve'\n\nexport function resolveSync (id: string, opts: resolve.SyncOpts = {\n basedir: __dirname\n}) {\n return resolve.sync(id, opts)\n}\n","import { TaroPlatformWeb } from '@tarojs/service'\n\nimport { resolveSync } from './utils'\n\nimport type { IPluginContext, TConfig } from '@tarojs/service'\n\nconst compLibraryAlias = {\n 'vue': 'vue2',\n 'vue3': 'vue3'\n}\n\nconst PACKAGE_NAME = '@tarojs/plugin-platform-h5'\nexport default class H5 extends TaroPlatformWeb {\n platform = 'h5'\n runtimePath = `${PACKAGE_NAME}/dist/runtime`\n\n constructor (ctx: IPluginContext, config: TConfig) {\n super(ctx, config)\n this.setupTransaction.addWrapper({\n close () {\n this.modifyWebpackConfig()\n }\n })\n }\n\n get framework () {\n return this.ctx.initialConfig.framework || 'react'\n }\n\n get useHtmlComponents () {\n return !!this.ctx.initialConfig.h5?.useHtmlComponents\n }\n\n get componentLibrary () {\n if (this.useHtmlComponents && this.framework === 'react') {\n return './runtime/components'\n } else {\n return `@tarojs/components/lib/${compLibraryAlias[this.framework] || 'react'}`\n }\n }\n\n /**\n * 修改 Webpack 配置\n */\n modifyWebpackConfig () {\n this.ctx.modifyWebpackChain(({ chain }) => {\n const rules = chain.module.rules\n const script = rules.get('script')\n const babelLoader = script.uses.get('babelLoader')\n babelLoader.set('options', {\n ...babelLoader.get('options'),\n plugins: [\n [require('babel-plugin-transform-taroapi'), {\n packageName: '@tarojs/taro',\n apis: require(resolveSync('./taroApis'))\n }]\n ]\n })\n\n const alias = chain.resolve.alias\n alias.set('@tarojs/taro', require.resolve('./runtime/apis'))\n alias.set('@tarojs/components$', require.resolve(this.componentLibrary))\n alias.set('@tarojs/router$', require.resolve('@tarojs/router'))\n chain.plugin('mainPlugin')\n .tap(args => {\n if (this.useHtmlComponents) {\n args[0].loaderMeta ||= {\n extraImportForWeb: '',\n execBeforeCreateWebApp: ''\n }\n args[0].loaderMeta.extraImportForWeb += `import { PullDownRefresh } from '@tarojs/components'\\n`\n args[0].loaderMeta.execBeforeCreateWebApp += `config.PullDownRefresh = PullDownRefresh\\n`\n }\n return args\n })\n })\n }\n}\n","import H5 from './program'\n\nimport type { IPluginContext } from '@tarojs/service'\n\n// Note: 让其它平台插件可以继承此平台\nexport { H5 }\n\nexport default (ctx: IPluginContext) => {\n ctx.registerPlatform({\n name: 'h5',\n useConfigName: 'h5',\n async fn ({ config }) {\n const program = new H5(ctx, config)\n await program.start()\n }\n })\n\n ctx.modifyRunnerOpts(({ opts }) => {\n opts.defineConstants = {\n USE_HTML_COMPONENTS: JSON.stringify(!!opts.useHtmlComponents),\n }\n // TODO 为 postcss-html-transform 更新组件转换列表\n })\n}\n\n"],"names":["resolve","TaroPlatformWeb"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEgB,SAAA,WAAW,CAAE,EAAU,EAAE,IAAyB,GAAA;AAChE,IAAA,OAAO,EAAE,SAAS;AACnB,CAAA,EAAA;IACC,OAAOA,kBAAO,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;AAC/B;;ACAA,MAAM,gBAAgB,GAAG;AACvB,IAAA,KAAK,EAAE,MAAM;AACb,IAAA,MAAM,EAAE,MAAM;CACf,CAAA;AAED,MAAM,YAAY,GAAG,4BAA4B,CAAA;AAC5B,MAAA,EAAG,SAAQC,uBAAe,CAAA;IAI7C,WAAa,CAAA,GAAmB,EAAE,MAAe,EAAA;AAC/C,QAAA,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;QAJpB,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAA;AACf,QAAA,IAAA,CAAA,WAAW,GAAG,CAAA,EAAG,YAAY,CAAA,aAAA,CAAe,CAAA;AAI1C,QAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;YAC/B,KAAK,GAAA;gBACH,IAAI,CAAC,mBAAmB,EAAE,CAAA;aAC3B;AACF,SAAA,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OAAO,GAAG,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AACnC,gBAAA,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;aACtB,CAAA,CAAA;AAAA,SAAA;AACF,KAAA,CAAC,CAAA;IAEF,GAAG,CAAC,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,KAAI;QAChC,IAAI,CAAC,eAAe,GAAG;YACrB,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;SAC9D,CAAA;;AAEH,KAAC,CAAC,CAAA;AACJ,CAAC;;;;;"}
@@ -0,0 +1,4 @@
1
+ import Taro from "./taro";
2
+ export * from "./taro";
3
+ export * from "./taro-h5";
4
+ export { Taro as default };
@@ -0,0 +1,7 @@
1
+ import './taro.js';
2
+ import './taro-h5.js';
3
+ import Taro__default from '@tarojs/taro-h5/dist/api/taro';
4
+ export * from '@tarojs/taro-h5/dist/api/taro';
5
+ export { default } from '@tarojs/taro-h5/dist/api/taro';
6
+ export * from '@tarojs/taro-h5/dist/api/index';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1 @@
1
+ export * from '@tarojs/taro-h5/dist/api/index';
@@ -0,0 +1,2 @@
1
+ export * from '@tarojs/taro-h5/dist/api/index';
2
+ //# sourceMappingURL=taro-h5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taro-h5.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from '@tarojs/taro-h5/dist/api/taro';
2
+ export { default } from "@tarojs/taro-h5/dist/api/taro";
@@ -0,0 +1,3 @@
1
+ export * from '@tarojs/taro-h5/dist/api/taro';
2
+ export { default } from '@tarojs/taro-h5/dist/api/taro';
3
+ //# sourceMappingURL=taro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taro.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1 @@
1
+ export * from '@tarojs/components-react';
@@ -0,0 +1,2 @@
1
+ export * from '@tarojs/components-react';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "./components/index";
@@ -0,0 +1,12 @@
1
+ import { applyPolyfills, defineCustomElements } from '@tarojs/components/loader';
2
+ import './components/index.js';
3
+ export * from '@tarojs/components-react';
4
+
5
+ if (!USE_HTML_COMPONENTS) {
6
+ require('@tarojs/components/dist/taro-components/taro-components.css');
7
+ applyPolyfills().then(function () {
8
+ defineCustomElements(window);
9
+ // process.env.NODE_ENV === 'production' 提供 componentConfig.includes 配置,根据 collectComponents 收集使用的组件注册,放到 loader 中完成 (生产环境)
10
+ });
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/runtime/index.ts"],"sourcesContent":["import { applyPolyfills, defineCustomElements } from '@tarojs/components/loader'\n\nif (!USE_HTML_COMPONENTS) {\n require('@tarojs/components/dist/taro-components/taro-components.css')\n applyPolyfills().then(function () {\n defineCustomElements(window)\n // process.env.NODE_ENV === 'production' 提供 componentConfig.includes 配置,根据 collectComponents 收集使用的组件注册,放到 loader 中完成 (生产环境)\n })\n}\n\nexport * from './components'\n"],"names":[],"mappings":";;;;AAEA,IAAI,CAAC,mBAAmB,EAAE;IACxB,OAAO,CAAC,6DAA6D,CAAC,CAAA;IACtE,cAAc,EAAE,CAAC,IAAI,CAAC,YAAA;QACpB,oBAAoB,CAAC,MAAM,CAAC,CAAA;;AAE9B,KAAC,CAAC,CAAA;AACH"}
@@ -0,0 +1,5 @@
1
+ import Taro from "@tarojs/taro-h5/dist/api/taro";
2
+ export * from "@tarojs/taro-h5/dist/api/taro";
3
+ export { default } from "@tarojs/taro-h5/dist/api/taro";
4
+ export * from "@tarojs/taro-h5/dist/api/index";
5
+ export { Taro as default };
@@ -0,0 +1,2 @@
1
+ module.exports = new Set(["Behavior","Current","ENV_TYPE","Events","Link","advancedGeneralIdentify","animalClassify","arrayBufferToBase64","authPrivateMessage","base64ToArrayBuffer","canIUse","canIUseWebp","carClassify","choosePoi","clearStorage","clearStorageSync","cloud","createBufferURL","createIntersectionObserver","createInterstitialAd","createMediaQueryObserver","createOffscreenCanvas","createRewardedVideoAd","createSelectorQuery","createWorker","dishClassify","env","eventCenter","exitMiniProgram","getApp","getCurrentInstance","getEnv","getExptInfoSync","getExtConfig","getExtConfigSync","getFileInfo","getFileSystemManager","getFuzzyLocation","getOpenUserInfo","getSavedFileInfo","getSavedFileList","getShareInfo","getStorage","getStorageInfo","getStorageInfoSync","getStorageSync","getSwanId","hideShareMenu","history","imageAudit","initPxTransform","interceptors","logoClassify","navigateBackMiniProgram","navigateBackSmartProgram","navigateToMiniProgram","navigateToSmartGameProgram","navigateToSmartProgram","objectDetectIdentify","ocrBankCard","ocrDrivingLicense","ocrIdCard","ocrVehicleLicense","offCopyUrl","offLocationChange","offLocationChangeError","onCopyUrl","onLocationChange","onLocationChangeError","openBusinessView","openDocument","openEmbeddedMiniProgram","openLocation","options","plantClassify","preload","preloadSubPackage","pxTransform","removeSavedFile","removeStorage","removeStorageSync","reportAnalytics","reportEvent","reportMonitor","requestOrderPayment","requestPayment","requestPolymerPayment","requirePlugin","revokeBufferURL","saveFile","saveFileToDisk","setPageInfo","setStorage","setStorageSync","shareFileMessage","shareVideoMessage","showShareImageMenu","showShareMenu","startLocationUpdate","startLocationUpdateBackground","stopLocationUpdate","textReview","textToAudio","updateShareMenu"])
2
+ //# sourceMappingURL=taroApis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taroApis.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/index.js ADDED
@@ -0,0 +1,4 @@
1
+ module.exports = require('./dist/index.js').default
2
+
3
+ module.exports.default = module.exports
4
+ module.exports.H5 = require('./dist/index.js').H5
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@tarojs/plugin-platform-h5",
3
+ "version": "3.6.0-canary.12",
4
+ "description": "Web 端平台插件",
5
+ "author": "ZakaryCode",
6
+ "license": "MIT",
7
+ "main": "index.js",
8
+ "keywords": [
9
+ "taro"
10
+ ],
11
+ "files": [
12
+ "index.js",
13
+ "dist",
14
+ "types"
15
+ ],
16
+ "sideEffects": [
17
+ "./dist/runtime/index.js",
18
+ "*.scss",
19
+ "*.css"
20
+ ],
21
+ "types": "types/index.d.ts",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/NervJS/taro.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/NervJS/taro/issues"
28
+ },
29
+ "dependencies": {
30
+ "resolve": "^1.22.0",
31
+ "@tarojs/service": "3.6.0-canary.12",
32
+ "@tarojs/components": "3.6.0-canary.12",
33
+ "@tarojs/components-react": "3.6.0-canary.12",
34
+ "@tarojs/router": "3.6.0-canary.12",
35
+ "@tarojs/shared": "3.6.0-canary.12",
36
+ "@tarojs/taro-h5": "3.6.0-canary.12",
37
+ "babel-plugin-transform-taroapi": "3.6.0-canary.12"
38
+ },
39
+ "devDependencies": {
40
+ "@rollup/plugin-commonjs": "^20.0.0",
41
+ "@rollup/plugin-node-resolve": "^8.0.0",
42
+ "lodash": "^4.17.21",
43
+ "rollup": "^2.79.0",
44
+ "rollup-plugin-node-externals": "^4.0.0",
45
+ "rollup-plugin-ts": "^3.0.2",
46
+ "typescript": "^4.7.4"
47
+ },
48
+ "scripts": {
49
+ "build": "rollup -c",
50
+ "dev": "rollup -c -w"
51
+ }
52
+ }
@@ -0,0 +1,2 @@
1
+ // NOTE: 使用自定义组件库
2
+ declare const USE_HTML_COMPONENTS: boolean