Skip to content

Commit f511af6

Browse files
committed
chore: use lodash kebabCase instead of decamelize
1 parent 35d4b02 commit f511af6

3 files changed

Lines changed: 2 additions & 24 deletions

File tree

package-lock.json

Lines changed: 0 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
"canvas": "2.6.1",
6868
"conventional-changelog-cli": "^2.1.0",
6969
"cross-env": "^7.0.2",
70-
"decamelize": "^6.0.0",
7170
"diff-run": "^1.0.4",
7271
"dumi": "^1.1.19",
7372
"dumi-theme-default": "^1.1.0",

scripts/sync.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from 'path'
44
import fs from 'fs'
55
import { promisify } from 'util'
66
import { ESLint } from 'eslint'
7-
import decamelize from 'decamelize'
7+
import { kebabCase } from 'lodash'
88
import stringTemplate from 'string-template'
99

1010
console.log('Sync start')
@@ -71,9 +71,7 @@ const lintAndFixFileContent = async (fileContent: string, filePath: string) => {
7171
const getChartConfig = (chart: string) => {
7272
return {
7373
cmpName: `${chart}Chart`,
74-
cmpPath: decamelize(chart, {
75-
separator: '-',
76-
}),
74+
cmpPath: kebabCase(chart),
7775
}
7876
}
7977

0 commit comments

Comments
 (0)