UNPKG

ace-mode-move

Version:

Syntax highlighting for Libra's Move language (https://developers.libra.org/docs/move-paper), for Ace ( https://ace.c9.io/ )

17 lines (13 loc) 563 B
const gatherTokenizations = require('./gather-tokenizations.js'); const writeFilePromise = require('fs-writefile-promise'); const DATADIR = __dirname + '/data'; async function overwrite() { const tokenizations = await gatherTokenizations(); Object.keys(tokenizations).forEach(async function (key) { let jsonFileName = `${DATADIR}/${key}.json`; let jsonFileContents = JSON.stringify(tokenizations[key], null, 2); jsonFileContents += "\n"; // to satisfy `git diff` await writeFilePromise(jsonFileName, jsonFileContents); }); } overwrite();