Commit 11fe8bcc authored by Piotr Gawron's avatar Piotr Gawron
Browse files

external css files are bundled

parent f117d3f5
......@@ -791,17 +791,6 @@
}
}
},
"clean-css-cli": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/clean-css-cli/-/clean-css-cli-4.2.1.tgz",
"integrity": "sha512-ST2yi9F2kAmLRs9phSpGRUm44SbRy29QGm1OuAKfTU0KCLilFMTcz+/Fxhbdi5GrsjIMhTBdFUQhc55CjM3Isw==",
"dev": true,
"requires": {
"clean-css": "^4.2.1",
"commander": "2.x",
"glob": "7.x"
}
},
"cli": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
......
......@@ -4,7 +4,7 @@
"description": "frontend for minerva google maps interface",
"main": "minerva.js",
"scripts": {
"build:css": "cleancss --skip-rebase -o dist/minerva.css node_modules/openlayers/dist/ol.css node_modules/dual-listbox/dist/*.css node_modules/multi-checkbox-list/dist/*.css src/main/css/*.css",
"build:css": "node scripts/build-css.js",
"build:js": "browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js ",
"build-browser-check:js": "browserify --debug --standalone BrowserCheck src/main/js/BrowserCheck.js | exorcist dist/BrowserCheck.js.map > dist/BrowserCheck.js ",
"//": "rm -rf dist & rmdir /q /s dist & mkdir dist & browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js & uglifyjs --compress --mangle --in-source-map dist/minerva.js.map --source-map-include-sources --source-map dist/minerva.min.js.map -o dist/minerva.min.js dist/minerva.js",
......@@ -22,7 +22,7 @@
"bluebird": "^3.5.2",
"browserify": "^13.1.1",
"chai": "^3.5.0",
"clean-css-cli": "^4.2.1",
"clean-css": "^4.2.1",
"del": "^3.0.0",
"exorcist": "^0.4.0",
"file-url": "^2.0.0",
......
var process = require('process');
var fs = require('fs');
var CleanCSS = require('clean-css');
return new CleanCSS({rebase: false, returnPromise: true}).minify([
"node_modules/jquery-ui/themes/base/jquery.ui.all.css",
"node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/openlayers/dist/ol.css",
"node_modules/dual-listbox/dist/dual-listbox.css",
"node_modules/multi-checkbox-list/dist/multi-checkbox-list.css",
"src/main/css/global.css"
]).then(function (output) {
if (output.errors.length > 0) {
console.log("Problem with css: ", output.errors);
process.exit(-1);
}
if (output.warnings.length > 0) {
console.log("Problem with css: ", output.warnings);
process.exit(-2);
}
fs.writeFile("dist/minerva.css", output.styles, function (err) {
if (err) {
console.log("Problem with writing to file", err);
process.exit(-3);
}
});
}).catch(function (err) {
console.log(err);
process.exit(-4);
});
body {
font-size: 14px;
}
.ui-widget-content a {
text-decoration: underline;
}
......
......@@ -10,11 +10,9 @@
<h:head>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/rowreorder/1.2.3/css/rowReorder.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css"/>
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<link rel="shortcut icon" href="./resources/images/favicon.png" type="image/png" />
......@@ -52,11 +50,6 @@
</h:head>
<h:body onload="initMap();" >
<h:outputStylesheet library="css" name="style.css"/>
<h:outputStylesheet library="css" name="minerva.css" />
<h:outputStylesheet library="css" name="pileup.css"/>
<h:outputStylesheet library="css" name="bootstrap.min.css"/>
<div id="minervaAppDiv" style="height: 100%;width: 100%;margin: 0;"></div>
</h:body>
</f:view>
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment