Copy run scripting into output folder

This commit is contained in:
space-nuko
2023-05-05 21:31:07 -05:00
parent df4f2b2d57
commit 432ac95c94
9 changed files with 54 additions and 10 deletions

11
bin/run.bat Normal file
View File

@@ -0,0 +1,11 @@
@echo off
echo Starting ComfyBox.
echo Be sure you've started ComfyUI already using this command:
echo[
echo python main.py --enable-cors-header
echo[
echo Serving at http://localhost:8000
echo[
python -m http.server 8000

11
bin/run.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env sh
echo "Starting ComfyBox."
echo "Be sure you've started ComfyUI already using this command:"
echo ""
echo " python main.py --enable-cors-header"
echo ""
echo "Serving at http://localhost:8000"
echo ""
python -m http.server 8000

0
dist/.keep vendored
View File

View File

@@ -27,6 +27,7 @@
"svelte-dnd-action": "^0.9.22", "svelte-dnd-action": "^0.9.22",
"typescript": "^5.0.3", "typescript": "^5.0.3",
"vite": "^4.3.1", "vite": "^4.3.1",
"vite-plugin-static-copy": "^0.14.0",
"vite-tsconfig-paths": "^4.0.8", "vite-tsconfig-paths": "^4.0.8",
"vitest": "^0.25.8" "vitest": "^0.25.8"
}, },

16
pnpm-lock.yaml generated
View File

@@ -125,6 +125,9 @@ importers:
vite: vite:
specifier: ^4.3.1 specifier: ^4.3.1
version: 4.3.1(sass@1.61.0) version: 4.3.1(sass@1.61.0)
vite-plugin-static-copy:
specifier: ^0.14.0
version: 0.14.0(vite@4.3.1)
vite-tsconfig-paths: vite-tsconfig-paths:
specifier: ^4.0.8 specifier: ^4.0.8
version: 4.0.8(typescript@5.0.3)(vite@4.3.1) version: 4.0.8(typescript@5.0.3)(vite@4.3.1)
@@ -7084,6 +7087,19 @@ packages:
vite: 4.3.1(sass@1.61.0) vite: 4.3.1(sass@1.61.0)
dev: false dev: false
/vite-plugin-static-copy@0.14.0(vite@4.3.1):
resolution: {integrity: sha512-RMFmb4czomcrsbQBiUZs9HcDGN3kxGvF+OrtkfTVocp12CuoUCuJQhcY26RK35A6KS4WasGzEwcYZqHMjkAvVw==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
vite: ^3.0.0 || ^4.0.0
dependencies:
chokidar: 3.5.3
fast-glob: 3.2.12
fs-extra: 11.1.1
picocolors: 1.0.0
vite: 4.3.1(sass@1.61.0)
dev: true
/vite-tsconfig-paths@4.0.8(typescript@5.0.3)(vite@4.3.1): /vite-tsconfig-paths@4.0.8(typescript@5.0.3)(vite@4.3.1):
resolution: {integrity: sha512-p04zH+Ey+NT78571x0pdX7nVRIJSlmKVvYryFglSWOK3Hc72eDL0+JJfbyQiugaIBApJkaEqbBQvqpsFZOSVGg==} resolution: {integrity: sha512-p04zH+Ey+NT78571x0pdX7nVRIJSlmKVvYryFglSWOK3Hc72eDL0+JJfbyQiugaIBApJkaEqbBQvqpsFZOSVGg==}
peerDependencies: peerDependencies:

View File

@@ -1,4 +0,0 @@
@echo off
pushd dist
python -m http.server 8000

4
run.sh
View File

@@ -1,4 +0,0 @@
#!/usr/bin/env sh
pushd dist/
python -m http.server 8000

View File

@@ -3,12 +3,25 @@ import { defineConfig } from 'vitest/config';
import { resolve } from 'path'; import { resolve } from 'path';
import tsconfigPaths from 'vite-tsconfig-paths'; import tsconfigPaths from 'vite-tsconfig-paths';
import FullReload from 'vite-plugin-full-reload'; import FullReload from 'vite-plugin-full-reload';
import { viteStaticCopy } from 'vite-plugin-static-copy'
export default defineConfig({ export default defineConfig({
clearScreen: false, clearScreen: false,
plugins: [ plugins: [
FullReload(["src/**/*.{js,ts,svelte}"]), FullReload(["src/**/*.{js,ts,svelte}"]),
svelte(), svelte(), ,
viteStaticCopy({
targets: [
{
src: 'bin/run.sh',
dest: './'
},
{
src: 'bin/run.bat',
dest: './'
}
]
})
], ],
resolve: { resolve: {
alias: { alias: {