nwb v0.14.0 Release Notes

Release Date: 2017-01-13 // over 7 years ago
  • ๐Ÿ›  Fixed:

    • ๐Ÿ“ฆ To prevent version compatibility issues using project commands from a globally-installed nwb, it will now exit with a warning if the project specifies a different version of nwb in package.json [#167]
      • The ability to run project commands like build, serve etc. from a global nwb install is provided so you don't have to reinstall the entirety of nwb when creating new projects, but it's recommended that you switch to a locally-installed version later, as relying on globally-installed tool versions is brittle.
    • ๐Ÿ›  Fix clean commands in paths with spaces [#181]

    โž• Added:

    • โž• Added an inferno command for quick Inferno prototyping and building. Use inferno run <entry.js> to serve a module and inferno build <entry.js> [dist/] to build it.
    • โž• Added a preact command for quick Preact prototyping and building. Use preact run <entry.js> to serve a module and preact build <entry.js> [dist/] to build it.
    • 0๏ธโƒฃ The inferno and preact commands use a render shim module by default which hooks into Inferno.render() and Preact.render() to intercept the incoming VNode and re-render it from the top when accepting Hot Module Replacement, so if you're calling render() yourself you don't have to specify a DOM node, or a root when re-rendering in Preact.
      • If you want to take full control of rendering, use the --force flag and nwb will skip the render shim and use your entry module directly.
      • The react command's render shim doesn't hook into ReactDOM.render() and only handles rendering exported components or elements for convenient prototyping, as react-transform-hmr handles the details of accepting Hot Module Replacement and patching/re-rendering at the component/module level.
    • โž• Added new features which are available in the inferno and preact commands to the existing react command:
      • Added a --plugins option to specify nwb plugins which should be installed and used without having to set up a package.json.
      • Added a --force option to force use of the provided entry module directly instead of the render shim module which is used by default to support quick prototyping.
      • Added a --no-polyfill option to disable inclusion of nwb's default polyfills for Promise, fetch() and Object.assign() if you're not using them or don't need them polyfilled.
      • Inferno compat and Preact compat dependencies are now automatically installed if missing.
      • react build can now build a module which exports a React component or element, for quick sharing of prototypes.
    • ๐Ÿ”ง Inferno and Preact apps are now configured to use their respective React compatibility modules by default if react or react-dom are imported, allowing use of existing React code out of the box.

    ๐Ÿ”„ Changed:

    • ๐Ÿ— The Webpack manifest module is now generated when building an app (as well as being inlined into the generated index.html) - you will need to include this first if manually handling HTML generation after building.
    • ๐Ÿ‘ Express middleware now supports Inferno, Preact and plain JavaScript apps, not just React.
    • ๐Ÿ— When building a React app using the --inferno or --preact flags, the required compatibility dependencies are now installed automatically if they can't be resolved from your project directory.
    • โœ… When creating new projects, the latest version of dependencies will be installed, rather than using a a version range hardcoded in nwb.
    • Skip initialising a Git repo if a .git/ directory already exists, e.g. you may want to use nwb init in an existing repo.
    • ๐Ÿ— The default build for a React component demo app now supports use of a demo/public/ directory for static content.
    • ๐Ÿ“œ An args property is now included in the object passed to user configs which export a function - this contains parsed arguments, e.g. args.preact will be true if you passed --preact when calling nwb.

    โœ‚ Removed:

    • โœ‚ Removed support for using --set-env-VAR_NAME arguments to set environment variables.
    • ๐Ÿ— jsnext:main is no longer included package.json for new react-component and web-module projects - only the "more standard" module property is used to point to an ES2015 modules build [#215]

    Dependencies:

    • autoprefixer: v6.5.3 โ†’ v6.6.1
    • babel-core: v6.20.1 โ†’ v6.21.0
    • ๐Ÿ‘ babel-loader: v6.2.9 โ†’ v6.2.10 - Webpack 2 RC support
    • ๐Ÿ”Œ babel-plugin-inferno: v1.4.0 โ†’ v1.5.0 - use import instead of global Inferno reference
    • ๐Ÿ”Œ babel-plugin-istanbul: v3.0.0 โ†’ v3.1.2
    • ๐Ÿ”Œ babel-plugin-lodash: v3.2.10 โ†’ v3.2.11
    • ๐Ÿš€ detect-port: v1.0.6 โ†’ v1.0.7
    • ๐Ÿ”Œ html-webpack-plugin: v2.24.1 โ†’ v2.26.0 - Webpack 2 RC support
    • ๐Ÿ‘ karma-webpack: v1.8.0 โ†’ v1.8.1 - Webpack 2 RC support
    • ora: v0.3.0 โ†’ v0.4.1
    • ๐Ÿš€ phantomjs-prebuilt: v2.1.13 โ†’ v2.1.14
    • postcss-loader: v1.2.0 โ†’ v1.2.1
    • ๐Ÿ’ป resolve: v1.1.7 โ†’ v1.2.0
    • ๐Ÿš€ webpack-dev-middleware: v1.8.4 โ†’ v1.9.0 - Webpack 2 RC support
    • โš  webpack-hot-middleware: v2.13.2 โ†’ v2.15.0 - add cache for warnings
    • ๐Ÿ”€ webpack-merge: v1.0.2 โ†’ v2.3.1 - providing an empty array/object no longer overrides when merging