How to use the gluegun.filesystem.write function in gluegun

To help you get started, we’ve selected a few gluegun 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 SplitmediaLabsLimited / devctl / src / commands / compile.js View on Github external
if (get('proxy.ssl.cert') && get('proxy.ssl.key')) {
        const httpsPort = get('proxy.httpsPort', 443);
        ports.push(`${httpsPort}:${httpsPort}`);
      }

      finalDockerCompose['devctl-proxy'] = {
        image: 'splitmedialabs/devctl-proxy:latest',
        restart: 'always',
        ports,
        environment,
      };
    }

    // write the final docker-compose to a file in the cwd
    await filesystem.write(get('paths.compose'), YAML.dump(finalDockerCompose));

    // next step!
    return require('../cli').run('up');
  },
};
github SplitmediaLabsLimited / devctl / src / commands / compile.js View on Github external
let finalDotEnv = {};

      const exists = await filesystem.exists(dotenvPath);

      if (exists) {
        const raw = await filesystem.read(dotenvPath);
        finalDotEnv = parseEnv(raw);
      }

      finalDotEnv = {
        ...finalDotEnv,
        ...dotenv,
      };

      await filesystem.write(dotenvPath, stringifyToEnv(finalDotEnv));
    });
github SplitmediaLabsLimited / devctl / src / commands / switch.js View on Github external
async function saveCurrentConfig(path, config) {
  return filesystem.write(path, YAML.dump(config));
}
github SplitmediaLabsLimited / devctl / src / utils / dockerCompose.js View on Github external
async function writeComposeFileToHomeDir(compose) {
  return filesystem.write(lastDCPath, compose);
}