Skip to content

Commit cb327a1

Browse files
authored
fix: delete useless comp entries and fix theme building errors (#2322)
1 parent 2042709 commit cb327a1

File tree

4 files changed

+2
-32
lines changed

4 files changed

+2
-32
lines changed

examples/sites/demos/pc/menus.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export const cmpMenus = [
104104
{ 'nameCn': '锚点', 'name': 'Anchor', 'key': 'anchor' },
105105
{ 'nameCn': '面包屑', 'name': 'Breadcrumb', 'key': 'breadcrumb' },
106106
{ 'nameCn': '下拉菜单', 'name': 'Dropdown', 'key': 'dropdown' },
107-
{ 'nameCn': '收藏夹菜单', 'name': 'LinkMenu', 'key': 'link-menu' },
108107
{ 'nameCn': '导航菜单', 'name': 'NavMenu', 'key': 'nav-menu' },
109108
{ 'nameCn': '分页', 'name': 'Pager', 'key': 'pager' },
110109
{ 'nameCn': '步骤条', 'name': 'Steps', 'key': 'steps' },

packages/theme/build/release.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,6 @@
44

55
import fs from 'node:fs'
66
import path from 'node:path'
7-
import fg from 'fast-glob'
8-
9-
// 替换文件内容。 如果不指定target,则原地覆盖
10-
function replaceFile(src, cb, target = null) {
11-
let content = fs.readFileSync(src, 'utf8')
12-
content = cb(content)
13-
fs.writeFileSync(target || src, content, 'utf8')
14-
}
15-
16-
// 1、从 index.css 生成 lowcode.css ------ 提供特殊的前缀名称
17-
replaceFile('dist/index.css', (content) => content.replace(/--ti-/g, '--ti-vue-'), 'dist/lowcode.css')
18-
19-
// 2、复制一份冗余的文件,统一替换 --ti- 前缀为 --tvue- ,避免混用 tiny3时,css变量名冲突。
20-
fs.cpSync('dist', '_dist', { recursive: true, force: true })
21-
fs.cpSync('_dist', 'dist/_dist', { recursive: true, force: true })
22-
fs.rmSync('_dist', { recursive: true, force: true })
23-
// 2.1 处理所有的 index.css
24-
let files = fg.sync(['dist/_dist/**/index.css'])
25-
files.forEach((file) => {
26-
replaceFile(file, (content) => content.replace(/--ti-/g, '--tvue-'))
27-
})
28-
// 2.2 处理所有的说主题js
29-
files = fg.sync(['dist/_dist/**/{aurora,smb}-theme.js', 'dist/_dist/theme/**/{index,component}.js'])
30-
files.forEach((file) => {
31-
replaceFile(file, (content) =>
32-
content
33-
.replace(/--ti-/g, '--tvue-') //
34-
.replace(/'ti-/g, `'tvue-`)
35-
)
36-
})
377

388
// 3、复制package.json/README.md到dist目录
399
fs.copyFileSync('package.json', path.join('dist', 'package.json'))

packages/theme/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "3.18.3",
44
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
55
"author": "OpenTiny Team",
6+
"type": "module",
67
"license": "MIT",
78
"homepage": "https://opentiny.design/tiny-vue",
89
"repository": {

packages/theme/src/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,4 @@
169169
@import './user-link/index.less';
170170
@import './watermark/index.less';
171171
@import './wizard/index.less';
172-
@import './year-table/index.less';
172+
@import './year-table/index.less';

0 commit comments

Comments
 (0)