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

Commit

Permalink
Merge branch 'v2' into postcss-experiment
Browse files Browse the repository at this point in the history
* v2:
  Docgen improvements (gatsbyjs#4757)
  adjust createLocation calls after gatsbyjs#4714 (gatsbyjs#4805)
  Update breaking changes doc
  use basename for router instead of prefixing in link (gatsbyjs#4714)
  Fix inlined styles with path-prefixing (gatsbyjs#4717)
  Publish
  Upgrade & format
  [v2][wip] Upgrade Gatsby v2 to webpack 4 (gatsbyjs#4588)
  fix some jsdoc parsing bits (gatsbyjs#4675)
  [v2] fix wrong merge
  Publish
  Migrate to React Hot Loader v4 (gatsbyjs#4500)
  [v2] Fix deleteNodes deprecation (gatsbyjs#4453)
  Publish
  Switch to latest version of sharp to prevent yarn/npm errors (gatsbyjs#4417)

# Conflicts:
#	packages/gatsby/package.json
#	packages/gatsby/src/utils/webpack-utils.js
#	yarn.lock
  • Loading branch information
m-allanson committed Apr 4, 2018
2 parents 88ce4df + 409014c commit a562f7e
Show file tree
Hide file tree
Showing 146 changed files with 2,887 additions and 2,639 deletions.
2 changes: 1 addition & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let ignore = [`**/dist/**`]

// Jest needs to compile this code, but generally we don't want this copied
// to output folders
if (process.env !== `test`) {
if (process.env.NODE_ENV !== `test`) {
ignore.push(`**/__tests__/**`)
}

Expand Down
3 changes: 2 additions & 1 deletion Breaking Changes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
* Remove postcss plugins (cssnext, cssimport) from default css loader config
* change webpack api
* boundActionCreators => actions
* Source & transformer plugins now use UUIDs for ids. If you used glob or regex to query nodes by id then you'll need to query something else.
* Mixed commonjs/es6 modules fail
* Remove explicit polyfill and use the new builtins: usage support in babel 7.
* Changed `modifyBabelrc` to `onCreateBabelConfig`
* Changed `modifyWebpackConfig` to `onCreateWebpackConfig`
* inlining css changed — remove it as done automatically by core now.
7 changes: 3 additions & 4 deletions docs/blog/2018-02-28-documentation-project/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ People really like Gatsby docs and Gatsby. In fact, we’ve talked about trackin

![Stupid fast tweet](stupid-fast-tweet.png)


## How much do people like the docs? :D

In my interviews with over 60 Gatsby users, I asked “What do you like about Gatsby?”. Documentation comes out as one of the clear winners, as you can see in this list of the top ten things interviewees like, courtesy of [Unbird.com](https://unbird.com/#/) analytics:
Expand All @@ -33,20 +32,20 @@ And some tweets:

![Usability docs](usability-docs.png)

So here's the bottom line: nearly everyone we’ve interviewed loves the Gatsby development experience and what the community has produced with the docs, guides, and tutorials.
So here's the bottom line: nearly everyone we’ve interviewed loves the Gatsby development experience and what the community has produced with the docs, guides, and tutorials.

So why fix what isn’t broken?

## Enhancing the Tutorials

Many people have contributed to the docs and tutorials already and have done an excellent job. With that being said, there is still room to grow.
Many people have contributed to the docs and tutorials already and have done an excellent job. With that being said, there is still room to grow.

Here is a brief overview of issues that have come up again and again as I've interviewed people and observed them going through the tutorials and docs (see [Issue #4175](https://github.com/gatsbyjs/gatsby/issues/4175) on Github to follow this and contribute):

* Gatsby is beginner-friendly; however, _true_ beginners to programming need an intro to basic tools like the command line, code editors, and browser consoles.
* Upon first visit to Gatsbyjs.org, most visitors click “Get Started.” This is the perfect solution for them if they prefer to jump into coding without reading much. If they prefer step-by-step instructions, it takes some looking around before they see the tutorial tab across the top.
* Installing new starters for every part of tutorial feels like a distraction to some beginners.
"Part 1" is not a descriptive title for a tutorial if someone wants to preview or remember what was covered.
"Part 1" is not a descriptive title for a tutorial if someone wants to preview or remember what was covered.
* Almost everyone is new to GraphQL and gets overwhelmed when we introduce it in Part 4.

## Documentation project beginnings
Expand Down
5 changes: 2 additions & 3 deletions docs/docs/add-custom-webpack-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ call each build type a "stage". The following stages exist:
reloading and CSS injection into page
2. develop-html: same as develop but without react-hmre in the babel config for
rendering the HTML component.
3. build-css: production build of CSS
3. build-javascript: production JavaScript and CSS build. Creates route JS bundles as well
as commons chunks for JS and CSS.
4. build-html: production build static HTML pages
5. build-javascript: production JavaScript build. Creates route bundles as well
as a `commons` and `app bundle`.

Check
[webpack.config.js](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/utils/webpack.config.js)
Expand Down
58 changes: 33 additions & 25 deletions docs/docs/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,44 @@ to root of your site and modifying it per your needs.
"cacheDirectory": true,
"babelrc": false,
"presets": [
["@babel/preset-env", {
"loose": true,
"modules": false,
"useBuiltIns": "usage",
"sourceType": "unambiguous",
"shippedProposals": true,
"targets": {
"browsers": [
"> 1%",
"IE >= 9",
"last 2 versions"
]
[
"@babel/preset-env",
{
"loose": true,
"modules": false,
"useBuiltIns": "usage",
"sourceType": "unambiguous",
"shippedProposals": true,
"targets": {
"browsers": ["> 1%", "IE >= 9", "last 2 versions"]
}
}
}],
["@babel/preset-react", {
"useBuiltIns": true,
"pragma": "React.createElement"
}],
],
[
"@babel/preset-react",
{
"useBuiltIns": true,
"pragma": "React.createElement"
}
],
"@babel/preset-flow"
],
"plugins": [
["@babel/plugin-proposal/class-properties", {
"loose": true
}],
[
"@babel/plugin-proposal/class-properties",
{
"loose": true
}
],
"@babel/plugin-syntax-dynamic-import",
["@babel/plugin-transform-runtime", {
"helpers": true,
"regenerator": true,
"polyfill": false
}]
[
"@babel/plugin-transform-runtime",
{
"helpers": true,
"regenerator": true,
"polyfill": false
}
]
]
}
```
8 changes: 5 additions & 3 deletions examples/using-css-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"description": "Gatsby example site demonstrating using css modules in Gatsby with normal (Postcss) css and sass/scss.",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "latest",
"gatsby-plugin-sass": "latest"
"gatsby": "canary",
"gatsby-plugin-sass": "canary",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"license": "MIT",
"main": "n/a",
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build"
}
}
}
12 changes: 6 additions & 6 deletions examples/using-glamor/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module.exports = {
},
plugins: [
`gatsby-plugin-glamor`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
trackingId: `UA-93349937-2`,
},
},
// {
// resolve: `gatsby-plugin-google-analytics`,
// options: {
// trackingId: `UA-93349937-2`,
// },
// },
`gatsby-plugin-offline`,
],
}
8 changes: 4 additions & 4 deletions examples/using-glamor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"version": "1.0.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "next",
"gatsby-plugin-glamor": "next",
"gatsby-plugin-google-analytics": "next",
"gatsby-plugin-offline": "next",
"gatsby": "2.0.0-alpha.9fe50b00",
"gatsby-plugin-glamor": "canary",
"gatsby-plugin-google-analytics": "canary",
"gatsby-plugin-offline": "canary",
"glamor": "^2.20.40",
"lodash": "^4.16.4",
"react": "^16.2.0",
Expand Down
64 changes: 0 additions & 64 deletions examples/using-glamor/src/html.js

This file was deleted.

2 changes: 2 additions & 0 deletions examples/using-glamor/src/pages/other-page.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react"
import { Link } from "gatsby"

export default () => (
<div
Expand All @@ -12,5 +13,6 @@ export default () => (
>
<h1>Weeee...</h1>
<img src="https://media1.giphy.com/media/urVO9yrQhKwDK/200.webp#1-grid1" />
<Link to="/">Back home</Link>
</div>
)
7 changes: 0 additions & 7 deletions examples/using-postcss-sass/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions examples/using-postcss-sass/gatsby-config.js

This file was deleted.

22 changes: 0 additions & 22 deletions examples/using-postcss-sass/package.json

This file was deleted.

69 changes: 0 additions & 69 deletions examples/using-postcss-sass/src/html.js

This file was deleted.

Loading

0 comments on commit a562f7e

Please sign in to comment.