Merge branch 'release/0.5.22'

This commit is contained in:
Jonny Barnes 2017-07-06 12:39:41 +01:00
commit b5fa5adaca
25 changed files with 2500 additions and 360 deletions

View file

@ -52,3 +52,5 @@ TWITTER_ACCESS_TOKEN_SECRET=
SCOUT_DRIVER=pgsql
PIWIK=false
PIWIK_ID=1
PIWIK_URL=https://analytics.jmb.lv/piwik.php

View file

@ -1,5 +1,8 @@
# Changelog
## Version 0.5.22 (2017-07-06)
- A small improvement to the piwik tracking script
## Version 0.5.21 (2017-07-04)
- Better logging of micropub requests
- fix a style issue with images

2808
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@
"babel-preset-es2015": "^6.18.0",
"babel-preset-latest": "^6.16.0",
"babel-runtime": "^6.20.0",
"dotenv-webpack": "^1.5.2",
"lint-staged": "^4.0.0",
"pre-commit": "^1.1.3",
"stylelint-config-standard": "^16.0.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=16)}({16:function(module,exports,__webpack_require__){"use strict";var _paq=_paq||[];_paq.push(["trackPageView"]),_paq.push(["enableLinkTracking"]),_paq.push(["setTrackerUrl","https://analytics.jmb.lv/piwik.php"]),_paq.push(["setSiteId","1"])}});
!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=16)}({16:function(module,exports,__webpack_require__){"use strict";var _paq=_paq||[];_paq.push(["setTrackerUrl","https://analytics.jmb.lv/piwik.php"]),_paq.push(["setSiteId","1"]),_paq.push(["trackPageView"]),_paq.push(["enableLinkTracking"])}});
//# sourceMappingURL=piwik.js.map

Binary file not shown.

Binary file not shown.

View file

