-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add config deps & add naily.config.ts
- Loading branch information
Showing
12 changed files
with
3,302 additions
and
2,199 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
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,20 @@ | ||
export interface AppConfiguration { | ||
// Custom your configuration | ||
} | ||
|
||
declare global { | ||
namespace Naily { | ||
namespace Configuration { | ||
interface NailyUserConfig { | ||
app?: AppConfiguration | ||
} | ||
|
||
interface NailyUserIntelliSense { | ||
/* Custom `@Value` Decorator intellisense */ | ||
app?: AppConfiguration | ||
} | ||
} | ||
} | ||
} | ||
|
||
export {} |
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,4 @@ | ||
// @ts-check | ||
import antfu from '@antfu/eslint-config' | ||
import naily from '@nailyjs/eslint' | ||
|
||
export default antfu( | ||
{ | ||
unocss: true, | ||
formatters: true, | ||
rules: { | ||
'ts/no-redeclare': 'off', | ||
'ts/method-signature-style': 'off', | ||
'ts/no-namespace': 'off', | ||
}, | ||
}, | ||
) | ||
export default naily() |
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
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,5 +1,9 @@ | ||
import { createRpcClient } from '@nailyjs/rpc/axios' | ||
import { createAxiosClient } from '@nailyjs/rpc/axios' | ||
import { isClient } from '@vueuse/core' | ||
|
||
export function useRequest() { | ||
return createRpcClient(import.meta.env.PROD ? 'http://localhost:1000/rpc' : '/rpc') | ||
return createAxiosClient({ | ||
urlOrAxiosInstance: import.meta.env.PROD ? 'http://localhost:1000/rpc' : '/rpc', | ||
ssr: !isClient, | ||
}) | ||
} |
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 '@nailyjs/config' | ||
|
||
export default defineConfig({ | ||
naily: {}, | ||
}) |
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
Oops, something went wrong.