1. 31 Jan, 2019 1 commit
  2. 30 Jan, 2019 3 commits
  3. 16 Jan, 2019 2 commits
  4. 30 Dec, 2018 4 commits
    • wincent's avatar
    • wincent's avatar
      Update hooks to work from both branches · c167caeb
      wincent authored
      On "master" branch (the top level worktree) they do nothing, except for
      checking that they are up-to-date.
      On the "content" branch (assumed to be a worktree checkout nested under
      the main repo at "content/) we check to make sure we're not amending
      already-indexed content, and additionally tag content deploys with a
      local timestamp.
    • wincent's avatar
      Add -x flag to hooks/install · 60750e96
      wincent authored
      Just to provide visual confirmation that it actually did something.
    • wincent's avatar
      Import hooks from "content" branch · 7815e0d0
      wincent authored
      Removed them from that branch in ba7aaac9 (but note, the content branch
      may be rewritten at any time so there's a chance that hash won't be
      valid). They will need further tweaks, I think, to make them do the
      right thing in this context.
  5. 25 Dec, 2018 5 commits
  6. 17 Dec, 2018 12 commits
  7. 16 Dec, 2018 3 commits
    • wincent's avatar
      Tighten up Flow annotations in a bunch of places · d8809093
      wincent authored
      Includes a bug fix discovered while doing the pass (misuse of
      `makeNotFound` helper), and inserting `noflow` annotations in the files
      I don't want to deal with yet, so I have an easy-to-grep-for marker that
      I can find again later.
    • wincent's avatar
      Add Flow annotations to <App /> component · 92c7548e
      wincent authored
    • wincent's avatar
      Make ES modules bundle as well · ba7fdb91
      wincent authored
      Reduces bundle size for modern browsers from about 483,477 bytes
      (uncompressed) to 392,782 bytes (uncompressed). After gzip, it's 121,228
      bytes down to 100,848 bytes.
      Discovered that ExtractTextPlugin is deprecated for recent Webpack, so
      switched to MiniCssExtractPlugin. Also, switched to contenthash for
      better caching and because otherwise I end up writing the same extracted
      CSS twice under two different hashes (I'm still writing it twice, but at
      least it's idempotent now).
      Closes: https://github.com/wincent/masochist/issues/133
  8. 14 Dec, 2018 10 commits
    • wincent's avatar
    • wincent's avatar
      Update flow-typed definitions · 2500b7e5
      wincent authored
      npm install -g flow-typed
      flow-typed install
    • wincent's avatar
      Suppress some new errors brought by the new version of Flow · e4137b27
      wincent authored
      Going to see if I can make these better than `any` at some point.
    • wincent's avatar
      Add @Flow to main app entry point · 35008a88
      wincent authored
    • wincent's avatar
      Don't use "defaults" as browserslist target for @babel/preset-env · 883dab00
      wincent authored
      Despite what the docs (https://babeljs.io/docs/en/babel-preset-env) say,
      it appears that not all the target queries supported by browserslist
      (https://github.com/browserslist/browserslist) can be used here.
      "default" is supposedly equivalent to "> 0.5%, last 2 versions, Firefox
      ESR, not dead", but when I add a `debug: true` flag, I see that it
      treats `targets` as `{}` and ends up producing a bundle which is a few
      KB larger (pre-gzip, I don't know about post-gzip). It looks to be the
      whole kaboodle. Disappointing that the list of included polyfills ends
      up being so large; a nice chunk gets trimmed off if you use a more
      aggressive target like "last 2 Chrome versions" (that's obviously not
      viable though). Over time, the bundle should get smaller though as more
      browsers drop off the list.
      Closes: https://github.com/wincent/masochist/issues/127
    • wincent's avatar
      Try to force useBuiltIns transform to work · 5d9210b3
      wincent authored
      Inspecting the dist/ folder shows no transform happening at all, so I
      wondered if it was being skipped on entry files and moved the `import`
      into the main app file instead. Of course, that's pointless because the
      main app file is also an entry point... As an experiment, I moved it
      into a non-entry file, with the same result. My next step is going to be
      to try tweaking the @babel/preset-env targets to see if I can force a
    • wincent's avatar
      Switch from useBuiltIns "usage" -> "entry" · 38f49dd4
      wincent authored
      Prior to this change:
      - Bundle size 490626 bytes (124504 bytes gzipped)
      - Bundle size 487306 bytes (122293 bytes gzipped)
      A little surprised it isn't more, to be honest. When I double-check
      this in source-map-explorer I don't see much difference in the core-js
      Incidentally, I think this *should* obviate the need for the workaround
      implemented in aa401def, but when I look at the build
      dist/client/polyfill.js it looks untransformed to me... May have to do
      some further digging.
    • wincent's avatar
      Work around @babel/polyfill accessing non-existent `global` · aa401def
      wincent authored
      Seeing as I am using useBuiltins = 'usage' in my @babel/preset-env
      config, in theory I could just remove the polyfill from the entry
      section, but I am a bit wary of doing that due to its experimental
      status. Also, the docs (https://babeljs.io/docs/en/babel-preset-env)
      don't make it clear whether items like 'regenerator-runtime/runtime' get
      handled adequately or not, so I might just wait this one out.
      It seems certainly true that much of what is in the polyfill could be
      skipped as I am pretty sure I am not using all of it:
      All of this prompted because of this check in the polyfill:
        if (global._babelPolyfill && typeof console !== "undefined" && console.warn) {
          console.warn("@babel/polyfill is loaded more than once...");
        global._babelPolyfill = true;
      Which is causing this in prod (only, for some reason):
        Uncaught ReferenceError: global is not defined
    • wincent's avatar
      Create pipeline string up front before mutating invocations array · 3fa7aae7
      wincent authored
      Because we mutate the array as we go, this code was not necessarily
      producing full error messages.
    • wincent's avatar
      Fix <When> display · 8656eb51
      wincent authored
      I was obviously a bit tired when I rolled out the "N minute read" stuff
      and didn't sufficiently test this. There were pages using <When> without
      <Metadata> which lost their formatting, and the spacing looked off.
      Also, we had an unwanted trailing mid-dot, and an orphan CSS class that
      did nothing.