@ -1 +1 @@
{"version":3,"sources":["webpack:/webpack/bootstrap 9d7c9d0c3e1e7b963a9f?3a34**","webpack:///piwik.js"],"names":["__webpack_require__","moduleId","installedModules","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","default","object","property","prototype","hasOwnProperty","p","s","16","_paq","push"],"mappings":"mBAIA,SAAAA,oBAAAC,UAGA,GAAAC,iBAAAD,UACA,OAAAC,iBAAAD,UAAAE,QAGA,IAAAC,OAAAF,iBAAAD,WACAI,EAAAJ,SACAK,GAAAA,EACAH,YAUA,OANAI,QAAAN,UAAAO,KAAAJ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAH,qBAGAI,OAAAE,GAAAA,EAGAF,OAAAD,QAvBA,IAAAD,oBA4BAF,oBAAAS,EAAAF,QAGAP,oBAAAU,EAAAR,iBAGAF,oBAAAW,EAAA,SAAAR,QAAAS,KAAAC,QACAb,oBAAAc,EAAAX,QAAAS,OACAG,OAAAC,eAAAb,QAAAS,MACAK,cAAAA,EACAC,YAAAA,EACAC,IAAAN,UAMAb,oBAAAoB,EAAA,SAAAhB,QACA,IAAAS,OAAAT,QAAAA,OAAAiB,WACA,WAA2B,OAAAjB,OAAAkB,SAC3B,WAAiC,OAAAlB,QAEjC,OADAJ,oBAAAW,EAAAE,OAAA,IAAAA,QACAA,QAIAb,oBAAAc,EAAA,SAAAS,OAAAC,UAAsD,OAAAT,OAAAU,UAAAC,eAAAlB,KAAAe,OAAAC,WAGtDxB,oBAAA2B,EAAA,GAGA3B,oBAAAA,oBAAA4B,EAAA,MAAAC,GAAA,SAAAzB,OAAAD,QAAAH,qBAAA,aC3DA,IAAI8B,KAAOA,SAEXA,KAAKC,MAAM,kBACXD,KAAKC,MAAM,uBACXD,KAAKC,MAAM,gBAAiB,uCAC5BD,KAAKC,MAAM,YAAa","file":"public/assets/js/piwik.js.map","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 \t\t}\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// 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 = 16);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9d7c9d0c3e1e7b963a9f","// 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 8b6e6ae2b234188427f3?4df6**","webpack:///piwik.js"],"names":["__webpack_require__","moduleId","installedModules","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","_paq","push"],"mappings":"mBAIA,SAAAA,oBAAAC,UAGA,GAAAC,iBAAAD,UACA,OAAAC,iBAAAD,UAAAE,QAGA,IAAAC,OAAAF,iBAAAD,WACAI,EAAAJ,SACAK,GAAA,EACAH,YAUA,OANAI,QAAAN,UAAAO,KAAAJ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAH,qBAGAI,OAAAE,GAAA,EAGAF,OAAAD,QAvBA,IAAAD,oBA4BAF,oBAAAS,EAAAF,QAGAP,oBAAAU,EAAAR,iBAGAF,oBAAAW,EAAA,SAAAR,QAAAS,KAAAC,QACAb,oBAAAc,EAAAX,QAAAS,OACAG,OAAAC,eAAAb,QAAAS,MACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,UAMAb,oBAAAoB,EAAA,SAAAhB,QACA,IAAAS,OAAAT,QAAAA,OAAAiB,WACA,WAA2B,OAAAjB,OAAA,SAC3B,WAAiC,OAAAA,QAEjC,OADAJ,oBAAAW,EAAAE,OAAA,IAAAA,QACAA,QAIAb,oBAAAc,EAAA,SAAAQ,OAAAC,UAAsD,OAAAR,OAAAS,UAAAC,eAAAjB,KAAAc,OAAAC,WAGtDvB,oBAAA0B,EAAA,GAGA1B,oBAAAA,oBAAA2B,EAAA,mEC1DA,IAGIC,KAAOA,SAEXA,KAAKC,MAAM,gBAJe,uCAK1BD,KAAKC,MAAM,YANE,MAObD,KAAKC,MAAM,kBACXD,KAAKC,MAAM","file":"public/assets/js/piwik.js.map","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 \t\t}\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// 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 = 16);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8b6e6ae2b234188427f3","/* global process */\n\n// Piwik in its own js file to allow usage with a CSP policy\nvar idSite = process.env.PIWIK_ID;\nvar piwikTrackingApiUrl = process.env.PIWIK_URL;\n\nvar _paq = _paq || [];\n// tracker methods like \"setCustomDimension\" should be called before \"trackPageView\"\n_paq.push(['setTrackerUrl', piwikTrackingApiUrl]);\n_paq.push(['setSiteId', idSite]);\n_paq.push(['trackPageView']);\n_paq.push(['enableLinkTracking']);\n\n\n\n// WEBPACK FOOTER //\n// ./piwik.js"]}

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -1,8 +1,12 @@
/* global process */
// Piwik in its own js file to allow usage with a CSP policy
var idSite = process.env.PIWIK_ID;
var piwikTrackingApiUrl = process.env.PIWIK_URL;
var _paq = _paq || [];
// tracker methods like "setCustomDimension" should be called before "trackPageView"
_paq.push(['setTrackerUrl', piwikTrackingApiUrl]);
_paq.push(['setSiteId', idSite]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['setTrackerUrl', 'https://analytics.jmb.lv/piwik.php']);
_paq.push(['setSiteId', '1']);

View file

@ -53,7 +53,7 @@
</footer>
@if (config('app.piwik') === true)
<!-- Piwik -->
<script defer src="https://analytics.jmb.lv/piwik.js"></script>
<script src="https://analytics.jmb.lv/piwik.js" async defer></script>
<script src="/assets/js/piwik.js"></script>
@endif
</body>

View file

@ -1,9 +1,9 @@
#!/usr/bin/env zsh
echo "compressing app.css and prism files"
zopfli --i1000 ./public/assets/css/app.css
zopfli --i1000 ./public/assets/prism/prism.css
zopfli --i1000 ./public/assets/prism/prism.js
zopfli --i100 ./public/assets/css/app.css
zopfli --i100 ./public/assets/prism/prism.css
zopfli --i100 ./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/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
@ -11,13 +11,13 @@ bro --force --quality 11 --input ./public/assets/prism/prism.js --output ./publi
echo "compressing js assets"
for file in ./public/assets/js/*.js
do
zopfli --i1000 $file
zopfli --i100 $file
bro --force --quality 11 --input $file --output $file.br
done
echo "compressing frontend assets"
for file in ./public/assets/frontend/*.css
do
zopfli --i1000 $file
zopfli --i100 $file
bro --force --quality 11 --input $file --output $file.br
done

8
webpack.config.js vendored
View file

@ -1,4 +1,5 @@
const webpack = require('webpack');
const Dotenv = require('dotenv-webpack');
const config = {
context: __dirname + '/resources/assets/es6',
@ -24,7 +25,12 @@ const config = {
loader: 'babel-loader'
}
]
}
},
plugins: [
new Dotenv({
path: './.env'
})
]
};
module.exports = config;