├── .editorconfig ├── .github └── workflows │ ├── autofix.yml │ └── ci.yml ├── .gitignore ├── .prettierrc ├── .testrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── eslint.config.mjs ├── package.json ├── playground ├── load.ts └── watch.ts ├── pnpm-lock.yaml ├── renovate.json ├── src ├── dotenv.ts ├── index.ts ├── loader.ts ├── types.ts ├── update.ts └── watch.ts ├── test ├── dotenv.test.ts ├── fixture │ ├── .base │ │ └── test.config.jsonc │ ├── .config │ │ └── test.ts │ ├── .env │ ├── .env.local │ ├── .gitignore │ ├── .testrc │ ├── _github │ │ ├── package.json │ │ └── test.config.ts │ ├── array │ │ ├── .testrc │ │ └── test.config.ts │ ├── jsx │ │ ├── index.js │ │ └── src │ │ │ └── index.jsx │ ├── node_modules │ │ └── c12-npm-test │ │ │ ├── package.json │ │ │ └── test.config.ts │ ├── not-a-folder.ts │ ├── package.json │ ├── test.config.dev.ts │ └── theme │ │ └── .config │ │ └── test.config.json5 ├── loader.test.ts ├── types.ts └── update.test.ts ├── tsconfig.json └── vitest.config.ts /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/.editorconfig -------------------------------------------------------------------------------- /.github/workflows/autofix.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/.github/workflows/autofix.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.testrc: -------------------------------------------------------------------------------- 1 | testConfig=true 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/README.md -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/eslint.config.mjs -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/package.json -------------------------------------------------------------------------------- /playground/load.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/playground/load.ts -------------------------------------------------------------------------------- /playground/watch.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/playground/watch.ts -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>unjs/renovate-config"] 3 | } 4 | -------------------------------------------------------------------------------- /src/dotenv.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/dotenv.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/loader.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/loader.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/update.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/update.ts -------------------------------------------------------------------------------- /src/watch.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/src/watch.ts -------------------------------------------------------------------------------- /test/dotenv.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/dotenv.test.ts -------------------------------------------------------------------------------- /test/fixture/.base/test.config.jsonc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/.base/test.config.jsonc -------------------------------------------------------------------------------- /test/fixture/.config/test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/.config/test.ts -------------------------------------------------------------------------------- /test/fixture/.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/.env -------------------------------------------------------------------------------- /test/fixture/.env.local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/.env.local -------------------------------------------------------------------------------- /test/fixture/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/.gitignore -------------------------------------------------------------------------------- /test/fixture/.testrc: -------------------------------------------------------------------------------- 1 | rcFile=true 2 | -------------------------------------------------------------------------------- /test/fixture/_github/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/_github/package.json -------------------------------------------------------------------------------- /test/fixture/_github/test.config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | githubLayer: true, 3 | }; 4 | -------------------------------------------------------------------------------- /test/fixture/array/.testrc: -------------------------------------------------------------------------------- 1 | rcFile=true 2 | -------------------------------------------------------------------------------- /test/fixture/array/test.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/array/test.config.ts -------------------------------------------------------------------------------- /test/fixture/jsx/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/jsx/index.js -------------------------------------------------------------------------------- /test/fixture/jsx/src/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/jsx/src/index.jsx -------------------------------------------------------------------------------- /test/fixture/node_modules/c12-npm-test/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/node_modules/c12-npm-test/package.json -------------------------------------------------------------------------------- /test/fixture/node_modules/c12-npm-test/test.config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | npmConfig: true 3 | } 4 | -------------------------------------------------------------------------------- /test/fixture/not-a-folder.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | not_a_folder: true, 3 | }; 4 | -------------------------------------------------------------------------------- /test/fixture/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/package.json -------------------------------------------------------------------------------- /test/fixture/test.config.dev.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/test.config.dev.ts -------------------------------------------------------------------------------- /test/fixture/theme/.config/test.config.json5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/fixture/theme/.config/test.config.json5 -------------------------------------------------------------------------------- /test/loader.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/loader.test.ts -------------------------------------------------------------------------------- /test/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/types.ts -------------------------------------------------------------------------------- /test/update.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/test/update.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/unjs/c12/HEAD/vitest.config.ts --------------------------------------------------------------------------------