How to use the bespoken-tools/lib/core/global.Global.loadConfig function in bespoken-tools

To help you get started, we’ve selected a few bespoken-tools 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 bespoken-cookbook / serverless-plugin-bespoken / src / ServerlessPluginBespoken.ts View on Github external
loadBespokenPluginConfig = async () => {
    if (this.pluginConfig) {
      this.serverless.cli.log("Configuring bespoken to use parameters from serverless.yml")
      const directory = `${homedir()}/.bst`
      ensureDirSync(directory);
      writeJsonSync(`${directory}/config`, {
        ...this.pluginConfig,
        version: "1.0.7"
      }, { spaces: 2 });
    }

    // parse the bespoken config
    await Global.loadConfig();
  };