@spcsn/taro-helper 0.1.0
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 +174 -0
- package/README.md +25 -0
- package/dist/babelRegister.d.ts +10 -0
- package/dist/babelRegister.js +42 -0
- package/dist/babelRegister.js.map +1 -0
- package/dist/constants.d.ts +102 -0
- package/dist/constants.js +209 -0
- package/dist/constants.js.map +1 -0
- package/dist/dotenv.d.ts +7 -0
- package/dist/dotenv.js +92 -0
- package/dist/dotenv.js.map +1 -0
- package/dist/esbuild/index.d.ts +13 -0
- package/dist/esbuild/index.js +60 -0
- package/dist/esbuild/index.js.map +1 -0
- package/dist/esbuild/swc-plugin.d.ts +3 -0
- package/dist/esbuild/swc-plugin.js +33 -0
- package/dist/esbuild/swc-plugin.js.map +1 -0
- package/dist/esbuild/utils.d.ts +2 -0
- package/dist/esbuild/utils.js +16 -0
- package/dist/esbuild/utils.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/npm.d.ts +14 -0
- package/dist/npm.js +248 -0
- package/dist/npm.js.map +1 -0
- package/dist/swcRegister.d.ts +6 -0
- package/dist/swcRegister.js +27 -0
- package/dist/swcRegister.js.map +1 -0
- package/dist/terminal.d.ts +12 -0
- package/dist/terminal.js +23 -0
- package/dist/terminal.js.map +1 -0
- package/dist/utils.d.ts +86 -0
- package/dist/utils.js +697 -0
- package/dist/utils.js.map +1 -0
- package/index.js +3 -0
- package/package.json +70 -0
- package/swc/.gitkeep +0 -0
- package/swc/swc_plugin_compile_mode.wasm +0 -0
- package/swc/swc_plugin_compile_mode_pre_process.wasm +0 -0
- package/swc/swc_plugin_define_config.wasm +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 O2Team
|
|
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.
|
|
22
|
+
|
|
23
|
+
========================================================================
|
|
24
|
+
|
|
25
|
+
MIT (react-devtools):
|
|
26
|
+
The following files embed [react-devtools](https://github.com/facebook/react) MIT:
|
|
27
|
+
`/packages/taro-plugin-react-devtools/src/backend/index.js`
|
|
28
|
+
See `/LICENSE` for details of the license.
|
|
29
|
+
|
|
30
|
+
==================
|
|
31
|
+
|
|
32
|
+
MIT (vue-devtools):
|
|
33
|
+
The following files embed [vue-devtools](https://github.com/vuejs/devtools) MIT:
|
|
34
|
+
`/packages/taro-plugin-vue-devtools/src/backend/*`
|
|
35
|
+
See `/LICENSE` for details of the license.
|
|
36
|
+
|
|
37
|
+
==================
|
|
38
|
+
|
|
39
|
+
MIT (vite):
|
|
40
|
+
The following files embed [vite](https://github.com/vitejs/vite) MIT:
|
|
41
|
+
`/packages/taro-webpack5-prebundle/src/prebundle/scanImport.ts`,
|
|
42
|
+
`/packages/taro-webpack5-prebundle/src/prebundle/bundle.ts`,
|
|
43
|
+
`/packages/taro-webpack5-prebundle/src/h5.ts`,
|
|
44
|
+
`/packages/taro-webpack5-prebundle/src/min.ts`
|
|
45
|
+
See `/LICENSE` for details of the license.
|
|
46
|
+
|
|
47
|
+
==================
|
|
48
|
+
|
|
49
|
+
MIT (webpack):
|
|
50
|
+
The following files embed [webpack](https://github.com/webpack/webpack) MIT:
|
|
51
|
+
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerEntryModule.ts`,
|
|
52
|
+
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerPlugin.ts`,
|
|
53
|
+
`/packages/taro-webpack5-prebundle/src/webpack/TaroContainerReferencePlugin.ts`,
|
|
54
|
+
`/packages/taro-webpack5-prebundle/src/webpack/TaroModuleFederationPlugin.ts`
|
|
55
|
+
See `/LICENSE` for details of the license.
|
|
56
|
+
|
|
57
|
+
==================
|
|
58
|
+
|
|
59
|
+
MIT (sizzle):
|
|
60
|
+
The following files embed [sizzle](https://github.com/jquery/sizzle) MIT:
|
|
61
|
+
`/packages/taro-extends/src/jquery/sizzle.js`
|
|
62
|
+
See `/LICENSE.txt` for details of the license.
|
|
63
|
+
|
|
64
|
+
==================
|
|
65
|
+
|
|
66
|
+
MIT (zepto):
|
|
67
|
+
The following files embed [zepto](https://github.com/madrobby/zepto) MIT:
|
|
68
|
+
`/packages/taro-extends/src/jquery/zepto.js`,
|
|
69
|
+
`/packages/taro-extends/src/jquery/event.js`
|
|
70
|
+
See `/MIT-LICENSE` for details of the license.
|
|
71
|
+
|
|
72
|
+
==================
|
|
73
|
+
|
|
74
|
+
MIT (css-to-react-native):
|
|
75
|
+
The following files embed [css-to-react-native](https://github.com/styled-components/css-to-react-native) MIT:
|
|
76
|
+
`/packages/css-to-react-native/src/css-to-react-native/*`
|
|
77
|
+
See `/LICENSE.md` for details of the license.
|
|
78
|
+
|
|
79
|
+
==================
|
|
80
|
+
|
|
81
|
+
MIT (reactify-wc):
|
|
82
|
+
The following files embed [reactify-wc](https://github.com/BBKolton/reactify-wc) MIT:
|
|
83
|
+
`/packages/taro-components-library-react/src/component-lib/reactify-wc.ts`
|
|
84
|
+
See `/LICENSE` for details of the license.
|
|
85
|
+
|
|
86
|
+
==================
|
|
87
|
+
|
|
88
|
+
MIT (ant-design-mobile-rn):
|
|
89
|
+
The following files embed [ant-design-mobile-rn](https://github.com/ant-design/ant-design-mobile-rn) MIT:
|
|
90
|
+
`/packages/taro-components-rn/src/components/Swiper/carousel.tsx`
|
|
91
|
+
See `/LICENSE` for details of the license.
|
|
92
|
+
|
|
93
|
+
==================
|
|
94
|
+
|
|
95
|
+
MIT (react-wx-images-viewer):
|
|
96
|
+
The following files embed [react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer) MIT:
|
|
97
|
+
`/packages/taro-h5/src/api/media/image/previewImage.ts`
|
|
98
|
+
See `/LICENSE` for details of the license.
|
|
99
|
+
|
|
100
|
+
==================
|
|
101
|
+
|
|
102
|
+
MIT (webpack-contrib/css-loader):
|
|
103
|
+
The following files embed [webpack-contrib/css-loader](https://github.com/webpack-contrib/css-loader) MIT:
|
|
104
|
+
`/packages/taro-rn-style-transformer/src/utils/index.ts`
|
|
105
|
+
See `/LICENSE` for details of the license.
|
|
106
|
+
|
|
107
|
+
==================
|
|
108
|
+
|
|
109
|
+
MIT (react-native):
|
|
110
|
+
The following files embed [react-native](https://github.com/facebook/react-native) MIT:
|
|
111
|
+
`/packages/taro-rn-style-transformer/src/transforms/StyleSheet/*`
|
|
112
|
+
See `/LICENSE` for details of the license.
|
|
113
|
+
|
|
114
|
+
==================
|
|
115
|
+
|
|
116
|
+
MIT (myrne/performance-now):
|
|
117
|
+
The following files embed [myrne/performance-now](https://github.com/myrne/performance-now) MIT:
|
|
118
|
+
`/packages/taro-runtime/src/bom/raf.ts`
|
|
119
|
+
See `/LICENSE` for details of the license.
|
|
120
|
+
|
|
121
|
+
==================
|
|
122
|
+
|
|
123
|
+
Apache (chameleon-api):
|
|
124
|
+
The following files embed [chameleon-api](https://github.com/chameleon-team/chameleon-api) Apache:
|
|
125
|
+
`/packages/taro-h5/src/api/device/clipboard.ts`
|
|
126
|
+
|
|
127
|
+
==================
|
|
128
|
+
|
|
129
|
+
MIT (uni-app):
|
|
130
|
+
The following files embed [uni-app](https://github.com/dcloudio/uni-app) MIT:
|
|
131
|
+
`/packages/taro-components-rn/src/components/Video/index.tsx`
|
|
132
|
+
See `/LICENSE` for details of the license.
|
|
133
|
+
|
|
134
|
+
==================
|
|
135
|
+
|
|
136
|
+
MIT (miniprogram-render):
|
|
137
|
+
The following files embed [miniprogram-render](https://github.com/Tencent/kbone) MIT:
|
|
138
|
+
`/packages/taro-plugin-http/src/runtime/Cookie.ts`
|
|
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 (weui):
|
|
158
|
+
The following files embed [weui](https://github.com/Tencent/weui) MIT:
|
|
159
|
+
`/packages/taro-components/src/components/*.scss`
|
|
160
|
+
See `/LICENSE.txt` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
Apache-2.0 (intersection-observer):
|
|
165
|
+
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
166
|
+
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
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/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Taro Helper
|
|
2
|
+
|
|
3
|
+
Taro 编译时工具库,主要供 CLI、编译器插件使用
|
|
4
|
+
|
|
5
|
+
tips:
|
|
6
|
+
|
|
7
|
+
执行 `build` 命令时,会把 swc-backup 文件夹里的 `.wasm` 文件移动到 swc 文件夹中,目的是为了不关注 SWC 插件的开发者无需配置 Rust 环境。但如何开发者需要修改 SWC 插件,请参考 CONTRIBUTING.md 文档中的 Rust 部分进行开发调试。
|
|
8
|
+
|
|
9
|
+
## 项目结构
|
|
10
|
+
|
|
11
|
+
``` plaintext
|
|
12
|
+
.
|
|
13
|
+
├── __tests__ # 单测
|
|
14
|
+
├── babelRegister.ts # babel register,已过时
|
|
15
|
+
├── constants.ts # 编译时常量
|
|
16
|
+
├── esbuild # esbuild 相关工具
|
|
17
|
+
│ ├── index.ts
|
|
18
|
+
│ ├── swc-plugin.ts
|
|
19
|
+
│ └── utils.ts
|
|
20
|
+
├── index.ts
|
|
21
|
+
├── npm.ts # 依赖项管理工具
|
|
22
|
+
├── swcRegister.ts # swc register,通常用于加载项目的配置文件,如 app.config.js
|
|
23
|
+
├── terminal.ts # 终端 Terminal 工具集
|
|
24
|
+
└── utils.ts # 工具集
|
|
25
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { parse, PluginItem } from '@babel/core';
|
|
2
|
+
/**
|
|
3
|
+
* Inject `defineAppConfig` and `definePageConfig`
|
|
4
|
+
* require header at the top of a config file,
|
|
5
|
+
* without the need to specifically require them
|
|
6
|
+
* if they are used
|
|
7
|
+
*/
|
|
8
|
+
export declare function injectDefineConfigHeader(babel: {
|
|
9
|
+
parse: typeof parse;
|
|
10
|
+
}): PluginItem;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.injectDefineConfigHeader = injectDefineConfigHeader;
|
|
4
|
+
/**
|
|
5
|
+
* Inject `defineAppConfig` and `definePageConfig`
|
|
6
|
+
* require header at the top of a config file,
|
|
7
|
+
* without the need to specifically require them
|
|
8
|
+
* if they are used
|
|
9
|
+
*/
|
|
10
|
+
function injectDefineConfigHeader(babel) {
|
|
11
|
+
const appConfig = 'function defineAppConfig(config) { return config }';
|
|
12
|
+
const pageConfig = 'function definePageConfig(config) { return config }';
|
|
13
|
+
const importNative = "function importNativeComponent(path = '', name = '', exportName = '') { return name }";
|
|
14
|
+
const prependHeader = (nodePath, header) => {
|
|
15
|
+
const parsedHeader = babel.parse(header, { filename: '' })?.program.body[0];
|
|
16
|
+
nodePath.node.body.unshift(parsedHeader);
|
|
17
|
+
};
|
|
18
|
+
const enterHandler = (nodePath) => {
|
|
19
|
+
const { scope, node } = nodePath;
|
|
20
|
+
scope.traverse(node, {
|
|
21
|
+
CallExpression(p) {
|
|
22
|
+
const callee = p.node.callee;
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
switch (callee.name) {
|
|
25
|
+
case 'defineAppConfig':
|
|
26
|
+
return prependHeader(nodePath, appConfig);
|
|
27
|
+
case 'definePageConfig':
|
|
28
|
+
return prependHeader(nodePath, pageConfig);
|
|
29
|
+
case 'importNativeComponent':
|
|
30
|
+
return prependHeader(nodePath, importNative);
|
|
31
|
+
default:
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
visitor: {
|
|
38
|
+
Program: { enter: enterHandler },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=babelRegister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babelRegister.js","sourceRoot":"","sources":["../src/babelRegister.ts"],"names":[],"mappings":";;AAQA,4DAmCC;AAzCD;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,KAA8B;IACrE,MAAM,SAAS,GAAG,oDAAoD,CAAC;IACvE,MAAM,UAAU,GAAG,qDAAqD,CAAC;IACzE,MAAM,YAAY,GAAG,uFAAuF,CAAC;IAE7G,MAAM,aAAa,GAAG,CAAC,QAAuB,EAAE,MAAc,EAAE,EAAE;QAChE,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,CAAC,QAAuB,EAAE,EAAE;QAC/C,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QAEjC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE;YACnB,cAAc,CAAC,CAAC;gBACd,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC7B,aAAa;gBACb,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;oBACpB,KAAK,iBAAiB;wBACpB,OAAO,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;oBAC5C,KAAK,kBAAkB;wBACrB,OAAO,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;oBAC7C,KAAK,uBAAuB;wBAC1B,OAAO,aAAa,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;oBAC/C,QAAQ;gBACV,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACL,OAAO,EAAE;YACP,OAAO,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;SACjC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { chalk } from './terminal';
|
|
2
|
+
export declare const PLATFORMS: any;
|
|
3
|
+
export declare const enum processTypeEnum {
|
|
4
|
+
START = "start",
|
|
5
|
+
CREATE = "create",
|
|
6
|
+
COMPILE = "compile",
|
|
7
|
+
CONVERT = "convert",
|
|
8
|
+
COPY = "copy",
|
|
9
|
+
GENERATE = "generate",
|
|
10
|
+
MODIFY = "modify",
|
|
11
|
+
ERROR = "error",
|
|
12
|
+
WARNING = "warning",
|
|
13
|
+
UNLINK = "unlink",
|
|
14
|
+
REFERENCE = "reference",
|
|
15
|
+
REMIND = "remind"
|
|
16
|
+
}
|
|
17
|
+
export interface IProcessTypeMap {
|
|
18
|
+
[key: string]: {
|
|
19
|
+
name: string;
|
|
20
|
+
color: string | chalk.Chalk;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const processTypeMap: IProcessTypeMap;
|
|
24
|
+
export declare const CSS_EXT: string[];
|
|
25
|
+
export declare const SCSS_EXT: string[];
|
|
26
|
+
export declare const JS_EXT: string[];
|
|
27
|
+
export declare const TS_EXT: string[];
|
|
28
|
+
export declare const UX_EXT: string[];
|
|
29
|
+
export declare const SCRIPT_EXT: string[];
|
|
30
|
+
export declare const VUE_EXT: string[];
|
|
31
|
+
export declare const REG_JS: RegExp;
|
|
32
|
+
export declare const REG_SCRIPT: RegExp;
|
|
33
|
+
export declare const REG_TYPESCRIPT: RegExp;
|
|
34
|
+
export declare const REG_SCRIPTS: RegExp;
|
|
35
|
+
export declare const REG_VUE: RegExp;
|
|
36
|
+
export declare const REG_SASS: RegExp;
|
|
37
|
+
export declare const REG_SASS_SASS: RegExp;
|
|
38
|
+
export declare const REG_SASS_SCSS: RegExp;
|
|
39
|
+
export declare const REG_LESS: RegExp;
|
|
40
|
+
export declare const REG_STYLUS: RegExp;
|
|
41
|
+
export declare const REG_STYLE: RegExp;
|
|
42
|
+
export declare const REG_CSS: RegExp;
|
|
43
|
+
export declare const REG_MEDIA: RegExp;
|
|
44
|
+
export declare const REG_IMAGE: RegExp;
|
|
45
|
+
export declare const REG_FONT: RegExp;
|
|
46
|
+
export declare const REG_JSON: RegExp;
|
|
47
|
+
export declare const REG_UX: RegExp;
|
|
48
|
+
export declare const REG_TEMPLATE: RegExp;
|
|
49
|
+
export declare const REG_WXML_IMPORT: RegExp;
|
|
50
|
+
export declare const REG_URL: RegExp;
|
|
51
|
+
export declare const REG_TARO_SCOPED_PACKAGE: RegExp;
|
|
52
|
+
export declare const REG_CSS_IMPORT: RegExp;
|
|
53
|
+
export declare const NODE_MODULES = "node_modules";
|
|
54
|
+
export declare const REG_NODE_MODULES: RegExp;
|
|
55
|
+
export declare const REG_NODE_MODULES_DIR: RegExp;
|
|
56
|
+
export declare const PROJECT_CONFIG = "config/index";
|
|
57
|
+
export declare const DEVICE_RATIO: {
|
|
58
|
+
640: number;
|
|
59
|
+
750: number;
|
|
60
|
+
828: number;
|
|
61
|
+
};
|
|
62
|
+
export declare const FILE_PROCESSOR_MAP: {
|
|
63
|
+
'.js': string;
|
|
64
|
+
'.scss': string;
|
|
65
|
+
'.sass': string;
|
|
66
|
+
'.less': string;
|
|
67
|
+
'.styl': string;
|
|
68
|
+
};
|
|
69
|
+
export declare const UPDATE_PACKAGE_LIST: string[];
|
|
70
|
+
export declare enum META_TYPE {
|
|
71
|
+
ENTRY = "ENTRY",
|
|
72
|
+
PAGE = "PAGE",
|
|
73
|
+
COMPONENT = "COMPONENT",
|
|
74
|
+
NORMAL = "NORMAL",
|
|
75
|
+
STATIC = "STATIC",
|
|
76
|
+
CONFIG = "CONFIG",
|
|
77
|
+
EXPORTS = "EXPORTS"
|
|
78
|
+
}
|
|
79
|
+
export declare const taroJsMiniComponentsPath = "@spcsn/taro-components/mini";
|
|
80
|
+
export declare const taroJsComponents = "@spcsn/taro-components";
|
|
81
|
+
export declare const taroJsQuickAppComponents = "@spcsn/taro-components-qa";
|
|
82
|
+
export declare const taroJsFramework = "@spcsn/taro";
|
|
83
|
+
export declare const taroJsRedux = "@spcsn/taro-redux";
|
|
84
|
+
export declare const taroJsMobx = "@spcsn/taro-mobx";
|
|
85
|
+
export declare const taroJsMobxCommon = "@spcsn/taro-mobx-common";
|
|
86
|
+
export declare const DEVICE_RATIO_NAME = "deviceRatio";
|
|
87
|
+
export declare const isWindows: boolean;
|
|
88
|
+
export declare const DEFAULT_TEMPLATE_SRC = "github:NervJS/taro-project-templates#v4.2";
|
|
89
|
+
export declare const DEFAULT_TEMPLATE_SRC_GITEE = "direct:https://gitee.com/o2team/taro-project-templates.git#v4.2";
|
|
90
|
+
export declare const TARO_CONFIG_FOLDER = ".taro4.2";
|
|
91
|
+
export declare const TARO_BASE_CONFIG = "index.json";
|
|
92
|
+
export declare const TARO_GLOBAL_CONFIG_DIR = ".taro-global-config";
|
|
93
|
+
export declare const TARO_GLOBAL_CONFIG_FILE = "index.json";
|
|
94
|
+
export declare const OUTPUT_DIR = "dist";
|
|
95
|
+
export declare const SOURCE_DIR = "src";
|
|
96
|
+
export declare const TEMP_DIR = ".temp";
|
|
97
|
+
export declare const NPM_DIR = "npm";
|
|
98
|
+
export declare const ENTRY = "app";
|
|
99
|
+
export declare enum FRAMEWORK_MAP {
|
|
100
|
+
REACT = "react"
|
|
101
|
+
}
|
|
102
|
+
export declare const defaultMainFields: string[];
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DEFAULT_TEMPLATE_SRC = exports.isWindows = exports.DEVICE_RATIO_NAME = exports.taroJsMobxCommon = exports.taroJsMobx = exports.taroJsRedux = exports.taroJsFramework = exports.taroJsQuickAppComponents = exports.taroJsComponents = exports.taroJsMiniComponentsPath = exports.META_TYPE = exports.UPDATE_PACKAGE_LIST = exports.FILE_PROCESSOR_MAP = exports.DEVICE_RATIO = exports.PROJECT_CONFIG = exports.REG_NODE_MODULES_DIR = exports.REG_NODE_MODULES = exports.NODE_MODULES = exports.REG_CSS_IMPORT = exports.REG_TARO_SCOPED_PACKAGE = exports.REG_URL = exports.REG_WXML_IMPORT = exports.REG_TEMPLATE = exports.REG_UX = exports.REG_JSON = exports.REG_FONT = exports.REG_IMAGE = exports.REG_MEDIA = exports.REG_CSS = exports.REG_STYLE = exports.REG_STYLUS = exports.REG_LESS = exports.REG_SASS_SCSS = exports.REG_SASS_SASS = exports.REG_SASS = exports.REG_VUE = exports.REG_SCRIPTS = exports.REG_TYPESCRIPT = exports.REG_SCRIPT = exports.REG_JS = exports.VUE_EXT = exports.SCRIPT_EXT = exports.UX_EXT = exports.TS_EXT = exports.JS_EXT = exports.SCSS_EXT = exports.CSS_EXT = exports.processTypeMap = exports.processTypeEnum = exports.PLATFORMS = void 0;
|
|
37
|
+
exports.defaultMainFields = exports.FRAMEWORK_MAP = exports.ENTRY = exports.NPM_DIR = exports.TEMP_DIR = exports.SOURCE_DIR = exports.OUTPUT_DIR = exports.TARO_GLOBAL_CONFIG_FILE = exports.TARO_GLOBAL_CONFIG_DIR = exports.TARO_BASE_CONFIG = exports.TARO_CONFIG_FOLDER = exports.DEFAULT_TEMPLATE_SRC_GITEE = void 0;
|
|
38
|
+
const os = __importStar(require("node:os"));
|
|
39
|
+
const terminal_1 = require("./terminal");
|
|
40
|
+
// eslint-disable-next-line dot-notation
|
|
41
|
+
exports.PLATFORMS = (global['PLATFORMS'] = global['PLATFORMS'] || {});
|
|
42
|
+
var processTypeEnum;
|
|
43
|
+
(function (processTypeEnum) {
|
|
44
|
+
processTypeEnum["START"] = "start";
|
|
45
|
+
processTypeEnum["CREATE"] = "create";
|
|
46
|
+
processTypeEnum["COMPILE"] = "compile";
|
|
47
|
+
processTypeEnum["CONVERT"] = "convert";
|
|
48
|
+
processTypeEnum["COPY"] = "copy";
|
|
49
|
+
processTypeEnum["GENERATE"] = "generate";
|
|
50
|
+
processTypeEnum["MODIFY"] = "modify";
|
|
51
|
+
processTypeEnum["ERROR"] = "error";
|
|
52
|
+
processTypeEnum["WARNING"] = "warning";
|
|
53
|
+
processTypeEnum["UNLINK"] = "unlink";
|
|
54
|
+
processTypeEnum["REFERENCE"] = "reference";
|
|
55
|
+
processTypeEnum["REMIND"] = "remind";
|
|
56
|
+
})(processTypeEnum || (exports.processTypeEnum = processTypeEnum = {}));
|
|
57
|
+
exports.processTypeMap = {
|
|
58
|
+
["create" /* processTypeEnum.CREATE */]: {
|
|
59
|
+
name: '创建',
|
|
60
|
+
color: 'cyan',
|
|
61
|
+
},
|
|
62
|
+
["compile" /* processTypeEnum.COMPILE */]: {
|
|
63
|
+
name: '编译',
|
|
64
|
+
color: 'green',
|
|
65
|
+
},
|
|
66
|
+
["convert" /* processTypeEnum.CONVERT */]: {
|
|
67
|
+
name: '转换',
|
|
68
|
+
color: terminal_1.chalk.rgb(255, 136, 0),
|
|
69
|
+
},
|
|
70
|
+
["copy" /* processTypeEnum.COPY */]: {
|
|
71
|
+
name: '拷贝',
|
|
72
|
+
color: 'magenta',
|
|
73
|
+
},
|
|
74
|
+
["generate" /* processTypeEnum.GENERATE */]: {
|
|
75
|
+
name: '生成',
|
|
76
|
+
color: 'blue',
|
|
77
|
+
},
|
|
78
|
+
["modify" /* processTypeEnum.MODIFY */]: {
|
|
79
|
+
name: '修改',
|
|
80
|
+
color: 'yellow',
|
|
81
|
+
},
|
|
82
|
+
["error" /* processTypeEnum.ERROR */]: {
|
|
83
|
+
name: '错误',
|
|
84
|
+
color: 'red',
|
|
85
|
+
},
|
|
86
|
+
["warning" /* processTypeEnum.WARNING */]: {
|
|
87
|
+
name: '警告',
|
|
88
|
+
color: 'yellowBright',
|
|
89
|
+
},
|
|
90
|
+
["unlink" /* processTypeEnum.UNLINK */]: {
|
|
91
|
+
name: '删除',
|
|
92
|
+
color: 'magenta',
|
|
93
|
+
},
|
|
94
|
+
["start" /* processTypeEnum.START */]: {
|
|
95
|
+
name: '启动',
|
|
96
|
+
color: 'green',
|
|
97
|
+
},
|
|
98
|
+
["reference" /* processTypeEnum.REFERENCE */]: {
|
|
99
|
+
name: '引用',
|
|
100
|
+
color: 'blue',
|
|
101
|
+
},
|
|
102
|
+
["remind" /* processTypeEnum.REMIND */]: {
|
|
103
|
+
name: '提示',
|
|
104
|
+
color: 'green',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
exports.CSS_EXT = ['.css', '.scss', '.sass', '.less', '.styl', '.stylus', '.wxss', '.acss'];
|
|
108
|
+
exports.SCSS_EXT = ['.scss'];
|
|
109
|
+
exports.JS_EXT = ['.js', '.jsx'];
|
|
110
|
+
exports.TS_EXT = ['.ts', '.tsx'];
|
|
111
|
+
exports.UX_EXT = ['.ux'];
|
|
112
|
+
exports.SCRIPT_EXT = exports.JS_EXT.concat(exports.TS_EXT);
|
|
113
|
+
exports.VUE_EXT = ['.vue'];
|
|
114
|
+
exports.REG_JS = /\.m?js(\?.*)?$/;
|
|
115
|
+
exports.REG_SCRIPT = /\.m?(js|jsx)(\?.*)?$/;
|
|
116
|
+
exports.REG_TYPESCRIPT = /\.(tsx|ts)(\?.*)?$/;
|
|
117
|
+
exports.REG_SCRIPTS = /\.m?[tj]sx?$/i;
|
|
118
|
+
exports.REG_VUE = /\.vue$/i;
|
|
119
|
+
exports.REG_SASS = /\.(s[ac]ss)$/;
|
|
120
|
+
exports.REG_SASS_SASS = /\.sass$/;
|
|
121
|
+
exports.REG_SASS_SCSS = /\.scss$/;
|
|
122
|
+
exports.REG_LESS = /\.less$/;
|
|
123
|
+
exports.REG_STYLUS = /\.styl(us)?$/;
|
|
124
|
+
exports.REG_STYLE = /\.(css|scss|sass|less|styl|stylus|wxss|acss|ttss|jxss|qss)(\?.*)?$/;
|
|
125
|
+
exports.REG_CSS = /\.(css|qss|jxss|wxss|acss|ttss)(\?.*)?$/;
|
|
126
|
+
exports.REG_MEDIA = /\.(mp4|webm|ogg|mp3|m4a|wav|flac|aac)(\?.*)?$/;
|
|
127
|
+
exports.REG_IMAGE = /\.(png|jpe?g|gif|bpm|svg|webp)(\?.*)?$/;
|
|
128
|
+
exports.REG_FONT = /\.(woff2?|eot|ttf|otf)(\?.*)?$/;
|
|
129
|
+
exports.REG_JSON = /\.json(\?.*)?$/;
|
|
130
|
+
exports.REG_UX = /\.ux(\?.*)?$/;
|
|
131
|
+
exports.REG_TEMPLATE = /\.(hxml|wxml|axml|ttml|qml|swan|jxml)(\?.*)?$/;
|
|
132
|
+
exports.REG_WXML_IMPORT = /<import(.*)?src=(?:(?:'([^']*)')|(?:"([^"]*)"))/gi;
|
|
133
|
+
exports.REG_URL = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
|
|
134
|
+
exports.REG_TARO_SCOPED_PACKAGE = /@tarojs[\\/][a-z]+/;
|
|
135
|
+
exports.REG_CSS_IMPORT = /@import (["'])(.+?)\1;/g;
|
|
136
|
+
exports.NODE_MODULES = 'node_modules';
|
|
137
|
+
exports.REG_NODE_MODULES = /node_modules/;
|
|
138
|
+
exports.REG_NODE_MODULES_DIR = /[\\/]node_modules[\\/]/gi;
|
|
139
|
+
exports.PROJECT_CONFIG = 'config/index';
|
|
140
|
+
exports.DEVICE_RATIO = {
|
|
141
|
+
640: 2.34 / 2,
|
|
142
|
+
750: 1,
|
|
143
|
+
828: 1.81 / 2,
|
|
144
|
+
};
|
|
145
|
+
exports.FILE_PROCESSOR_MAP = {
|
|
146
|
+
'.js': 'babel',
|
|
147
|
+
'.scss': 'sass',
|
|
148
|
+
'.sass': 'sass',
|
|
149
|
+
'.less': 'less',
|
|
150
|
+
'.styl': 'stylus',
|
|
151
|
+
};
|
|
152
|
+
exports.UPDATE_PACKAGE_LIST = [
|
|
153
|
+
'@spcsn/babel-plugin-transform-taroapi',
|
|
154
|
+
'@spcsn/babel-preset-taro',
|
|
155
|
+
'@spcsn/postcss-html-transform',
|
|
156
|
+
'@spcsn/postcss-plugin-constparse',
|
|
157
|
+
'@spcsn/postcss-pxtransform',
|
|
158
|
+
'@spcsn/taro-shared',
|
|
159
|
+
'@spcsn/taro',
|
|
160
|
+
'@spcsn/taro-cli',
|
|
161
|
+
'@spcsn/taro-api',
|
|
162
|
+
'@spcsn/taro-components',
|
|
163
|
+
'@spcsn/taro-helper',
|
|
164
|
+
'@spcsn/taro-react',
|
|
165
|
+
'@spcsn/taro-plugin-framework-react',
|
|
166
|
+
'@spcsn/taro-runner-utils',
|
|
167
|
+
'@spcsn/taro-runtime',
|
|
168
|
+
'@spcsn/taro-service',
|
|
169
|
+
'@spcsn/taro-plugin-platform-weapp',
|
|
170
|
+
'@spcsn/taro-vite-runner',
|
|
171
|
+
'@spcsn/taro-plugin-generator',
|
|
172
|
+
'@spcsn/taro-binding',
|
|
173
|
+
];
|
|
174
|
+
var META_TYPE;
|
|
175
|
+
(function (META_TYPE) {
|
|
176
|
+
META_TYPE["ENTRY"] = "ENTRY";
|
|
177
|
+
META_TYPE["PAGE"] = "PAGE";
|
|
178
|
+
META_TYPE["COMPONENT"] = "COMPONENT";
|
|
179
|
+
META_TYPE["NORMAL"] = "NORMAL";
|
|
180
|
+
META_TYPE["STATIC"] = "STATIC";
|
|
181
|
+
META_TYPE["CONFIG"] = "CONFIG";
|
|
182
|
+
META_TYPE["EXPORTS"] = "EXPORTS";
|
|
183
|
+
})(META_TYPE || (exports.META_TYPE = META_TYPE = {}));
|
|
184
|
+
exports.taroJsMiniComponentsPath = '@spcsn/taro-components/mini';
|
|
185
|
+
exports.taroJsComponents = '@spcsn/taro-components';
|
|
186
|
+
exports.taroJsQuickAppComponents = '@spcsn/taro-components-qa';
|
|
187
|
+
exports.taroJsFramework = '@spcsn/taro';
|
|
188
|
+
exports.taroJsRedux = '@spcsn/taro-redux';
|
|
189
|
+
exports.taroJsMobx = '@spcsn/taro-mobx';
|
|
190
|
+
exports.taroJsMobxCommon = '@spcsn/taro-mobx-common';
|
|
191
|
+
exports.DEVICE_RATIO_NAME = 'deviceRatio';
|
|
192
|
+
exports.isWindows = os.platform() === 'win32';
|
|
193
|
+
exports.DEFAULT_TEMPLATE_SRC = 'github:NervJS/taro-project-templates#v4.2';
|
|
194
|
+
exports.DEFAULT_TEMPLATE_SRC_GITEE = 'direct:https://gitee.com/o2team/taro-project-templates.git#v4.2';
|
|
195
|
+
exports.TARO_CONFIG_FOLDER = '.taro4.2';
|
|
196
|
+
exports.TARO_BASE_CONFIG = 'index.json';
|
|
197
|
+
exports.TARO_GLOBAL_CONFIG_DIR = '.taro-global-config';
|
|
198
|
+
exports.TARO_GLOBAL_CONFIG_FILE = 'index.json';
|
|
199
|
+
exports.OUTPUT_DIR = 'dist';
|
|
200
|
+
exports.SOURCE_DIR = 'src';
|
|
201
|
+
exports.TEMP_DIR = '.temp';
|
|
202
|
+
exports.NPM_DIR = 'npm';
|
|
203
|
+
exports.ENTRY = 'app';
|
|
204
|
+
var FRAMEWORK_MAP;
|
|
205
|
+
(function (FRAMEWORK_MAP) {
|
|
206
|
+
FRAMEWORK_MAP["REACT"] = "react";
|
|
207
|
+
})(FRAMEWORK_MAP || (exports.FRAMEWORK_MAP = FRAMEWORK_MAP = {}));
|
|
208
|
+
exports.defaultMainFields = ['browser', 'module', 'jsnext:main', 'main'];
|
|
209
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAE9B,yCAAmC;AAEnC,wCAAwC;AAC3B,QAAA,SAAS,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;AAE3E,IAAkB,eAajB;AAbD,WAAkB,eAAe;IAC/B,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACnB,CAAC,EAbiB,eAAe,+BAAf,eAAe,QAahC;AASY,QAAA,cAAc,GAAoB;IAC7C,uCAAwB,EAAE;QACxB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,MAAM;KACd;IACD,yCAAyB,EAAE;QACzB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,OAAO;KACf;IACD,yCAAyB,EAAE;QACzB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,gBAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;KAC9B;IACD,mCAAsB,EAAE;QACtB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,SAAS;KACjB;IACD,2CAA0B,EAAE;QAC1B,IAAI,EAAE,IAAI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IACvB,gCAAe,CAAA;AACjB,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAEY,QAAA,iBAAiB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC"}
|
package/dist/dotenv.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ConfigWithEnv {
|
|
2
|
+
env?: Record<string, unknown>;
|
|
3
|
+
}
|
|
4
|
+
export declare const formatPrefix: (prefixs?: string | string[]) => string[];
|
|
5
|
+
export declare const dotenvParse: (root: string, prefixs?: string | string[], mode?: string) => Record<string, string>;
|
|
6
|
+
export declare const patchEnv: (config: ConfigWithEnv, expandEnv: Record<string, string>) => {};
|
|
7
|
+
export {};
|