Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
phobos-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
phobos-ui
Commits
780d4cd4
Commit
780d4cd4
authored
May 14, 2023
by
贾慧斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新转换脚本
parent
13e66719
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
uniappUtils.js
uniappUtils.js
+23
-8
No files found.
uniappUtils.js
View file @
780d4cd4
...
...
@@ -239,26 +239,41 @@ const traverseDirectory = async (dir, mapping, options) => {
// 复制 source 下所有文件到 temp
// await copyDir(`${sourcePath}`, `${tempPath}`);
await
copyDir
(
`
${
sourcePath
}
/views/home/`
,
`
${
tempPath
}
/pages/home`
);
await
copyDir
(
`
${
sourcePath
}
/components/`
,
`
${
tempPath
}
/components`
);
await
copyDir
(
`
${
sourcePath
}
/style/`
,
`
${
tempPath
}
/style`
);
await
copyDir
(
`
${
sourcePath
}
/assets/`
,
`
${
tempPath
}
/static`
);
await
copyDir
(
`
${
sourcePath
}
/filters/`
,
`
${
tempPath
}
/filters`
);
await
copyDir
(
`
${
sourcePath
}
/mixins/`
,
`
${
tempPath
}
/mixins`
);
// 首页 S
// await copyDir(`${sourcePath}/views/home/`, `${tempPath}/pages/home`);
// await copyDir(`${sourcePath}/views/orders/`, `${tempPath}/pages/orders`);
// await copyDir(`${sourcePath}/views/product/`, `${tempPath}/pages/product`);
// await copyDir(`${sourcePath}/components/`, `${tempPath}/components`);
// await copyDir(`${sourcePath}/style/`, `${tempPath}/style`);
// await copyDir(`${sourcePath}/assets/`, `${tempPath}/static`);
// await copyDir(`${sourcePath}/filters/`, `${tempPath}/filters`);
// await copyDir(`${sourcePath}/mixins/`, `${tempPath}/mixins`);
// await copyDir(`${sourcePath}/service/`, `${tempPath}/service`);
// await copyDir(`${sourcePath}/constants/`, `${tempPath}/constants`);
// await copyDir(`${sourcePath}/store/`, `${tempPath}/store`);
// await copyDir(`${sourcePath}/api/`, `${tempPath}/api`);
// await copyDir(`${sourcePath}/customize/`, `${tempPath}/customize`);
// 首页 E
await
copyDir
(
`
${
sourcePath
}
/views/address/`
,
`
${
tempPath
}
/pages/address`
);
await
copyDir
(
`
${
sourcePath
}
/api/`
,
`
${
tempPath
}
/api`
);
await
copyDir
(
`
${
sourcePath
}
/service/`
,
`
${
tempPath
}
/service`
);
await
copyDir
(
`
${
sourcePath
}
/constants/`
,
`
${
tempPath
}
/constants`
);
// 标签操作
const
mapping
=
{
"
<div
"
:
"
<view
"
,
"
</div
"
:
"
</view
"
,
"
<ul
"
:
"
<view
"
,
"
</ul
"
:
"
</view
"
,
"
<li
"
:
"
<view
"
,
"
</li>
"
:
"
</view>
"
,
"
@/assets/
"
:
"
@/static/
"
,
"
@/views/
"
:
"
@/pages/
"
,
"
<img
"
:
"
<image
"
};
const
options
=
{
extensions
:
[
"
.vue
"
]
extensions
:
[
"
.vue
"
,
"
.js
"
]
};
await
traverseDirectory
(
tempPath
,
mapping
,
options
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment