2018-12-01 21:17:55 +08:00
|
|
|
/**
|
|
|
|
* 米白色主题
|
|
|
|
* @author yutent<yutent@doui.cc>
|
|
|
|
* @date 2018/12/01 13:33:44
|
|
|
|
*/
|
|
|
|
|
|
|
|
const fs = require('iofs')
|
|
|
|
const path = require('path')
|
2022-03-14 15:05:57 +08:00
|
|
|
const readline = require('readline')
|
2018-12-01 21:17:55 +08:00
|
|
|
|
|
|
|
const colors = require('./src/colors')
|
|
|
|
|
|
|
|
const base = require('./src/base')
|
|
|
|
const es = require('./src/es')
|
|
|
|
const php = require('./src/php')
|
|
|
|
const html = require('./src/html')
|
2018-12-06 16:27:50 +08:00
|
|
|
const plaintext = require('./src/plaintext')
|
2018-12-01 21:17:55 +08:00
|
|
|
const json = require('./src/json')
|
2018-12-11 14:24:03 +08:00
|
|
|
const dart = require('./src/dart')
|
|
|
|
const tokenColors = [].concat(base, html, es, php, plaintext, dart, json)
|
2018-12-01 21:17:55 +08:00
|
|
|
|
|
|
|
for (let it of tokenColors) {
|
|
|
|
if (Array.isArray(it.scope)) {
|
|
|
|
it.scope = it.scope.join(', ')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const theme = {
|
2021-09-15 15:20:52 +08:00
|
|
|
name: '米白色主题@自用',
|
2018-12-01 21:17:55 +08:00
|
|
|
type: 'light',
|
|
|
|
colors,
|
|
|
|
tokenColors
|
|
|
|
}
|
|
|
|
|
|
|
|
fs.echo(JSON.stringify(theme, '', 2), path.join('./themes', 'color-theme.json'))
|
2022-03-14 15:05:57 +08:00
|
|
|
|
|
|
|
// 这个就只是单纯的用来阻止进程结束, 方便pm2
|
|
|
|
readline.createInterface({
|
|
|
|
input: process.stdin,
|
|
|
|
output: process.stdout
|
|
|
|
})
|
|
|
|
|
2018-12-01 21:17:55 +08:00
|
|
|
console.log('Build complete...')
|