UNPKG

gia-cli

Version:

Guardian US Interactive CLI tool

15 lines (11 loc) 409 B
/*global require */ const { spawn } = require( 'child_process' ); const chalk = require( 'chalk' ); const gia = require( '../giafile.js' ); const url = `https://content.guardianapis.com/atom/interactive/interactives/${gia.path}`; const proc = spawn( 'pbcopy' ); proc.stdin.write( url ); proc.stdin.end(); console.log( `Atom URL (copied to clipboard — paste this into Composer): ${chalk.cyan( url )} ` );