tools/lib/load-configs.js
function readConfigs() {
    const configsRoot = path.resolve(__dirname, "../../lib/configs")
    const result = fs.readdirSync(configsRoot)
    const configs = []
    for (const name of result) {
        const configName = name.replace(/\.js$/u, "")
        const configId = `plugin:lodash-template/${configName}`
        const configPath = require.resolve(path.join(configsRoot, name))

        const config = require(configPath)
        configs.push({
            name: configName,
            configId,
            config,
            path: configPath,
        })
    }
    return configs
}
function readConfigs() {
    const configsRoot = path.resolve(__dirname, "../../lib/configs")
    const result = fs.readdirSync(configsRoot)
    const configs = []
    for (const name of result) {
        const configName = name.replace(/\.js$/u, "")
        const configId = `plugin:lodash-template/${configName}`
        const configPath = require.resolve(path.join(configsRoot, name))

        const config = require(configPath)
        configs.push({
            name: configName,
            configId,
            config,
            path: configPath,
        })
    }
    return configs
}
function readConfigs ( ) { const configsRoot = path . resolve ( __dirname , "../../lib/configs" ) const result = fs . readdirSync ( configsRoot ) const configs = [ ] for ( const name of result ) { const configName = name . replace ( / \.js$ / u , "" ) const configId = ` ${ configName } ` const configPath = require . resolve ( path . join ( configsRoot , name ) ) const config = require ( configPath ) configs . push ( { name : configName , configId , config , path : configPath , } ) } return configs }
Get the all configs
@returns {Array} The all configs
Get the all configs