Für die Svelte-Oberfläche sind alle notwendigen Dateien vorhanden.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = false
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
public
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "svelte-demo",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"autobuild": "rollup -c -w",
|
||||
"dev": "run-p start:dev autobuild",
|
||||
"start": "sirv public --single",
|
||||
"start:dev": "sirv public --dev --single"
|
||||
},
|
||||
"dependencies": {
|
||||
"ganalytics": "^3.1.2",
|
||||
"navaid": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^15.0.0",
|
||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
||||
"@rollup/plugin-replace": "^2.3.0",
|
||||
"npm-run-all": "^4.1.3",
|
||||
"rollup": "^2.30.0",
|
||||
"rollup-plugin-svelte": "^6.0.0",
|
||||
"rollup-plugin-terser": "^7.0.0",
|
||||
"sirv-cli": "^1.0.8",
|
||||
"svelte": "^3.4.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<html lang="de">
|
||||
<head>
|
||||
<base href="/" />
|
||||
<meta charset="utf8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
|
||||
<title>Svelte app</title>
|
||||
|
||||
<link rel="stylesheet" href="/global.css">
|
||||
<link rel="stylesheet" href="/bundle.css">
|
||||
<script type="module" data-main="/index.js"></script>
|
||||
<script nomodule data-main="/index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,49 @@
|
||||
import svelte from 'rollup-plugin-svelte';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
|
||||
const production = !process.env.ROLLUP_WATCH;
|
||||
|
||||
export default {
|
||||
input: 'src/index.js',
|
||||
output: {
|
||||
name: 'app',
|
||||
format: 'esm',
|
||||
sourcemap: true,
|
||||
dir: 'public',
|
||||
},
|
||||
preserveEntrySignatures: false,
|
||||
plugins: [
|
||||
svelte({
|
||||
// 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: css => {
|
||||
css.write('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/rollup-plugin-commonjs
|
||||
resolve(),
|
||||
commonjs(),
|
||||
|
||||
replace({
|
||||
'process.env.NODE_ENV': JSON.stringify(production ? 'production' : 'development')
|
||||
}),
|
||||
|
||||
// If we're building for production (npm run build
|
||||
// instead of npm run dev), minify
|
||||
production && terser()
|
||||
],
|
||||
|
||||
watch: {
|
||||
clearScreen: false
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user