chore: ext path fix + noto-emoji build script

pull/6775/head
NGPixel 2 years ago
parent 50054dfa4f
commit 278a9bef1d
No known key found for this signature in database
GPG Key ID: B755FB6870B30F63

@ -1,8 +0,0 @@
**/node_modules/**
**/*.min.js
assets/**
client/libs/**
coverage/**
repo/**
data/**
logs/**

@ -14,3 +14,11 @@ globals:
navigator: false
window: false
WIKI: true
ignorePatterns:
- '**/node_modules/**'
- '**/*.min.js'
- 'assets/**'
- 'coverage/**'
- 'repo/**'
- 'data/**'
- 'logs/**'

5
.gitignore vendored

@ -18,13 +18,8 @@ npm-debug.log*
# Generated assets
/assets
/assets-legacy
/server/views/base.pug
# Webpack
.webpack-cache
.fusebox
# Config Files
/config.yml

@ -0,0 +1,9 @@
echo "Downloading latest assets..."
wget -q -O noto-emoji.tar.gz https://github.com/googlefonts/noto-emoji/archive/refs/heads/main.tar.gz
echo "Extracting assets..."
tar --strip-components=1 -xzf noto-emoji.tar.gz noto-emoji-main/svg
echo "Building asar..."
npx @electron/asar pack svg noto-emoji.asar
echo "Cleaning up..."
rm -rf svg noto-emoji.tar.gz
echo "Done."

@ -15,7 +15,7 @@ module.exports = {
isInstallable: true,
async check () {
try {
this.isInstalled = await fs.pathExists(path.join(process.cwd(), 'node_modules/puppeteer-core/.local-chromium'))
this.isInstalled = await fs.pathExists(path.join(WIKI.SERVERPATH, 'node_modules/puppeteer-core/.local-chromium'))
} catch (err) {
this.isInstalled = false
}
@ -24,7 +24,7 @@ module.exports = {
async install () {
try {
const { stdout, stderr } = await exec('node install.js', {
cwd: path.join(process.cwd(), 'node_modules/puppeteer-core'),
cwd: path.join(WIKI.SERVERPATH, 'node_modules/puppeteer-core'),
timeout: 300000,
windowsHide: true
})

@ -15,17 +15,17 @@ module.exports = {
isInstalled: false,
isInstallable: true,
async check () {
this.isInstalled = await fs.pathExists(path.join(process.cwd(), 'node_modules/sharp/wiki_installed.txt'))
this.isInstalled = await fs.pathExists(path.join(WIKI.SERVERPATH, 'node_modules/sharp/wiki_installed.txt'))
return this.isInstalled
},
async install () {
try {
const { stdout, stderr } = await exec('node install/libvips && node install/dll-copy', {
cwd: path.join(process.cwd(), 'node_modules/sharp'),
cwd: path.join(WIKI.SERVERPATH, 'node_modules/sharp'),
timeout: 120000,
windowsHide: true
})
await fs.ensureFile(path.join(process.cwd(), 'node_modules/sharp/wiki_installed.txt'))
await fs.ensureFile(path.join(WIKI.SERVERPATH, 'node_modules/sharp/wiki_installed.txt'))
this.isInstalled = true
WIKI.logger.info(stdout)
WIKI.logger.warn(stderr)

@ -494,7 +494,7 @@ onMounted(async () => {
// this.cm.on('paste', this.onCmPaste)
// // Render initial preview
// this.processContent(this.$store.get('editor/content'))
processContent(pageStore.content)
nextTick(() => {
cm.value.refresh()
cm.value.focus()

@ -116,6 +116,7 @@ import { useMeta, useQuasar, setCssVar } from 'quasar'
import { useI18n } from 'vue-i18n'
import { useEditorStore } from 'src/stores/editor'
import { useSiteStore } from 'src/stores/site'
// QUASAR
@ -124,6 +125,7 @@ const $q = useQuasar()
// STORES
const editorStore = useEditorStore()
const siteStore = useSiteStore()
// I18N
@ -494,7 +496,9 @@ const menuBar = [
icon: 'mdi-image-plus',
title: 'Image',
action: () => {
// TODO: insert image
siteStore.$patch({
overlay: 'FileManager'
})
}
},
{

Loading…
Cancel
Save