Cleanup vite.config.js and fix scripts in package.json
- Make sure rm isn't called when there are no files to delete
This commit is contained in:
parent
f9f1a30921
commit
325b8831f2
3 changed files with 4 additions and 4 deletions
|
@ -42,8 +42,8 @@
|
|||
"generate:charging-stations": "cd ./assets/layers/charging_station && vite-node csvToJson.ts && cd -",
|
||||
"prepare-deploy": "npm run generate:service-worker && ./scripts/build.sh",
|
||||
"format": "npx prettier --write --svelte-bracket-new-line=false --html-whitespace-sensitivity=ignore '**/*.ts' '**/*.svelte'",
|
||||
"clean:tests": "(find . -type f -name \"*.doctest.ts\" | xargs rm)",
|
||||
"clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|preferences\\|customGenerator\\|professional\\|automaton\\|import_helper\\|import_viewer\\|theme\\).html\" | xargs rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs rm) && (ls | grep \".*.webmanifest$\" | grep -v \"manifest.webmanifest\" | xargs rm)",
|
||||
"clean:tests": "(find . -type f -name \"*.doctest.ts\" | xargs -r rm)",
|
||||
"clean": "rm -rf .cache/ && (find *.html | grep -v \"^\\(404\\|index\\|land\\|test\\|preferences\\|customGenerator\\|professional\\|automaton\\|import_helper\\|import_viewer\\|theme\\).html\" | xargs -r rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs -r rm) && (ls | grep \".*.webmanifest$\" | grep -v \"manifest.webmanifest\" | xargs -r rm)",
|
||||
"generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot",
|
||||
"weblate-add-upstream": "git remote add weblate-github git@github.com:weblate/MapComplete.git",
|
||||
"weblate-merge": "git remote update weblate-github; git merge weblate-github/weblate-mapcomplete-core weblate-github/weblate-mapcomplete-layers weblate-github/weblate-mapcomplete-layer-translations",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"
|
||||
|
||||
export default {
|
||||
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
|
||||
// for more information about preprocessors
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { defineConfig } from "vite"
|
||||
import { svelte } from "@sveltejs/vite-plugin-svelte"
|
||||
import autoPreprocess, { scss } from "svelte-preprocess";
|
||||
import fs from "fs"
|
||||
|
||||
const allHtmlFiles = fs.readdirSync(".").filter((f) => f.endsWith(".html"))
|
||||
|
@ -19,7 +18,7 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
base: `${ASSET_URL}`,
|
||||
plugins: [svelte({preprocess: [scss() , autoPreprocess()]})],
|
||||
plugins: [svelte()],
|
||||
server: {
|
||||
port: 1234,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue