refactor: directly include themes in web package (#1988)

This commit is contained in:
Mo
2022-11-09 11:21:26 -06:00
committed by GitHub
parent ac4882b357
commit 10a9889cf4
12 changed files with 341 additions and 25 deletions

View File

@@ -1,36 +1,23 @@
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'
import {
copyRecursiveSync,
doesDirExist,
emptyExistingDir,
ensureDirExists,
copyFileOrDir,
} from '../../../scripts/ScriptUtils.mjs'
import { doesDirExist, emptyExistingDir, ensureDirExists, copyFileOrDir } from '../../../scripts/ScriptUtils.mjs'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const components = {
'@standardnotes/authenticator': 'org.standardnotes.token-vault',
'@standardnotes/autobiography-theme': 'org.standardnotes.theme-autobiography',
'@standardnotes/classic-code-editor': 'org.standardnotes.code-editor',
'@standardnotes/dynamic-theme': 'org.standardnotes.theme-dynamic',
'@standardnotes/focus-theme': 'org.standardnotes.theme-focus',
'@standardnotes/futura-theme': 'org.standardnotes.theme-futura',
'@standardnotes/markdown-hybrid': 'org.standardnotes.advanced-markdown-editor',
'@standardnotes/markdown-visual': 'org.standardnotes.markdown-visual-editor',
'@standardnotes/midnight-theme': 'org.standardnotes.theme-midnight',
'@standardnotes/rich-text': 'org.standardnotes.plus-editor',
'@standardnotes/simple-task-editor': 'org.standardnotes.simple-task-editor',
'@standardnotes/solarized-dark-theme': 'org.standardnotes.theme-solarized-dark',
'@standardnotes/spreadsheets': 'org.standardnotes.standard-sheets',
'@standardnotes/titanium-theme': 'org.standardnotes.theme-titanium',
'@standardnotes/bold-editor': 'org.standardnotes.bold-editor',
'@standardnotes/classic-code-editor': 'org.standardnotes.code-editor',
'@standardnotes/markdown-basic': 'org.standardnotes.simple-markdown-editor',
'@standardnotes/markdown-hybrid': 'org.standardnotes.advanced-markdown-editor',
'@standardnotes/markdown-math': 'org.standardnotes.fancy-markdown-editor',
'@standardnotes/markdown-minimal': 'org.standardnotes.minimal-markdown-editor',
'@standardnotes/markdown-visual': 'org.standardnotes.markdown-visual-editor',
'@standardnotes/rich-text': 'org.standardnotes.plus-editor',
'@standardnotes/simple-task-editor': 'org.standardnotes.simple-task-editor',
'@standardnotes/spreadsheets': 'org.standardnotes.standard-sheets',
}
const BasePath = path.join(__dirname, '../../../node_modules')