mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-25 06:53:00 +00:00
Build css with rollup too!
This commit is contained in:
parent
6882ff4737
commit
c45db0ddee
7 changed files with 3125 additions and 7 deletions
8
build
8
build
|
@ -136,10 +136,10 @@ function task_client {
|
||||||
cp client_src/index.html "${build_output_folder}";
|
cp client_src/index.html "${build_output_folder}";
|
||||||
task_end $?;
|
task_end $?;
|
||||||
|
|
||||||
task_begin "Copying css";
|
# task_begin "Copying css";
|
||||||
# FUTURE: Package this up too?
|
# # FUTURE: Package this up too?
|
||||||
cp -r client_src/css/ "${build_output_folder}";
|
# cp -r client_src/css/ "${build_output_folder}";
|
||||||
task_end $?;
|
# task_end $?;
|
||||||
}
|
}
|
||||||
|
|
||||||
function task_client-watch {
|
function task_client-watch {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
@import "../../node_modules/leaflet/dist/leaflet.css";
|
|
@ -5,10 +5,10 @@
|
||||||
<title>Air Quality Map | ConnectedHumber</title>
|
<title>Air Quality Map | ConnectedHumber</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
content here
|
|
||||||
|
|
||||||
<!---------------->
|
<!---------------->
|
||||||
<link rel="stylesheet" href="/css/main.css" />
|
<link rel="stylesheet" href="client.css" />
|
||||||
<script src="app.js" charset="utf-8"></script>
|
<script src="app.js" charset="utf-8"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
import '../css/main.css';
|
||||||
|
|
||||||
window.addEventListener("load", function(_event) {
|
window.addEventListener("load", function(_event) {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
3094
package-lock.json
generated
3094
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -23,8 +23,11 @@
|
||||||
"leaflet-webgl-heatmap": "^0.2.7"
|
"leaflet-webgl-heatmap": "^0.2.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"postcss-import": "^12.0.1",
|
||||||
|
"postcss-url": "^8.0.0",
|
||||||
"rollup": "^1.1.0",
|
"rollup": "^1.1.0",
|
||||||
"rollup-plugin-commonjs": "^9.2.0",
|
"rollup-plugin-commonjs": "^9.2.0",
|
||||||
"rollup-plugin-node-resolve": "^4.0.0"
|
"rollup-plugin-node-resolve": "^4.0.0",
|
||||||
|
"rollup-plugin-postcss": "^1.6.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
import resolve from 'rollup-plugin-node-resolve';
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
import commonjs from 'rollup-plugin-commonjs';
|
import commonjs from 'rollup-plugin-commonjs';
|
||||||
|
import postcss from 'rollup-plugin-postcss';
|
||||||
|
|
||||||
|
import postcss_import from 'postcss-import';
|
||||||
|
import postcss_url from 'postcss-url';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: 'client_src/js/index.mjs',
|
input: 'client_src/js/index.mjs',
|
||||||
|
@ -33,6 +37,20 @@ export default {
|
||||||
|
|
||||||
commonjs({
|
commonjs({
|
||||||
|
|
||||||
|
}),
|
||||||
|
|
||||||
|
postcss({
|
||||||
|
plugins: [
|
||||||
|
postcss_import({}),
|
||||||
|
postcss_url({
|
||||||
|
url: "rebase"
|
||||||
|
})
|
||||||
|
],
|
||||||
|
// Save it to a .css file - we'll reference it ourselves thank you
|
||||||
|
// very much
|
||||||
|
extract: true,
|
||||||
|
sourceMap: true,
|
||||||
|
//minimize: true, // Causes an error at the moment for some reason
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue