feat: 更新环境
This commit is contained in:
@@ -11,6 +11,6 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@kevisual/user-config": "link:.."
|
||||
"@kevisual/use-config": "link:.."
|
||||
}
|
||||
}
|
||||
|
||||
9
demo/src/env.ts
Normal file
9
demo/src/env.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import fs from 'fs';
|
||||
import { useConfig, useKey } from '@kevisual/use-config/env';
|
||||
const config = useConfig();
|
||||
|
||||
console.log(config);
|
||||
|
||||
const a = useKey('a');
|
||||
|
||||
console.log(a);
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useConfig } from '@kevisual/user-config';
|
||||
import { useConfig } from '@kevisual/use-config';
|
||||
|
||||
// console.log(useConfig);
|
||||
console.log(useConfig());
|
||||
|
||||
34
demo/tsconfig.json
Normal file
34
demo/tsconfig.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "NodeNext",
|
||||
"target": "esnext",
|
||||
"noImplicitAny": false,
|
||||
"outDir": "./dist",
|
||||
"sourceMap": false,
|
||||
"allowJs": true,
|
||||
"newLine": "LF",
|
||||
"baseUrl": "./",
|
||||
"typeRoots": [
|
||||
"node_modules/@types",
|
||||
],
|
||||
"declaration": false,
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"moduleResolution": "NodeNext",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"rollup.config.js",
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user