Skip to content

Commit

Permalink
fix(create): internal presets
Browse files Browse the repository at this point in the history
  • Loading branch information
chnliquan committed Aug 30, 2022
1 parent cf971fb commit 9dffd26
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/glob": "^7.2.0",
"@types/prettier": "^2.7.0",
"glob": "^8.0.3",
"moment": "^2.29.4",
"dayjs": "^1.11.5",
"prettier": "^2.7.1",
"sort-package-json": "^1.57.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create/src/core/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class GenerateService extends Service {

super({
...opts,
presets: [require.resolve('./preset'), ...presets],
presets: [require.resolve('../internal'), ...presets],
plugins: [...plugins],
})
this.cliVersion = require('../package.json').version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
prompts,
} from '@eljs/utils'
import { execSync } from 'child_process'
import dayjs from 'dayjs'
import { writeFileSync } from 'fs'
import moment from 'moment'
import { basename, join } from 'path'
import { Api } from '../../types'

Expand Down Expand Up @@ -37,9 +37,9 @@ export default (api: Api) => {
const { name, email } = getUserAccount()
const gitUrl = getGitUrl(api.target)
const { href: gitHref = '' } = normalizeGitRepo(gitUrl)
const year = moment().format('YYYY')
const date = moment().format('YYYY-MM-DD')
const dateTime = moment().format('YYYY-MM-DD hh:mm:ss')
const year = dayjs().format('YYYY')
const date = dayjs().format('YYYY-MM-DD')
const dateTime = dayjs().format('YYYY-MM-DD hh:mm:ss')
const dirname = basename(api.target)

let registry: string
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dffd26

Please # to comment.