Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Releases: MoOx/phenomic

0.12.1

09 May 05:44
Compare
Choose a tag to compare
  • Added: setup now show examples for values to enter.
  • Fixed: twitter and repo url in setup accept empty values
    (#445)
  • Fixed: Should not show "Offline support is disabled in development mode"
    when offline isn't enabled
    (#448)

Boilerplate

  • Updated: stylelint has been updated to ^6.0.0
  • Updated: stylelint-config-standard has been updated to ^7.0.0

0.12.0

05 May 05:37
Compare
Choose a tag to compare

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 [email protected]. 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
    [email protected]
    (#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 [email protected]
      (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)

0.11.0

19 Apr 08:57
Compare
Choose a tag to compare

Boilerplate

  • Removed: (boilerplate) layouts/index.js. It is not used since 0.10.0.
    (#401)

  • Added: Run lint process in parallel with npm-run-all
    (#402)

  • Added: (boilerplate) more layouts and components so new users have more
    example to show list of entries:

    • Homepage layout that include a list of posts
    • Post layout
    • PagesList component to easily show page preview
    • PagePreview to display page meta

    (#71)

0.10.2

14 Apr 20:38
Compare
Choose a tag to compare
  • Fixed: replacement of some references that have been missed during the rename:

    • STATINAMIC (in .js)
    • statinamic (in .css).
      To be sure, run the following commands.
    $ npm remove --save-dev statinamic
    $ npm install --save-dev phenomic@^0.10.2
    $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \
      -exec sed -i '' 's|Statinamic|Phenomic|g' {} \;
    $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \
      -exec sed -i '' 's|statinamic|phenomic|g' {} \;
    $ find . -type f \( -iname \*.css -o -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \
      -exec sed -i '' 's|STATINAMIC|PHENOMIC|g' {} \;
  • Fixed: boilerplate now ship latest version of react-router, since
    [email protected] fixes the issue that create homepage to be not rendered.
    (#393)

0.10.1

14 Apr 07:34
Compare
Choose a tag to compare

0.10.0

13 Apr 17:38
Compare
Choose a tag to compare

tl;dr;

  • You can safely update from statinamic to phenomic without any changes in your
    code except renaming the "S|statinamic" references (see instructions below).
  • Only one major breaking change, but previous method will probably still be
    supported until 1.0
  • More stuff in the default boilerplate (404, loading...)

Example of update from statinamic 0.9 to phenomic 0.10

Details

  • Changed: project has been renamed due to a possible confusion with a PHP CMS
    called statamic.
    Read more.
    For an easy migration, you can simply run the following commands

    $ npm remove --save-dev statinamic
    $ npm install --save-dev phenomic
    $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \
      -exec sed -i '' 's|Statinamic|Phenomic|g' {} \;
    $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \) \
      -exec sed -i '' 's|statinamic|phenomic|g' {} \;

    If you want to double check what files will be changed, just run

    $ find . -type f \( -iname \*.js -o -iname \*.json \) -not \( -path './.git/*' -o -path './node_modules/*' \)

    This will look for S|statinamic occurence and will replace it by P|phenomic in
    all .js and .json files that are not in .git or in node_modules.

  • Changed: layouts should not be defined in build and client scripts
    anymore. This method will be deprecated in a future version.
    Instead please directly pass layouts in the routes definitions with a
    HoC.
    What are HoC? Higher order Component, more about this:

    Here is an example (based on the default boilerplate):

    import React, { Component } from "react"
    import { Route } from "react-router"
    
    import LayoutContainer from "../LayoutContainer"
    import PhenomicPageContainer from "phenomic/lib/PageContainer"
    
    import Page from "../layouts/Page"
    import PageError from "../layouts/PageError"
    import PageLoading from "../layouts/PageLoading"
    import Homepage from "../layouts/Homepage"
    
    class PageContainer extends Component {
      render() {
        const { props } = this
        return (
          <PhenomicPageContainer
            { ...props }
            layouts={ {
              Page,
              PageError,
              PageLoading,
              Homepage,
            } }
          />
        )
      }
    }
    
    export default (
      <Route component={ LayoutContainer }>
        <Route path="*" component={ PageContainer } />
      </Route>
    )

    You should take a new look to the default boilerplate.

  • Added: Use node-portfinder to avoid error when port is used
    (#320)

Boilerplate

  • Fixed: PageError warning about missing PropTypes
    (#357).

  • Changed: Bump css-loader to ^0.23.0. This may improve performance a little bit
    (#374)

  • Changed: PageError is nicer and now looks like documentation 404.

  • Changed: Production build now produces short CSS classnames. You should apply this
    change for a smaller HTML file.
    (#385)

  • Changed: upgrade of stylelint and stylelint-config-standard
    to latest 5.x versions

  • Added: a PageLoading component is now provided and include 2 indicators:

    (#182).

  • Added: link to 404 and loading page in the footer, so new users can see and
    try those easily.


0.9.3

04 Apr 22:05
Compare
Choose a tag to compare

Boilerplate

  • Removed: Remove unused define environment variables in webpack client config
    (#315)

0.9.2

22 Mar 05:26
Compare
Choose a tag to compare
  • Fixed: Missing babel-register package.
    (#335)

0.9.1

21 Mar 20:46
Compare
Choose a tag to compare
  • Fixed: default boilerplate have a correct .gitignore file (not .npmignore)
    (#323)

0.9.0

21 Mar 15:14
Compare
Choose a tag to compare

Example of update from 0.8 to 0.9

tl;dr;

Breaking changes

  • md-collection-loader has been renamed to content-loader.
  • Default markdown parser is now remark but you can use anything you want, even
    a non markdown parser (eg: latex, asciidocs...).

    markdownIt configuration is not supported any more but you can still use
    the same engine, see details below.
  • scripts/webpack.config.*.js now needs to export function that accept
    config as the first parameter.
  • scripts/config.js is now responsible for exporting webpack configurations.
  • (minor) redux-devtools and redux-thunk have been removed
    (redux will become private soon anyway, or might even be dropped).

Minor changes

  • Less boilerplate for commands to start/build.

Patches

  • No more duplicates in collection.
  • No more main.*.css files in dist.
  • Anchors in url are not being removed when clicking a link with an anchor.
  • Network errors are not reported as 404 anymore, but as network errors.

Details

  • Changed: simplified boilerplate and "start" and "build" commands !
    Be sure to checkout new (smaller) boilerplate.

    • scripts/webpack.config.*.js now needs to export function that accept
      config as the first parameter.
    • scripts/config.js is now responsible for exporting webpack configurations.
    • You can replace start and build npm scripts by
      statinamic start/build
    • scripts/build.js do not need to expose webpack configuration anymore
      (since it's included in config object).
    • You can now remove awkward babel env configuration from your babel
      configuration. It's now handled secretly by default.
      (that's why config must expose your webpack configurations)
    • You webpack configuration can now skip some tiny weird part specific to
      statinamic.
  • Changed: Use localhost as default address to open new browser tab (for Windows
    compatibility since Windows doesn't resolve 0.0.0.0 as localhost/127.0.0.1)
    (#257)

  • Changed: md-collection-loader has been renamed to content-loader.

  • Changed: content-loader now use remark
    as the default markdown engine.

    • If you want to use the new engine, just remove your markdownIt section
      in your scripts/webpack.config.babel.js configuration.
      You will also probably need to update in your CSS references to
      .markdownIt-Anchor to .statinamic-HeadingAnchor.
    • If you want to keep your current engine, just take the content of your
      markdownIt section, wrap it in a function and return .render()
      method.
      • Remove this of your scripts/webpack.config.babel.js

        // ...
        markdownIt: (
          require("markdown-it")({
            html: true,
            // ...
          })
            .use(/* ... */)
        )
      • Add in the configuration of content-loader
        (former md-collection-loader)

        // ...
        { // statinamic requirement
          test: /\.md$/,
          loader: "statinamic/lib/content-loader",
          query: {
            context: path.join(config.cwd, config.source),
            // WRAP HERE
            renderer: (text) => (
              require("markdown-it")({
                html: true,
                // ...
              })
                .use(/* ... */)
                .render(text) // ADD THIS
            )
            // ...
          }
        )
  • Changed: Remove redux devtools and process.env.CLIENT environment variables.
    Redux will probably become part of the private API, which will reduce
    the boilerplate. In order to do that, we will gradually remove Redux from all
    public interface (#40).
    Here is the instruction to pull this change:

    • Remove redux-devtools, redux-devtools-log-monitor and
      redux-devtools-dock-monitor from your dependencies list.

    • Remove these variables in webpack.config.client.js, DefinePlugin section:

      • process.env.REDUX_DEVTOOLS
      • process.env.CLIENT : This is totally up you.
        You can keep it if you use it.
        We recommended you to use a more portable way to do this:
      ---if (process.env.CLIENT) {
      +++if (typeof window !== "undefined") {
        // client-side specific code
      }

    See (#261) for details.

  • Removed: unused redux-thunk middleware.
    (#279)

  • Added: content-loader now accept any renderer.
    You can provide your own callback to transform the text content into html
    via the renderer option.
    See Configuration section of the documentation.

  • Added: Support React to 15.x

  • Fixed: statinamic/lib/enhance-collection do not create duplicates anymore
    (#200)

  • Fixed: network errors will not appear as 404 error anymore

  • Fixed: main.*.css files are not produced anymore by the default boilerplate
    (#214)

  • Fixed: url with anchors are NOT being replaced with url without anchors
    anymore
    (#284)

  • Added: statinamic/lib/enhance-collection will warn if filter callback
    don’t return a boolean

Boilerplate (minor changes/improvements)

  • Changed: Use include instead exclude to catch files to transform.
    See changes in boilerplate/scripts/webpack.config.babel.js
  • Changed: syntax change for css loaders section.
    See changes in boilerplate/scripts/webpack.config.babel.js
  • Changed: content-loader (former md-collection-loader) now
    don't use JSON.stringify anymore.
    See changes in boilerplate/scripts/webpack.config.babel.js
    (#209)
  • Changed: upgrade to eslint@2 and friends.
  • Fixed: assets loader use the right context
    (no big deal with default paths, but still).
    See changes in boilerplate/scripts/webpack.config.babel.js