github MoOx/phenomic 0.12.0

latest releases: v1.0.0, v1.0.0-beta.11, v1.0.0-beta.10...
7 years ago

tl;dr;

Don't be afraid by the length of this release notes. It's for the better.

Most noticeable change occurs in the scripts folder.
It might be a good idea is to take a look to the new folder of the default
boilerplate:

  • There is now just 2 files: phenomic.browser.js (client runtime) and
    phenomic.node.js (for static build).
  • webpack configs can be moved at the root of you project and merged into a
    single one webpack.config.babel.js. Phenomic specific configuration can be
    removed (eg: entry) and is now injected via Phenomic itself.

Example of update from phenomic 0.10 to 0.12

Details

  • Fixed: Meta description should not contains new lines
    (#414)
  • Removed: layouts now must be passed via props to PageContainer component.
    This change has been introduced in 0.10.0 but old way (via a
    parameter in the former scripts/build.js and scripts/index-client.js)
    was still accepted.
    If you do not have a warning in 0.10.0 or newer, you won‘t be affected by
    this change.
  • Removed: dev server does not pre-render anymore. During development, only
    client side version is used. This is to avoid huge performance issue
    introduced in statinamic@0.7.0. We might re-enable pre-rendering in a near
    future.
    See change below for more information
    (#301)
  • Changed: dates of the front matter are now always strings,
    for now,
    until we serve pages as JavaScript (and not JSON).
    By default the front-matter parsing method recognize dates as JavaScript dates
    but when converted to JSON we end up with string.
    The problem is that during the static build, we use date in memory
    (real dates) and on the client, strings are used.
    So, to ensure consistency, between static build and client build we are now
    forcing string
    (#397)
  • Changed: major refactoring to fix huge performance issue introduced in
    statinamic@0.7.0
    (#301).
    At the same time we introduced some internal changes, we have reduced the
    required boilerplate and make some changes in order to simplify everything:
    • Removed: scripts/config.js. Configuration is now builded from a
      "classic" webpack config. See change related to the webpack config below.
    • Removed: scripts/webpack.config.client.js content should be merged
      with your webpack.config.babel.js (please read the change below).
    • Changed: scripts/webpack.config.babel.js is now expected by default
      to be found at the root of your project, like a classic webpack config.
      Webpack configuration parts specific to Phenomic are now injected by
      Phenomic itself.
      Note that your config must export a makeConfig function.
      This is required so Phenomic can easily create dynamic configurations.
      This also prepare the upgrade to webpack@2.0.0
      (which is in beta for a while, but starts to be
      mature
      ) that natively
      allow webpack config to be exported as a function.
      The path can be specified via an option (via CLI or config).
    • Removed: scripts/build.js in favor of scripts/phenomic.node.js.
      The path can be specified via an option (via CLI or config).
      Note that this file will be builded as
      scripts/phenomic.node.bundle.js for performance.
      (New boilerplate (git)ignores *.bundle.js files).
    • Changed: scripts/index-client.js is now
      scripts/phenomic.browser.js.
      The path can be specified via an option (via CLI or config).
  • Changed: react-helmet@^3.0.0 is now required.
    This brings us the ability to use all latest react-helmet's methods,
    including: base, link, meta, script and htmlAttributes.
    Check out react-helmet‘s documentation
    for more information.
    Except new features, no real breaking changes (except that react-helmet
    don‘t includes some (may be) required polyfills by default).
    You can upgrade by doing $ npm install react-helmet@^3.0.0 --save
    (#348)
  • Changed: PHENOMIC_PATHNAME is now PHENOMIC_USER_PATHNAME.
    But no need to update that in your configuration as it's injected
    automatically. See changes in the boilerplate.
    (#412)
  • Changed: devPort option must be a integer.
  • Changed: content-loader options that are defined in the phenomic
    section of the webpack configuration should be defined under
    contentLoader, not loader (even if this one is still supported for
    now).
  • Changed: content-loader options are now taken from query AND
    phenomic.contentLoader section (both are merged).
  • Added: unknown CLI args now throw errors
    (#363)
  • Added: new injected constants in process.env:
    • process.env.PHENOMIC_USER_URL: your website homepage url
      (package.json/homepage field)
    • process.env.PHENOMIC_USER_PATHNAME: the base path of your website/app
    • process.env.PHENOMIC_NAME: Phenomic pretty name
    • process.env.PHENOMIC_VERSION: Phenomic version
    • process.env.PHENOMIC_HOMEPAGE: Phenomic homepage url
    • process.env.PHENOMIC_REPOSITORY: Phenomic repository url
      (#412 &
      #361)
  • Added: Warning for Service Worker when not using HTTPS
    (#406)

Boilerplate

  • Fixed: Meta og:url must be a full url
    (#432
  • Removed: NODE_ENV and PHENOMIC_PATHNAME have been removed from the
    boilerplate. These are now automatically defined.
    (#412)
  • Changed: big changes in the scripts folder. Read note above.
  • Changed: lint command now ignore gitignored files in to be sure you don‘t
    lint some builded files.
    Note the --ignore-path .gitignore part:
    "lint:js": "eslint --ignore-path .gitignore --fix ."
  • Changed: content-loader options are defined in the
    phenomic.contentLoader section of the webpack configuration so you can use
    functions (eg: custom renderer).
  • Added: Polyfill CDN
    to make sure your website work with old browsers as well.
    (#348)
  • Added: (boilerplate) meta generator tag
    (#361)
  • Added: Improve React's performance in production build by using
    babel-preset-react-optimize
    (#377)
  • Added: Use dynamic values for GitHub and Twitter.
    (#419)

Don't miss a new phenomic release

NewReleases is sending notifications on new releases.