Skip to content

Commit

Permalink
feat: move to ESM first (#302)
Browse files Browse the repository at this point in the history
* feat: move to ESM first

* chore: fix docs. generation
  • Loading branch information
userquin authored Dec 29, 2024
1 parent a12369e commit fd060df
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ etc
dist
temp
.eslintcache
.idea/
12 changes: 6 additions & 6 deletions docs/@intlify/vue-i18n-extensions-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Transform `v-t` custom directive

**Signature:**
```typescript
declare function transformVTDirective<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
declare function transformVTDirective<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
Legacy extends boolean = true>(options?: TransformVTDirectiveOptions<Messages, DateTimeFormats, NumberFormats, Legacy>): DirectiveTransform;
```

Expand Down Expand Up @@ -86,9 +86,9 @@ Transform options for `v-t` custom directive

**Signature:**
```typescript
interface TransformVTDirectiveOptions<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/ban-types -- TODO: fix this
interface TransformVTDirectiveOptions<Messages extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
DateTimeFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
NumberFormats extends Record<string, unknown> = {}, // eslint-disable-line @typescript-eslint/no-empty-object-type -- TODO: fix this
Legacy extends boolean = true>
```

Expand Down
1 change: 1 addition & 0 deletions docsgen.config.js → docsgen.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { tocResolver, tocProcessor } = require('api-docs-gen')

module.exports = {
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "@intlify/vue-i18n-extensions",
"description": "vue-i18n extensions",
"type": "module",
"version": "7.0.0",
"description": "vue-i18n extensions",
"author": {
"name": "kazuya kawaguchi",
"email": "[email protected]"
Expand Down Expand Up @@ -77,24 +78,23 @@
"optional": true
}
},
"files": [
"dist/idnex.cjs",
"dist/index.mjs",
"dist/index.d.ts",
"dist/index.d.mts",
"dist/index.d.cts"
],
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"dist/index.cjs",
"dist/index.mjs",
"dist/index.d.ts",
"dist/index.d.mts",
"dist/index.d.cts"
],
"repository": {
"type": "git",
"url": "git+https://github.com/intlify/vue-i18n-extensions.git"
Expand All @@ -105,7 +105,7 @@
"release": "bumpp --commit \"release: v%s\" --push --tag",
"build": "pnpm build:transpile && pnpm build:extract && pnpm build:docs",
"build:nightly": "pnpm build:transpile && pnpm build:extract",
"build:docs": "api-docs-gen ./temp/vue-i18n-extensions.api.json -c ./docsgen.config.js -o ./docs",
"build:docs": "api-docs-gen ./temp/vue-i18n-extensions.api.json -c ./docsgen.config.cjs -o ./docs",
"build:extract": "api-extractor run -l -c ./api-extractor.json --typescript-compiler-folder node_modules/typescript",
"build:transpile": "unbuild",
"check-install": "tsx scripts/playwright.ts",
Expand Down

0 comments on commit fd060df

Please sign in to comment.