@aiot-toolkit/aiotpack 2.0.2-beta.7 → 2.0.2-beta.9
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/lib/compiler/javascript/JavascriptCompiler.js +3 -3
- package/lib/compiler/javascript/vela/utils/webpackLoader/extractMapData.d.ts +3 -0
- package/lib/compiler/javascript/vela/utils/webpackLoader/{splitMap.js → extractMapData.js} +2 -2
- package/lib/utils/ux/UxLoaderUtils.js +5 -5
- package/package.json +5 -5
- package/lib/compiler/javascript/vela/utils/webpackLoader/splitMap.d.ts +0 -3
|
@@ -77,10 +77,10 @@ class JavascriptCompiler {
|
|
|
77
77
|
module: {
|
|
78
78
|
rules: [
|
|
79
79
|
{
|
|
80
|
-
test: /\.
|
|
80
|
+
test: /\.ux$/,
|
|
81
81
|
use: [
|
|
82
82
|
{
|
|
83
|
-
loader: path_1.default.join(__dirname, '../javascript/vela/utils/webpackLoader/
|
|
83
|
+
loader: path_1.default.join(__dirname, '../javascript/vela/utils/webpackLoader/extractMapData.js')
|
|
84
84
|
}
|
|
85
85
|
]
|
|
86
86
|
}
|
|
@@ -111,7 +111,7 @@ class JavascriptCompiler {
|
|
|
111
111
|
// 判断devtool类型 inline-source-map时,添加第0列关系映射
|
|
112
112
|
if (devtool === 'inline-source-map') {
|
|
113
113
|
result.module.rules.unshift({
|
|
114
|
-
test: /\.
|
|
114
|
+
test: /\.ux$/,
|
|
115
115
|
use: [
|
|
116
116
|
{
|
|
117
117
|
loader: path_1.default.join(__dirname, '../javascript/vela/utils/webpackLoader/addColSourceMap.js')
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const fs_1 = __importDefault(require("fs"));
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
function
|
|
8
|
+
function extractMapData(source, map) {
|
|
9
9
|
const enterFilePath = this.resourcePath;
|
|
10
10
|
// 获取当前文件夹和文件名
|
|
11
11
|
const dirName = path_1.default.dirname(enterFilePath);
|
|
@@ -17,4 +17,4 @@ function splitMap(source, map) {
|
|
|
17
17
|
}
|
|
18
18
|
this.callback(null, source, map && JSON.parse(map));
|
|
19
19
|
}
|
|
20
|
-
exports.default =
|
|
20
|
+
exports.default = extractMapData;
|
|
@@ -115,16 +115,16 @@ class UxLoaderUtils {
|
|
|
115
115
|
? [
|
|
116
116
|
`${appImport.join('\n')}`,
|
|
117
117
|
`var $app_style$ = ${UxLoaderUtils.wrapStyle(JSON.stringify(appStyleTree), file, compilerOption)}`,
|
|
118
|
-
`var $app_script$ = ${UxLoaderUtils.handleScriptContent(false, appScriptTree)}
|
|
119
|
-
`$app_script$({}, $app_exports$, $app_require$)
|
|
118
|
+
`var $app_script$ = ${UxLoaderUtils.handleScriptContent(false, appScriptTree)}`,
|
|
119
|
+
`$app_script$({}, $app_exports$, $app_require$);`,
|
|
120
120
|
`$app_exports$.default.style = $app_style$;`,
|
|
121
121
|
`$app_exports$.default.manifest = ${manifestJson}`
|
|
122
122
|
]
|
|
123
123
|
: [
|
|
124
124
|
`${appImport.join('\n')}`,
|
|
125
|
-
`var $app_style$ = ${UxLoaderUtils.wrapStyle(JSON.stringify(appStyleTree), file, compilerOption)}
|
|
125
|
+
`var $app_style$ = ${UxLoaderUtils.wrapStyle(JSON.stringify(appStyleTree), file, compilerOption)}`,
|
|
126
126
|
`var $app_script$ = ${UxLoaderUtils.handleScriptContent(isPageUx, appScriptTree)}`,
|
|
127
|
-
`var $app_template$ = ${UxLoaderUtils.wrapTempalte(appTemplateTree, file, compilerOption)}
|
|
127
|
+
`var $app_template$ = ${UxLoaderUtils.wrapTempalte(appTemplateTree, file, compilerOption)}`,
|
|
128
128
|
`${UxLoaderUtils.getReturnType(isPageUx)} function ($app_exports$) {`,
|
|
129
129
|
`$app_script$({}, $app_exports$, $app_require$);`,
|
|
130
130
|
`$app_exports$.default.template = $app_template$;`,
|
|
@@ -147,7 +147,7 @@ class UxLoaderUtils {
|
|
|
147
147
|
content: code
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
path: FileUtil_1.default.updatePath(filePath, `${name}.
|
|
150
|
+
path: FileUtil_1.default.updatePath(filePath, `${name}${ext}.map`),
|
|
151
151
|
content: sourceMap.toString()
|
|
152
152
|
},
|
|
153
153
|
...ImageResources
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiot-toolkit/aiotpack",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.9",
|
|
4
4
|
"description": "The process tool for packaging aiot projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aiotpack"
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"test": "node ./__tests__/aiotpack.test.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@aiot-toolkit/generator": "2.0.2-beta.
|
|
23
|
-
"@aiot-toolkit/parser": "2.0.2-beta.
|
|
22
|
+
"@aiot-toolkit/generator": "2.0.2-beta.9",
|
|
23
|
+
"@aiot-toolkit/parser": "2.0.2-beta.9",
|
|
24
24
|
"@hap-toolkit/aaptjs": "^2.0.0",
|
|
25
25
|
"babel-loader": "^9.1.3",
|
|
26
26
|
"del": "^4.1.0",
|
|
27
27
|
"fast-glob": "^3.3.2",
|
|
28
|
-
"file-lane": "2.0.2-beta.
|
|
28
|
+
"file-lane": "2.0.2-beta.9",
|
|
29
29
|
"file-loader": "^6.2.0",
|
|
30
30
|
"fs-extra": "^11.2.0",
|
|
31
31
|
"jsrsasign": "^7.2.2",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"@types/jsrsasign": "^10.5.12",
|
|
42
42
|
"@types/webpack-sources": "^3.2.3"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "19f19b20ca63800f2403cc89d9a8edb6a102a765"
|
|
45
45
|
}
|