@manifoldco/graphql-gen
Advanced tools
Comparing version 1.1.0-alpha.3 to 1.1.0-alpha.4
@@ -67,23 +67,19 @@ #!/usr/bin/env node | ||
function run() { | ||
const result = graphQLGen(spec, cli.flags); | ||
const result = graphQLGen(spec, cli.flags); | ||
// Write to file if specifying output | ||
if (cli.flags.output) { | ||
const timeStart = process.hrtime(); | ||
const outputFile = resolve(process.cwd(), cli.flags.output); | ||
const parent = dirname(outputFile); | ||
mkdirpSync(parent); | ||
writeFileSync(outputFile, result); | ||
// Write to file if specifying output | ||
if (cli.flags.output) { | ||
const timeStart = process.hrtime(); | ||
const outputFile = resolve(process.cwd(), cli.flags.output); | ||
const parent = dirname(outputFile); | ||
mkdirpSync(parent); | ||
writeFileSync(outputFile, result); | ||
const timeEnd = process.hrtime(timeStart); | ||
const time = timeEnd[0] + Math.round(timeEnd[1] / 1e6); | ||
console.log(chalk.green(`🚀 ${cli.input[0]} -> ${chalk.bold(cli.flags.output)} [${time}ms]`)); | ||
return; | ||
} | ||
// Otherwise, return result | ||
return result; | ||
const timeEnd = process.hrtime(timeStart); | ||
const time = timeEnd[0] + Math.round(timeEnd[1] / 1e6); | ||
console.log(chalk.green(`🚀 ${cli.input[0]} -> ${chalk.bold(cli.flags.output)} [${time}ms]`)); | ||
return; | ||
} | ||
module.exports = run; | ||
// Otherwise, return result | ||
return result; |
{ | ||
"name": "@manifoldco/graphql-gen", | ||
"version": "1.1.0-alpha.3", | ||
"version": "1.1.0-alpha.4", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15286
245