-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ support .swagger.yarml file on api folder
improve perf with tsup and vitest
- Loading branch information
Showing
12 changed files
with
1,998 additions
and
5,101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
env: { | ||
browser: false, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ['airbnb'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'import/no-extraneous-dependencies': 'warn', | ||
'import/no-unresolved': 'warn', | ||
'import/extensions': 'warn', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ node_modules | |
dist | ||
|
||
.vercel | ||
docs | ||
docs | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
printWidth: 80, | ||
semi: true, | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
importOrder: ['^@core/(.*)$', '^@server/(.*)$', '^@ui/(.*)$', '^[./]'], | ||
importOrderSeparation: true, | ||
importOrderSortSpecifiers: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
// Vitest Snapshot v1 | ||
|
||
exports[`withSwagger should create default swagger json option 1`] = ` | ||
Object { | ||
"components": Object {}, | ||
"info": Object { | ||
exports[`withSwagger > should create default swagger json option 1`] = ` | ||
{ | ||
"components": {}, | ||
"info": { | ||
"title": "NextJS Swagger", | ||
"version": "0.1.0", | ||
}, | ||
"openapi": "3.0.0", | ||
"paths": Object {}, | ||
"tags": Array [], | ||
"paths": {}, | ||
"tags": [], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
export default defineConfig([ | ||
{ | ||
entry: ['src/index.ts'], | ||
splitting: false, | ||
sourcemap: true, | ||
clean: true, | ||
dts: true, | ||
format: ['cjs', 'esm'], | ||
}, | ||
{ | ||
name: 'minified', | ||
entry: ['src/index.ts'], | ||
splitting: false, | ||
sourcemap: true, | ||
clean: true, | ||
dts: true, | ||
format: ['cjs', 'esm'], | ||
minify: true, | ||
legacyOutput: true, | ||
outDir: 'dist/minified', | ||
}, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
test: { globals: true }, | ||
}); |
Oops, something went wrong.