@tarojs/plugin-platform-h5 4.0.1 → 4.0.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 +8 -8
- package/build/utils/ast.ts +12 -2
- package/dist/index.d.ts +5 -23
- package/dist/index.js +143 -420
- package/dist/index.js.map +1 -1
- package/dist/program.d.ts +25 -0
- package/dist/runtime/apis/index.d.ts +5 -5
- package/dist/runtime/apis/index.js +1 -1
- package/dist/runtime/apis/taro.d.ts +1 -1
- package/dist/runtime/components/index.d.ts +1 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +16 -25
- package/dist/dist/definition.json.d.ts +0 -3684
- package/dist/dist/definition.json.js +0 -4
- package/dist/dist/definition.json.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -154,15 +154,8 @@ See `/LICENSE` for details of the license.
|
|
|
154
154
|
|
|
155
155
|
==================
|
|
156
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.
|
|
161
|
-
|
|
162
|
-
==================
|
|
163
|
-
|
|
164
157
|
MIT (weui):
|
|
165
|
-
The following files embed [
|
|
158
|
+
The following files embed [weui](https://github.com/Tencent/weui) MIT:
|
|
166
159
|
`/packages/taro-components/src/components/*.scss`
|
|
167
160
|
See `/LICENSE.txt` for details of the license.
|
|
168
161
|
|
|
@@ -172,3 +165,10 @@ Apache-2.0 (intersection-observer):
|
|
|
172
165
|
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
173
166
|
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
174
167
|
See `/LICENSE.txt` for details of the license.
|
|
168
|
+
|
|
169
|
+
==================
|
|
170
|
+
|
|
171
|
+
MIT (babel-plugin-jsx-dom-expressions):
|
|
172
|
+
The following files embed [babel-plugin-jsx-dom-expressions](https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions) MIT:
|
|
173
|
+
`/packages/babel-plugin-transform-solid-jsx/src/*`
|
|
174
|
+
See `/LICENSE` for details of the license.
|
package/build/utils/ast.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import path from 'path'
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
|
|
2
3
|
import ts from 'typescript'
|
|
3
4
|
|
|
4
5
|
export interface DocEntry {
|
|
@@ -17,6 +18,15 @@ export interface DocEntry {
|
|
|
17
18
|
symbol?: DocEntry
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
export function pathsAreEqual (path1: string, path2: string) {
|
|
22
|
+
path1 = path.resolve(path1)
|
|
23
|
+
path2 = path.resolve(path2)
|
|
24
|
+
if (process.platform === 'win32') {
|
|
25
|
+
return path1.toLowerCase() === path2.toLowerCase()
|
|
26
|
+
}
|
|
27
|
+
return path1 === path2
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
export function generateDocumentation (
|
|
21
31
|
filepaths: string[],
|
|
22
32
|
options: ts.CompilerOptions,
|
|
@@ -31,7 +41,7 @@ export function generateDocumentation (
|
|
|
31
41
|
|
|
32
42
|
for (const sourceFile of program.getSourceFiles()) {
|
|
33
43
|
if (param.withDeclaration !== false || !sourceFile.isDeclarationFile) {
|
|
34
|
-
// 规范化路径,修复window环境无法生成definition.json文件
|
|
44
|
+
// Note: 规范化路径,修复window环境无法生成definition.json文件
|
|
35
45
|
const normalSrcFile = path.normalize(sourceFile.fileName)
|
|
36
46
|
if ((param.mapAll === true && filepaths.includes(normalSrcFile)) || normalSrcFile === path.normalize(filepaths[0])) {
|
|
37
47
|
ts.forEachChild(sourceFile, (n) => visitAST(n, output))
|
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare class H5 extends TaroPlatformWeb {
|
|
5
|
-
platform: string;
|
|
6
|
-
runtimePath: string[] | string;
|
|
7
|
-
constructor(ctx: IPluginContext, config: TConfig);
|
|
8
|
-
get framework(): "vue3" | "react" | "preact" | "nerv" | "vue";
|
|
9
|
-
get useHtmlComponents(): boolean;
|
|
10
|
-
get useDeprecatedAdapterComponent(): boolean;
|
|
11
|
-
get apiLibrary(): string;
|
|
12
|
-
get aliasFramework(): string;
|
|
13
|
-
get componentLibrary(): string;
|
|
14
|
-
get componentAdapter(): string;
|
|
15
|
-
get routerLibrary(): string;
|
|
16
|
-
get libraryDefinition(): string;
|
|
17
|
-
/**
|
|
18
|
-
* 修改 Webpack 配置
|
|
19
|
-
*/
|
|
20
|
-
modifyWebpackConfig(): void;
|
|
21
|
-
}
|
|
1
|
+
import H5 from './program';
|
|
2
|
+
import type { IPluginContext } from '@tarojs/service';
|
|
3
|
+
export { H5 };
|
|
22
4
|
declare const _default: (ctx: IPluginContext) => void;
|
|
23
|
-
|
|
24
|
-
export
|
|
5
|
+
export default _default;
|
|
6
|
+
export * from './utils';
|