Detalhes do pacote

explore-config

techor-dev1.1kMIT3.2.5

Explore multi-format JavaScript module configuration

config, esm, cjs, ts

readme (leia-me)


<picture> <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/33840671/227841265-4fd5a57c-0eb8-4fcf-a8ff-a266c990010c.svg"> <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/33840671/227841250-bfe4af56-2394-4101-b3ba-a4086f171ead.svg"> techor </picture>

Explore multi-format JavaScript module configuration

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/%E2%AC%85%20back-%20?color=212022&style=for-the-badge"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/badge/%E2%AC%85%20back-%20?color=f6f7f8&style=for-the-badge"> NPM Version </picture> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/v/release/techor-dev/techor?include_prereleases&color=212022&label=&style=for-the-badge&logo=github&logoColor=fff"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/v/release/techor-dev/techor?include_prereleases&color=f6f7f8&label=&style=for-the-badge&logo=github&logoColor=%23000"> NPM Version </picture> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/explore-config?color=212022&label=%20&logo=npm&style=for-the-badge"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/npm/dm/explore-config?color=f6f7f8&label=%20&logo=npm&style=for-the-badge"> NPM package ( download / month ) </picture> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/static/v1?label=%20&message=twitter&color=212022&logo=twitter&style=for-the-badge"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/static/v1?label=%20&message=twitter&color=f6f7f8&logo=twitter&style=for-the-badge"> Follow @mastercorg </picture> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/github/actions/workflow/status/techor-dev/techor/release.yml?branch=main&label=%20&message=twitter&color=212022&logo=githubactions&style=for-the-badge"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/github/actions/workflow/status/techor-dev/techor/release.yml?branch=main&label=%20&message=twitter&color=f6f7f8&logo=githubactions&style=for-the-badge&logoColor=%23000"> Github release actions </picture>


Getting Started

npm install explore-config

Usage

exploreConfig(name: string, options: ExploreConfigOptions)
import exploreConfig from 'explore-config'

 /**
  * 1. explore -> techor.config.js
  * 2. explore -> techor.config.ts
  * 3. explore -> techor.config.cjs
  * 4. explore -> techor.config.cts
  * 5. explore -> techor.config.mjs
  * 6. explore -> techor.config.mts
  * */
const config = exploreConfig('techor.config')

console.log(config)
// -> {...}
export interface ExploreConfigOptions {
    extensions?: ('js' | 'ts' | 'cjs' | 'cts' | 'mjs' | 'mts')[]
    resolvedKeys?: string[]
    cwd?: string
    found?: (basename: string, configPath: string) => void
}


<picture> <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/%E2%AC%85%20back%20to%20contents-%20?color=212022&style=for-the-badge"> <source media="(prefers-color-scheme: light)" srcset="https://img.shields.io/badge/%E2%AC%85%20back%20to%20contents-%20?color=f6f7f8&style=for-the-badge"> NPM Version </picture>