Skip to content

Commit 3113749

Browse files
VdustRmarcosmoura
authored andcommitted
chore: new component script (#1455)
* fix: fix new component script prefix name for new doc component * fix: new doc directory case
1 parent b33d0d6 commit 3113749

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build/new-component.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default Vue => {
8080

8181
function getDocsFile (name) {
8282
const singleName = name.replace('Md', '')
83+
const docName = name.replace('Md', 'Doc')
8384

8485
return `<example src="./examples/Example.vue" />
8586
@@ -105,7 +106,7 @@ function getDocsFile (name) {
105106
import examples from 'docs-mixins/docsExample'
106107
107108
export default {
108-
name: '${singleName}',
109+
name: '${docName}',
109110
mixins: [examples]
110111
}
111112
</script>
@@ -155,7 +156,7 @@ const rootDir = join(__dirname, '..')
155156
const componentsPath = 'src/components/' + name
156157
const componentIndex = 'src/components/index.js'
157158
const themePath = 'src/theme/all.scss'
158-
const docsPath = 'docs/app/pages/components/' + singleName
159+
const docsPath = 'docs/app/pages/Components/' + singleName
159160
const docsRoutePath = 'docs/app/routes.js'
160161
const navPath = 'docs/app/template/MainNavContent.vue'
161162

0 commit comments

Comments
 (0)