Remove commented out es6, change zopfli compression to use more iterations
This commit is contained in:
parent
4254437d7c
commit
f7b7231303
16 changed files with 10 additions and 65 deletions
12
compress
Normal file → Executable file
12
compress
Normal file → Executable file
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
echo "compressing app.css and prism files"
|
echo "compressing app.css and prism files"
|
||||||
zopfli ./public/assets/css/app.css
|
zopfli --i1000 ./public/assets/css/app.css
|
||||||
zopfli ./public/assets/prism/prism.css
|
zopfli --i1000 ./public/assets/prism/prism.css
|
||||||
zopfli ./public/assets/prism/prism.js
|
zopfli --i1000 ./public/assets/prism/prism.js
|
||||||
bro --force --quality 11 --input ./public/assets/css/app.css --output ./public/assets/css/app.css.br
|
bro --force --quality 11 --input ./public/assets/css/app.css --output ./public/assets/css/app.css.br
|
||||||
bro --force --quality 11 --input ./public/assets/prism/prism.css --output ./public/assets/prism/prism.css.br
|
bro --force --quality 11 --input ./public/assets/prism/prism.css --output ./public/assets/prism/prism.css.br
|
||||||
bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./public/assets/prism/prism.js.br
|
bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./public/assets/prism/prism.js.br
|
||||||
|
@ -11,13 +11,13 @@ bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./publi
|
||||||
echo "compressing js assets"
|
echo "compressing js assets"
|
||||||
for file in ./public/assets/js/*.js
|
for file in ./public/assets/js/*.js
|
||||||
do
|
do
|
||||||
zopfli $file
|
zopfli --i1000 $file
|
||||||
bro --force --quality 11 --input $file --output $file.br
|
bro --force --quality 11 --input $file --output $file.br
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "compressing frontend assets"
|
echo "compressing frontend assets"
|
||||||
for file in ./public/assets/frontend/*.css
|
for file in ./public/assets/frontend/*.css
|
||||||
do
|
do
|
||||||
zopfli $file
|
zopfli --i1000 $file
|
||||||
bro --force --quality 11 --input $file --output $file.br
|
bro --force --quality 11 --input $file --output $file.br
|
||||||
done
|
done
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1 +1 @@
|
||||||
{"version":3,"sources":["webpack:/webpack/bootstrap 24cf952e7b9c5a5d4532?f9c7*","webpack:///piwik.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","21","_paq","push"],"mappings":"mBACA,GAAAA,oBAGA,SAAAC,qBAAAC,UAGA,GAAAF,iBAAAE,UACA,MAAAF,kBAAAE,UAAAC,OAGA,IAAAC,QAAAJ,iBAAAE,WACAG,EAAAH,SACAI,EAAA,MACAH,WAIAI,SAAAL,UAAAM,KAAAJ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAF,oBAGAG,QAAAE,EAAA,IAGA,OAAAF,QAAAD,QAKAF,oBAAAQ,EAAAF,OAGAN,qBAAAS,EAAAV,gBAGAC,qBAAAI,EAAA,SAAAM,OAA2C,MAAAA,OAG3CV,qBAAAW,EAAA,SAAAT,QAAAU,KAAAC,QACA,IAAAb,oBAAAc,EAAAZ,QAAAU,MAAA,CACAG,OAAAC,eAAAd,QAAAU,MACAK,aAAA,MACAC,WAAA,KACAC,IAAAN,UAMAb,qBAAAoB,EAAA,SAAAjB,QACA,GAAAU,QAAAV,QAAAA,OAAAkB,WACA,QAAAC,cAA2B,MAAAnB,QAAA,YAC3B,QAAAoB,oBAAiC,MAAApB,QACjCH,qBAAAW,EAAAE,OAAA,IAAAA,OACA,OAAAA,QAIAb,qBAAAc,EAAA,SAAAU,OAAAC,UAAsD,MAAAV,QAAAW,UAAAC,eAAApB,KAAAiB,OAAAC,UAGtDzB,qBAAA4B,EAAA,EAGA,OAAA5B,qBAAAA,oBAAA6B,EAAA,OAAAC,GAAA,SAAA3B,OAAAD,QAAAF,qBAAA,YC9DA,IAAI+B,MAAOA,QAEXA,MAAKC,MAAM,iBACXD,MAAKC,MAAM,sBACXD,MAAKC,MAAM,gBAAiB,sCAC5BD,MAAKC,MAAM,YAAa","file":"./public/assets/js/piwik.js","sourceRoot":"","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24cf952e7b9c5a5d4532","// Piwik in its own js file to allow usage with a CSP policy\n\nvar _paq = _paq || [];\n// tracker methods like \"setCustomDimension\" should be called before \"trackPageView\"\n_paq.push(['trackPageView']);\n_paq.push(['enableLinkTracking']);\n_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);\n_paq.push(['setSiteId', '1']);\n\n\n\n// WEBPACK FOOTER //\n// ./piwik.js"]}
|
{"version":3,"sources":["webpack:/webpack/bootstrap c9239bfae896ced9ce98?510e*","webpack:///piwik.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","getDefault","getModuleExports","object","property","prototype","hasOwnProperty","p","s","_paq","push"],"mappings":"mBACA,GAAAA,oBAGA,SAAAC,qBAAAC,UAGA,GAAAF,iBAAAE,UACA,MAAAF,kBAAAE,UAAAC,OAGA,IAAAC,QAAAJ,iBAAAE,WACAG,EAAAH,SACAI,EAAA,MACAH,WAIAI,SAAAL,UAAAM,KAAAJ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAF,oBAGAG,QAAAE,EAAA,IAGA,OAAAF,QAAAD,QAKAF,oBAAAQ,EAAAF,OAGAN,qBAAAS,EAAAV,gBAGAC,qBAAAI,EAAA,SAAAM,OAA2C,MAAAA,OAG3CV,qBAAAW,EAAA,SAAAT,QAAAU,KAAAC,QACA,IAAAb,oBAAAc,EAAAZ,QAAAU,MAAA,CACAG,OAAAC,eAAAd,QAAAU,MACAK,aAAA,MACAC,WAAA,KACAC,IAAAN,UAMAb,qBAAAoB,EAAA,SAAAjB,QACA,GAAAU,QAAAV,QAAAA,OAAAkB,WACA,QAAAC,cAA2B,MAAAnB,QAAA,YAC3B,QAAAoB,oBAAiC,MAAApB,QACjCH,qBAAAW,EAAAE,OAAA,IAAAA,OACA,OAAAA,QAIAb,qBAAAc,EAAA,SAAAU,OAAAC,UAAsD,MAAAV,QAAAW,UAAAC,eAAApB,KAAAiB,OAAAC,UAGtDzB,qBAAA4B,EAAA,EAGA,OAAA5B,qBAAAA,oBAAA6B,EAAA,mEC9DA,IAAIC,MAAOA,QAEXA,MAAKC,MAAM,iBACXD,MAAKC,MAAM,sBACXD,MAAKC,MAAM,gBAAiB,sCAC5BD,MAAKC,MAAM,YAAa","file":"./public/assets/js/piwik.js","sourceRoot":"","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c9239bfae896ced9ce98","// Piwik in its own js file to allow usage with a CSP policy\n\nvar _paq = _paq || [];\n// tracker methods like \"setCustomDimension\" should be called before \"trackPageView\"\n_paq.push(['trackPageView']);\n_paq.push(['enableLinkTracking']);\n_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);\n_paq.push(['setSiteId', '1']);\n\n\n\n// WEBPACK FOOTER //\n// ./piwik.js"]}
|
Binary file not shown.
Binary file not shown.
|
@ -73,61 +73,6 @@ export default function makeNewPlaceForm(map) {
|
||||||
form.appendChild(newPlaceLatitudeDiv);
|
form.appendChild(newPlaceLatitudeDiv);
|
||||||
form.appendChild(newPlaceLongitudeDiv);
|
form.appendChild(newPlaceLongitudeDiv);
|
||||||
form.appendChild(newPlaceSubmit);
|
form.appendChild(newPlaceSubmit);
|
||||||
//the event listener for the new place form
|
|
||||||
/*placeSubmit.addEventListener('click', function () {
|
|
||||||
//create the form data to send
|
|
||||||
var formData = new FormData();
|
|
||||||
formData.append('place-name', document.querySelector('#place-name').value);
|
|
||||||
formData.append('place-description', document.querySelector('#place-description').value);
|
|
||||||
formData.append('place-latitude', document.querySelector('#place-latitude').value);
|
|
||||||
formData.append('place-longitude', document.querySelector('#place-longitude').value);
|
|
||||||
//post the new place
|
|
||||||
fetch('/micropub/places', {
|
|
||||||
//send cookies with the request
|
|
||||||
credentials: 'same-origin',
|
|
||||||
method: 'post',
|
|
||||||
body: formData
|
|
||||||
})
|
|
||||||
.then(function (response) {
|
|
||||||
return response.json();
|
|
||||||
})
|
|
||||||
.then(function (placeJson) {
|
|
||||||
if (placeJson.error === true) {
|
|
||||||
throw new Error(placeJson.error_description);
|
|
||||||
}
|
|
||||||
//remove un-needed form elements
|
|
||||||
//iterate through labels and remove parent div elements
|
|
||||||
var labels = document.querySelectorAll('.place-label');
|
|
||||||
for (var i = 0; i < labels.length; ++i) {
|
|
||||||
form.removeChild(labels[i].parentNode);
|
|
||||||
}
|
|
||||||
form.removeChild(document.querySelector('#place-submit'));
|
|
||||||
var newPlaceButton = document.querySelector('#create-new-place');
|
|
||||||
//in order to remove a DOM Node, you need to run removeChild on the parent Node
|
|
||||||
newPlaceButton.parentNode.removeChild(newPlaceButton);
|
|
||||||
//add place marker
|
|
||||||
var newOption = document.createElement('option');
|
|
||||||
newOption.setAttribute('value', placeJson.uri);
|
|
||||||
newOption.appendChild(document.createTextNode(placeJson.name));
|
|
||||||
newOption.dataset.latitude = placeJson.latitude;
|
|
||||||
newOption.dataset.longitude = placeJson.longitude;
|
|
||||||
selectEl.appendChild(newOption);
|
|
||||||
var newPlaceMarkerIcon = document.createElement('div');
|
|
||||||
newPlaceMarkerIcon.classList.add('marker');
|
|
||||||
new mapboxgl.Marker(newPlaceMarkerIcon, {offset: [-10, -20]}).setLngLat([placeJson.longitude, placeJson.latitude]).addTo(map);
|
|
||||||
map.flyTo({center: [placeJson.longitude, placeJson.latitude]});
|
|
||||||
|
|
||||||
newPlaceMarkerIcon.addEventListener('click', function () {
|
|
||||||
map.flyTo({center: [placeJson.longitude, placeJson.latitude]});
|
|
||||||
selectPlace(placeJson.uri);
|
|
||||||
});
|
|
||||||
//make selected
|
|
||||||
selectPlace(placeJson.uri);
|
|
||||||
}).catch(function (placeError) {
|
|
||||||
alertify.reset();
|
|
||||||
alertify.error(placeError);
|
|
||||||
});
|
|
||||||
});*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return newLocationButton;
|
return newLocationButton;
|
||||||
|
|
Loading…
Add table
Reference in a new issue