@mischah mischah released this Apr 4, 2018 · 10 commits to master since this release

Assets 2

🎉 Yeah, version 3 is finally here 🎉

Let’s recap the most important changes since the last 2.x.x release:

  • prompting: First class support for React SPAs (2f00fb4)
    • React will be used and set up like described here when choosing to build a single page application.
    • So Baumeister is able to set up:
      • a static site generator (using Handlebars and Frontmatters), if you choose to build a static website.
      • a React app with all the bells and whistles, if you choose to build a single page app.
  • build: Replace Gulp with webpack (and npm scripts) (c6116ad)
  • bootstrap: Upgrade to Bootstrap 4 (c7b4264)
  • polyfills: Dynamically import and lazy load polyfills (ef5f6b5), closes micromata/baumeister#235
    • This keeps the vendor bundle in modern browser smaller because
      polyfills are only loaded when the used browser actually needs them.

Notable Changes since the last beta

Code Refactoring

  • scripts: serve build via npm run build:serve (496a15b)

Features

  • add PRODUCTION constant to ESLint config (fbc804b)
  • first class support for React SPAs (2f00fb4)
  • improve the cacheability of the vendor bundle (d9b60e4)
  • reduce noise in terminal (especially in watch mode) (46aea0b)
  • setup Babel plugin transform-imports (b779eef)
  • setup tree shaking (b490094)

BREAKING CHANGES


See all changes since the last prerelease.

Migration Guide

Below you’ll find the list of all breaking changes since the last 2.x.x release and what you have to adapt.

  • build: Gulp and all the tasks are gone. But most of the npm scripts still do what they did before. Here are the main scripts needed for developing and building your project.

    Command Description
    npm start Builds for development, starts a webserver, watches files for changes, rebuilds incremental and reloads your browser.
    npm test Lints your JavaScript files and runs unit test via the Jest CLI.
    npm run test:watch Runs unit test with Jests watch option.
    npm run build Builds for production to dist directory.
    npm run build:serve Starts a static fileserver serving the dist directory.
    npm run build:analyze Starts »Webpack Bundle Analyzer« to visualize size of Webpack output files

    See scripts section in package.json for all available scripts.

  • build: The bundled polyfills moved to the vendor bundle, the webpack runtime has moved into a separate file. Plus the references to the bundles have changed. You have to update the references in your HTML / Handlebars file(s):

    <!-- Bundled vendor CSS files -->
    @@vendor.css
    
    <!-- Our compiled and merged Sass files -->
    @@app.css
    
    […]
    
    <!-- webpack runtime JS -->
    @@runtime.js
    
    <!-- Bundled vendor CSS files -->
    @@vendor.css
    
    <!-- Our compiled and merged Sass files -->
    @@app.css
  • polyfills: Polyfills are now dynamically imported and lazy loaded to decrease the size of the vendor bundle for modern browsers. See README for details.

  • eslint: We ’ve added eslint-plugin-unicorn and eslint-plugin-import which might introduce new linting errors. You might want to turn off rules in /.eslintrc.json in case you find them too opinionated.

  • baumeister.json: The properties bundleCSS and includeStaticFiles in baumeister.json have moved to vendor.bundleCSS and vendor.includeStaticFiles. You have to adapt these changes in case you have added dependencies via these properties.

  • bootstrap: We’ve updated to Bootstrap 4. See Bootstrap v4 migration guide to read about the most notable as well as breaking changes.


See all changes since the last release.