added css to rollup config
This commit is contained in:
parent
793ce4ca2d
commit
fd8da4968c
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,8 +4,9 @@ wetter/config/db.py
|
||||
# JavaScript modules
|
||||
node_modules
|
||||
|
||||
# JavaScript output
|
||||
# Bundle output
|
||||
wetter/static/js
|
||||
wetter/static/css
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
1433
package-lock.json
generated
1433
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@
|
||||
"@rollup/plugin-commonjs": "^11.0.2",
|
||||
"@rollup/plugin-node-resolve": "^7.1.1",
|
||||
"rollup": "^1.32.1",
|
||||
"rollup-plugin-scss": "^2.1.0",
|
||||
"rollup-plugin-terser": "^5.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -1,15 +1,28 @@
|
||||
import resolve from "@rollup/plugin-node-resolve";
|
||||
import commonjs from "@rollup/plugin-commonjs";
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
import css from "rollup-plugin-scss";
|
||||
|
||||
const production = process.env.NODE_ENV === "production";
|
||||
|
||||
export default {
|
||||
const config = {
|
||||
input: "wetter/static/wetter/js/wetter.js",
|
||||
output: {
|
||||
dir: "wetter/static/js",
|
||||
format: "iife",
|
||||
sourcemap: !production
|
||||
},
|
||||
plugins: [resolve(), commonjs(), !production && terser()]
|
||||
plugins: [
|
||||
css({
|
||||
output: "wetter/static/css/bundle.css",
|
||||
outFile: "wetter/static/css/bundle.css",
|
||||
outputStyle: production ? "compressed" : "expanded",
|
||||
sourceMap: !production
|
||||
}),
|
||||
resolve(),
|
||||
commonjs(),
|
||||
production && terser()
|
||||
]
|
||||
};
|
||||
|
||||
export default [config];
|
||||
|
@ -1,9 +1,20 @@
|
||||
import "bootstrap";
|
||||
import "../../../../node_modules/bootstrap/dist/css/bootstrap.css";
|
||||
|
||||
import "datatables";
|
||||
import "../../../../node_modules/datatables/media/css/jquery.dataTables.css";
|
||||
|
||||
import $ from "jquery";
|
||||
|
||||
import "leaflet";
|
||||
import "../../../../node_modules/leaflet/dist/leaflet.css";
|
||||
|
||||
import "moment";
|
||||
|
||||
import "tempusdominus-bootstrap-4";
|
||||
import "../../../../node_modules/tempusdominus-bootstrap-4/build/css/tempusdominus-bootstrap-4.css";
|
||||
|
||||
import "../css/wetter.css";
|
||||
|
||||
// Entfernen des Clickoverlay wenn drauf geklickt wurde, #28
|
||||
$(".clickoverlay").on("click", function () {
|
||||
|
Loading…
Reference in New Issue
Block a user