Update Kirby and dependencies
This commit is contained in:
parent
750b9cc83e
commit
8c71a258b6
59 changed files with 2143 additions and 813 deletions
|
@ -1,22 +0,0 @@
|
|||
module.exports = {
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"plugin:cypress/recommended",
|
||||
"plugin:vue/recommended",
|
||||
"prettier"
|
||||
],
|
||||
rules: {
|
||||
"vue/attributes-order": "error",
|
||||
"vue/component-definition-name-casing": "off",
|
||||
"vue/html-closing-bracket-newline": [
|
||||
"error",
|
||||
{
|
||||
singleline: "never",
|
||||
multiline: "always"
|
||||
}
|
||||
],
|
||||
"vue/multi-word-component-names": "off",
|
||||
"vue/require-default-prop": "off",
|
||||
"vue/require-prop-types": "error"
|
||||
}
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"trailingComma": "none"
|
||||
}
|
2
kirby/panel/dist/css/style.css
vendored
2
kirby/panel/dist/css/style.css
vendored
File diff suppressed because one or more lines are too long
2
kirby/panel/dist/js/index.js
vendored
2
kirby/panel/dist/js/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,115 +0,0 @@
|
|||
/* eslint-env node */
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { defineConfig } from "vite";
|
||||
import { createVuePlugin } from "vite-plugin-vue2";
|
||||
import postcssAutoprefixer from "autoprefixer";
|
||||
import postcssCsso from "postcss-csso";
|
||||
import postcssDirPseudoClass from "postcss-dir-pseudo-class";
|
||||
import postcssLogical from "postcss-logical";
|
||||
import pluginRewriteAll from "vite-plugin-rewrite-all";
|
||||
|
||||
let custom;
|
||||
try {
|
||||
custom = require("./vite.config.custom.js");
|
||||
} catch (err) {
|
||||
custom = {};
|
||||
}
|
||||
|
||||
export default defineConfig(({ command }) => {
|
||||
// Tell Kirby that we are in dev mode
|
||||
if (command === "serve") {
|
||||
// Create the flag file on start
|
||||
const runningPath = __dirname + "/.vite-running";
|
||||
fs.closeSync(fs.openSync(runningPath, "w"));
|
||||
|
||||
// Delete the flag file on any kind of exit
|
||||
for (const eventType of ["exit", "SIGINT", "uncaughtException"]) {
|
||||
process.on(eventType, function (err) {
|
||||
if (fs.existsSync(runningPath) === true) {
|
||||
fs.unlinkSync(runningPath);
|
||||
}
|
||||
|
||||
if (eventType === "uncaughtException") {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
process.exit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const proxy = {
|
||||
target: process.env.VUE_APP_DEV_SERVER || "http://sandbox.test",
|
||||
changeOrigin: true,
|
||||
secure: false
|
||||
};
|
||||
|
||||
return {
|
||||
plugins: [createVuePlugin(), pluginRewriteAll()],
|
||||
define: {
|
||||
// Fix vuelidate error
|
||||
"process.env.BUILD": JSON.stringify("production")
|
||||
},
|
||||
build: {
|
||||
minify: "terser",
|
||||
cssCodeSplit: false,
|
||||
rollupOptions: {
|
||||
input: "./src/index.js",
|
||||
output: {
|
||||
entryFileNames: "js/[name].js",
|
||||
chunkFileNames: "js/[name].js",
|
||||
assetFileNames: "[ext]/[name].[ext]"
|
||||
}
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
entries: "src/**/*.{js,vue}",
|
||||
exclude: [
|
||||
"vitest"
|
||||
]
|
||||
},
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [
|
||||
postcssLogical(),
|
||||
postcssDirPseudoClass(),
|
||||
postcssCsso(),
|
||||
postcssAutoprefixer()
|
||||
]
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: "vue",
|
||||
replacement: "vue/dist/vue.esm.js"
|
||||
},
|
||||
{
|
||||
find: "@",
|
||||
replacement: path.resolve(__dirname, "src")
|
||||
}
|
||||
]
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": proxy,
|
||||
"/env": proxy,
|
||||
"/media": proxy
|
||||
},
|
||||
...custom
|
||||
},
|
||||
test: {
|
||||
environment: "jsdom",
|
||||
include: ["**/*.test.js"],
|
||||
coverage: {
|
||||
all: true,
|
||||
exclude: ["**/*.e2e.js", "**/*.test.js"],
|
||||
extension: ["js", "vue"],
|
||||
src: "src",
|
||||
reporter: ["text", "lcov"]
|
||||
},
|
||||
setupFiles: ["vitest.setup.js"]
|
||||
}
|
||||
};
|
||||
});
|
|
@ -1,4 +0,0 @@
|
|||
import Vue from "vue";
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.config.devtools = false;
|
Loading…
Add table
Add a link
Reference in a new issue