-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade UI, add training configs
- Loading branch information
Showing
16 changed files
with
1,148 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ __pycache__/ | |
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
# build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,83 @@ | ||
import { spawn } from 'child_process'; | ||
import svelte from 'rollup-plugin-svelte'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import terser from '@rollup/plugin-terser'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import livereload from 'rollup-plugin-livereload'; | ||
import css from 'rollup-plugin-css-only'; | ||
import { spawn } from "child_process"; | ||
import svelte from "rollup-plugin-svelte"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import terser from "@rollup/plugin-terser"; | ||
import resolve from "@rollup/plugin-node-resolve"; | ||
import livereload from "rollup-plugin-livereload"; | ||
import css from "rollup-plugin-css-only"; | ||
import json from "@rollup/plugin-json"; | ||
|
||
const production = !process.env.ROLLUP_WATCH; | ||
|
||
function serve() { | ||
let server; | ||
let server; | ||
|
||
function toExit() { | ||
if (server) server.kill(0); | ||
} | ||
function toExit() { | ||
if (server) server.kill(0); | ||
} | ||
|
||
return { | ||
writeBundle() { | ||
if (server) return; | ||
server = spawn('npm', ['run', 'start', '--', '--dev'], { | ||
stdio: ['ignore', 'inherit', 'inherit'], | ||
shell: true | ||
}); | ||
return { | ||
writeBundle() { | ||
if (server) return; | ||
server = spawn("npm", ["run", "start", "--", "--dev"], { | ||
stdio: ["ignore", "inherit", "inherit"], | ||
shell: true, | ||
}); | ||
|
||
process.on('SIGTERM', toExit); | ||
process.on('exit', toExit); | ||
} | ||
}; | ||
process.on("SIGTERM", toExit); | ||
process.on("exit", toExit); | ||
}, | ||
}; | ||
} | ||
|
||
export default { | ||
input: 'src/main.js', | ||
output: { | ||
sourcemap: true, | ||
format: 'iife', | ||
name: 'app', | ||
file: 'public/build/bundle.js' | ||
}, | ||
plugins: [ | ||
svelte({ | ||
compilerOptions: { | ||
// enable run-time checks when not in production | ||
dev: !production | ||
} | ||
}), | ||
// we'll extract any component CSS out into | ||
// a separate file - better for performance | ||
css({ output: 'bundle.css' }), | ||
input: "src/main.js", | ||
output: { | ||
sourcemap: true, | ||
format: "iife", | ||
name: "app", | ||
file: "public/build/bundle.js", | ||
}, | ||
plugins: [ | ||
svelte({ | ||
compilerOptions: { | ||
// enable run-time checks when not in production | ||
dev: !production, | ||
}, | ||
}), | ||
// we'll extract any component CSS out into | ||
// a separate file - better for performance | ||
css({ output: "bundle.css" }), | ||
|
||
// If you have external dependencies installed from | ||
// npm, you'll most likely need these plugins. In | ||
// some cases you'll need additional configuration - | ||
// consult the documentation for details: | ||
// https://github.com/rollup/plugins/tree/master/packages/commonjs | ||
resolve({ | ||
browser: true, | ||
dedupe: ['svelte'], | ||
exportConditions: ['svelte'] | ||
}), | ||
commonjs(), | ||
// If you have external dependencies installed from | ||
// npm, you'll most likely need these plugins. In | ||
// some cases you'll need additional configuration - | ||
// consult the documentation for details: | ||
// https://github.com/rollup/plugins/tree/master/packages/commonjs | ||
resolve({ | ||
browser: true, | ||
dedupe: ["svelte"], | ||
exportConditions: ["svelte"], | ||
}), | ||
commonjs(), | ||
|
||
// In dev mode, call `npm run start` once | ||
// the bundle has been generated | ||
!production && serve(), | ||
json({ | ||
compact: true, | ||
}), | ||
|
||
// Watch the `public` directory and refresh the | ||
// browser on changes when not in production | ||
!production && livereload('public'), | ||
// In dev mode, call `npm run start` once | ||
// the bundle has been generated | ||
!production && serve(), | ||
|
||
// If we're building for production (npm run build | ||
// instead of npm run dev), minify | ||
production && terser() | ||
], | ||
watch: { | ||
clearScreen: false | ||
} | ||
// Watch the `public` directory and refresh the | ||
// browser on changes when not in production | ||
!production && livereload("public"), | ||
|
||
// If we're building for production (npm run build | ||
// instead of npm run dev), minify | ||
production && terser(), | ||
], | ||
watch: { | ||
clearScreen: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.