UNPKG

610 BJavaScriptView Raw
1#!/usr/bin/env node
2
3var theme;
4var fs = require('fs');
5
6try {
7 theme = require('../lib/main');
8} catch (err) {
9 require('coffee-script/register');
10 theme = require('../src/main');
11}
12
13if (!fs.existsSync('./cache')) {
14 fs.mkdirSync('./cache');
15}
16
17fs.chmodSync('./cache', 0777);
18
19// Call with known options to generate the cache entries. This isn't that
20// efficient but it works for now.
21theme.render({}, function () {});
22theme.render({}, {themeVariables: 'flatly'}, function () {});
23theme.render({}, {themeVariables: 'slate'}, function () {});
24theme.render({}, {themeVariables: 'cyborg'}, function () {});