1
0
mirror of https://github.com/ikatyang/emoji-cheat-sheet.git synced 2024-11-22 18:33:50 +01:00
emoji-cheat-sheet/scripts/generate.ts

12 lines
349 B
TypeScript
Raw Normal View History

2017-07-15 17:55:45 +02:00
import * as fs from 'fs';
import {create_cheat_sheet} from '../src/create-cheat-sheet';
const output_filename = process.argv[2];
if (output_filename === undefined) {
throw new Error(`Usage ts-node path/to/generate.ts path/to/output.md`);
}
create_cheat_sheet().then(cheat_sheet => {
fs.writeFileSync(output_filename, cheat_sheet, 'utf8');
});