Skip to content

Releases: gatsbyjs/gatsby

Tests!, bug fixes, DX improvements

09 Apr 21:09
Compare
Choose a tag to compare

New tests!

@benstepp waded into the center of Gatsby and refactored one of the core functions AND setup a test framework AND added a number of tests. Awesome! #232

Bug fixes

Developer Experience (DX) improvements

  • @michaeljdeeb added a check that hard-coded paths in pages have a path prefix. This is a problem that's bit several people as it's easy to miss #223. Invariants are awesome!
  • @alehlopeh added a new cli command gatsby serve-build so you can easily check that your built site is working as expected. #237

Thanks everyone!

Babel 6! Require local install of Gatsby! 2500 stars!

29 Mar 04:58
Compare
Choose a tag to compare

Another release with two nice DX improvements.

Also we hit 2500 stars as I was writing this review 🎉

Babel 6

Gatsby started its life on Babel 5 but Babel 6 is out and stable so we'll upgrade along with the rest of the ecosystem and take advantage of its improved performance and awesome new plugin api.

Gatsby must now be installed as a dependency of the site

The global Gatsby install now defers to the local install of Gatsby (and throws if it can't find one). This means you can build a site and not worry about needing to upgrade it again as Gatsby accumulates breaking changes. This also helps ensure Gatsby works in environments where you don't want a global install e.g. build servers.

Upgrade instructions

  • Install Gatsby — npm install --save gatsby
  • Install new Babel 6 dependencies (they must be installed locally) — npm install --save babel-plugin-add-module-exports babel-preset-es2015 babel-preset-react babel-preset-stage-1 and npm install --save-dev babel-preset-react-hmre.
  • Uninstall old Babel 5 dependencies (if you added any).
  • The link function from gatsby-helpers.js was renamed to prefixLink to clarify its purpose.
  • Your .babelrc file needs to be upgraded to look like:
{
  "presets": ['react', 'es2015', 'stage-1'],
  "plugins": ['add-module-exports']
}
  • If you modified the default Webpack config in gatsby.config.js, this functionality is now moved to gatsby-node.js and instead of using module.exports, export your config modification function as modifyWebpackConfig. See the updated instructions in the README.
  • If you were differentiating between pages with content (like .md files) and pages without (like pages/profile.js) by looking for truthy page.data, you'll now need check for truthy page.data.body.
  • If your site is under version control, you might want to ignore the new auto-written module .gatsby-context.js.
  • rare if you used the rewritePath, onRouteChange hooks in your app.js — app.js is now not supported. Instead you should export rewritePath in gatsby-node.js and onRouteChange in gatsby-browser.js. The function signatures didn't change. These new files will be gaining more functionality in future releases.

That's it! See you in the issue queues :-)

Add support for JSON/YAML/TOML files + option to disable bundle.js for production build

13 Mar 04:46
Compare
Choose a tag to compare

Small dev improvements

08 Mar 18:05
Compare
Choose a tag to compare
  • @scottnonnenberg added code to catch and throw errors while compiling the html.js file during dev #176
  • @tleunen suggested that when an unknown subcommand is run to show the help. Fixed in 938d9f0

Add support for a 404 page

07 Mar 18:30
Compare
Choose a tag to compare

Small fixes — improve default host on Windows + compile mode for html.js

06 Mar 23:53
Compare
Choose a tag to compare

Better Windows support & Font Loaders

01 Mar 18:08
Compare
Choose a tag to compare

Noted fixer of NPM packages for Windows @NogsMPLS submitted a PR to get Gatsby (hopefully) completely working on Windows! 🎉 🎉 🎉

@gesposito added support to Webpack for requiring fonts #162

@KyleAMathews made a few miscallaneous changes

  • Replace remaining uses of Underscore with Lodash 486bd29
  • Integrate the scroll-behavior package so clicking between links with react-router is more browser-like b4122db
  • Add parentTemplateFile to routes for use in theming 8620488

Thanks everyone!

Major release upgrading to React-Router 2.0 + full support for Less/Sass/PostCSS

22 Feb 03:15
Compare
Choose a tag to compare

Hi folks,
Finished off a major new release of Gatsby in time for ReactConf 🎉

New features

  • Support Less/Sass/Postcss out of the box. CSS files are processed using the excellent cssnext.
  • Support extracting and minifying css on production builds to an external styles.css file.
  • React-Router 2.0 🎉

Internals work

  • We're using Webpack Hot Middleware + react-transform-hmr now instead of react-hot-loader.
  • All remaining Coffeescript files have been converted to JS.

Breaking changes.

React Router has made two major releases since Gatsby was first built with a ton of nice improvements. But as Gatsby uses React Router heavily, its breaking changes often cause breaking changes within Gatsby.

The main change is what props are passed to _template and wrapper components. Previously each component was passed the current page data and a pages array of all pages. Now this information is put onto the route prop passed in by React Router.

Also where previously React Router provided a <RouteHandler/> component which rendered the children components in _template files, you should now replace those with {this.props.children}.

Upgrading

  • Install new packages: npm install --save react-router@latest lodash@latest && npm install --save-dev [email protected] react-transform-catch-errors react-transform-hmr redbox-react
  • Adjust templates and wrappers (and other components as necessary) to account for the React Router changes.
  • onRouteChange is now passed the location object from History.

Internals cleanup

20 Dec 06:59
Compare
Choose a tag to compare
> DEBUG=gatsby:* gatsby build

screenshot 2015-12-06 01 48 23

Can now easily override default Webpack config

24 Nov 07:26
Compare
Choose a tag to compare

@ChristopherBiscardi added a PR to make it simple to override or extend the default Gatsby Webpack configuration. Gatsby tries to anticipate most needs out of the box but many projects will need some customizations to Webpack.

See the PR and new documentation.