explore-config
TypeScript icon, indicating that this package has built-in type declarations

3.0.23 • Public • Published

techor

Explore multi-format JavaScript module configuration

NPM Version NPM Version NPM package ( download / month ) Follow @mastercorg Github release actions


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
}

NPM Version

Package Sidebar

Install

npm i explore-config

Weekly Downloads

84

Version

3.0.23

License

MIT

Unpacked Size

9.52 kB

Total Files

5

Last publish

Collaborators

  • 1aron