How to use the @kosko/config.searchConfig function in @kosko/config

To help you get started, we’ve selected a few @kosko/config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tommy351 / kosko / packages / cli / src / commands / generate.ts View on Github external
export async function generateHandler(
  args: BaseGenerateArguments & Context
): Promise {
  // Load config
  const globalConfig = await searchConfig(args.cwd);
  const config = {
    ...globalConfig,
    ...resolveConfig(globalConfig, args)
  };

  if (!config.components.length) {
    throw new CLIError("No components are given", {
      output:
        "No components are given. Set components in a config file or in arguments."
    });
  }

  // Set env
  if (args.env) {
    const env = await importEnv(args.cwd);

@kosko/config

Load kosko configuration.

MIT
Latest version published 13 days ago

Package Health Score

75 / 100
Full package analysis