-
-
Notifications
You must be signed in to change notification settings - Fork 243
/
compile-templates.js
63 lines (48 loc) · 2.55 KB
/
compile-templates.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const path = require('path');
const pkg = require('./package.json');
const TemplatedBuilder = require('./builder/templated');
const AseBuilder = require('./builder/ase');
const CraftLibraryBuilder = require('./builder/craft-library');
const GVSwatchBuilder = require('./builder/gvswatch');
const COLORS_FILE = path.join(__dirname, 'open-color.json');
const colors = require(COLORS_FILE);
const templatedBuilder = new TemplatedBuilder(colors, pkg.version);
const aseBuilder = new AseBuilder(colors, pkg.version);
const craftLibraryBuilder = new CraftLibraryBuilder(colors, pkg.version);
const gvswatchBuilder = new GVSwatchBuilder(colors, pkg.version);
templatedBuilder.build('_config.yml',
[path.join(__dirname, 'docs', '_config.yml')]);
templatedBuilder.build('open-color.scss',
[path.join(__dirname, 'open-color.scss'), path.join(__dirname, 'docs', '_sass', '_open-color.scss')]);
templatedBuilder.build('open-color.css',
[path.join(__dirname, 'open-color.css')]);
templatedBuilder.build('open-color.js',
[path.join(__dirname, 'open-color.js')]);
templatedBuilder.build('open-color.less',
[path.join(__dirname, 'open-color.less')]);
templatedBuilder.build('open-color.styl',
[path.join(__dirname, 'open-color.styl')]);
templatedBuilder.build('open-color.svg',
[path.join(__dirname, 'docs', 'asset', 'images', 'open-color.svg')]);
templatedBuilder.build('open-color.tex',
[path.join(__dirname, 'open-color.tex')]);
templatedBuilder.build('open-color.sketchpalette',
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.sketchpalette`)]);
templatedBuilder.build('open-color.inkscape',
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.gpl`)]);
templatedBuilder.build('open-color.code-snippets',
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.code-snippets`)]);
aseBuilder.build('ase',
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.ase`)]);
craftLibraryBuilder.build(
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.library`)]);
gvswatchBuilder.build(
[path.join(__dirname, 'docs', 'asset', 'download', `open-color_${pkg.version}.gvswatch`)])
templatedBuilder.build('open-color.oco',
[path.join(__dirname, 'open-color.oco')]);
templatedBuilder.build('open-color.rcpx',
[path.join(__dirname, 'open-color.rcpx')]);
templatedBuilder.build('open-color.d.ts',
[path.join(__dirname, 'open-color.d.ts')]);
templatedBuilder.build('open-color.js',
[path.join(__dirname, 'open-color.js')]);