ohos-router 1.0.9 → 1.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/package.json +1 -1
- package/router.ts +4 -4
package/package.json
CHANGED
package/router.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {HvigorNode, FileUtil} from '@ohos/hvigor';
|
|
2
2
|
|
|
3
3
|
let entryModulePath = ""
|
|
4
4
|
let entryUpperCaseNameArray: string[] = []
|
|
@@ -311,8 +311,8 @@ function writeBuildProfile(childNode: HvigorNode) {
|
|
|
311
311
|
let ohPackageData = FileUtil.readJson5(ohPackagePath)
|
|
312
312
|
dependenciesJSONParse(JSON.stringify(ohPackageData))
|
|
313
313
|
buildProfilePath = FileUtil.pathResolve(childNode.getNodePath(), "build-profile.json5")
|
|
314
|
-
let buildProfileData = FileUtil.
|
|
315
|
-
buildProfileJSONParse(
|
|
314
|
+
let buildProfileData = FileUtil.readFileSync(buildProfilePath)
|
|
315
|
+
buildProfileJSONParse(buildProfileData.toString())
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
function getNowTime() {
|
|
@@ -486,6 +486,6 @@ function addPropertyToBeginning<T extends object, K extends string, V>(
|
|
|
486
486
|
key: K,
|
|
487
487
|
value: V
|
|
488
488
|
): T & { [P in K]: V } {
|
|
489
|
-
const newObj = {
|
|
489
|
+
const newObj = {[key]: value, ...obj} as T & { [P in K]: V };
|
|
490
490
|
return newObj;
|
|
491
491
|
}
|