#!/usr/bin/env node var fs = require('fs') var execSync = require('child_process').execSync console.log('Rebuilding Mercury') execSync('npm run build') var Mercury = require('./dist/mercury') var url = process.argv[2] console.log(`Fetching link`) Mercury.parse(url, null, { fallback: false }).then(function(result) { var htmlFile = './preview.html' var jsonFile = './preview.json' var html = `