-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.js
34 lines (26 loc) · 963 Bytes
/
build.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
const fs = require('fs');
const color = require('./packages/BaseColor')
const Editor = require('./packages/AppearanceOfEditor');
const Code = require('./packages/AppearanceOfCode');
const AboutMyself = require('./packages/AboutMyself')
const Semantic = require('./packages/Semantic')
const _path = {
dark: './themes/dark.json',
softDark: './themes/dark-soft.json'
}
function buildDarkTheme() {
const opts = { name: 'Simple Dark' }
const result = Object.assign({}, AboutMyself(opts), Semantic, Editor(color()), Code(color()))
return JSON.stringify(result)
}
function buildDarkSoftTheme() {
const opts = { name: 'Simple Dark Soft' }
const mode = 'soft'
const result = Object.assign({}, AboutMyself(opts), Semantic, Editor(color(mode)), Code(color(mode)))
return JSON.stringify(result)
}
async function build() {
await fs.writeFileSync(_path.dark, buildDarkTheme())
await fs.writeFileSync(_path.softDark, buildDarkSoftTheme())
}
build()