Skip to content

Commit

Permalink
Merge branch 'feat/webpack-state-machine' into feat/internal-exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jul 22, 2020
2 parents 893ed22 + 2a767f4 commit a80f6a9
Show file tree
Hide file tree
Showing 120 changed files with 1,577 additions and 590 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Gatsby is a modern web framework for blazing fast websites.
to load your data, then develop using Gatsby’s uniform GraphQL interface.

- **Performance Is Baked In.** Ace your performance audits by default. Gatsby automates code
splitting, image optimization, inlining critical styles, lazy-loading, and prefetching resources,
splitting, image optimization, inlining critical styles, lazy-loading, prefetching resources,
and more to ensure your site is fast — no manual tuning required.

- **Host at Scale for Pennies.** Gatsby sites don’t require servers so you can host your entire
Expand Down
8 changes: 7 additions & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ CDN
CDN-backed
CDNs
Cereda
Certbot
CFP
Chakra
changelog
Expand Down Expand Up @@ -372,7 +373,7 @@ CodeName
Codenames
codeowner
codeowners
Codepen
CodePen
CodeSandbox
codesplitting
collegial
Expand Down Expand Up @@ -985,6 +986,7 @@ hypermodern
i10n
i18n
i18next
IaaS
IaC
IAM
iam_timsmith
Expand Down Expand Up @@ -1325,6 +1327,7 @@ nodeId
nodeID
NodeID
nodemailer
Node.js
NodeSchool
nodesPromise
Nolen
Expand Down Expand Up @@ -1383,6 +1386,7 @@ OpenAI
OpenAPI
OpenCollective
OpenGraph
OpenSSH
opentracing
OpenTracing
operandi
Expand Down Expand Up @@ -1471,6 +1475,7 @@ PostHog
postprocessing
Poumián
PowerShell
PPA
pragma
pragmas
PRDs
Expand Down Expand Up @@ -2064,6 +2069,7 @@ voilà
Vojtech
Vojtěch
VPs
VPS
VS2015
VS201x
VSCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ npm install tailwindcss gatsby-plugin-postcss

2. Add `gatsby-plugin-postcss` to your `gatsby-config.js` file

```javascript
```javascript:title=gatsby-config.js
{
plugins: [`gatsby-plugin-postcss`]
}
```

3. Create a `postcss.config.js` file and add the following snippet to it:

```javascript
```javascript:title=postcss.config.js
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
}
```

4. Create a `tailwind.config.js` file and add the following snippet to it:

```javascript
```javascript:title=tailwind.config.js
module.exports = {
purge: ["./src/**/*.js"],
theme: {
Expand All @@ -65,7 +65,7 @@ module.exports = {

5. Create a `tailwind.css` file and add the following snippet to it:

```css
```css:title=tailwind.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
28 changes: 19 additions & 9 deletions docs/contributing/setting-up-your-local-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Yarn is a package manager for your code, similar to [npm](https://www.npmjs.com/
}
```

## Gatsby repo install instructions
## Gatsby repo instructions

### Install Node and Yarn

Expand All @@ -32,15 +32,15 @@ Yarn is a package manager for your code, similar to [npm](https://www.npmjs.com/
- Set up repo and install dependencies: `yarn run bootstrap`
- Make sure tests are passing for you: `yarn test`
- Create a topic branch: `git checkout -b topics/new-feature-name`

### Docs only changes

- See [docs setup instructions](/contributing/docs-contributions#docs-site-setup-instructions) for docs-only changes.
- Run `yarn run watch` from the root of the repo to watch for changes to packages' source code and compile these changes on-the-fly as you work.

- Note that the watch command can be resource intensive. To limit it to the packages you're working on, add a scope flag, like `yarn run watch --scope={gatsby,gatsby-cli}`.
- To watch just one package, run `yarn run watch --scope=gatsby`.

### Docs only changes

- See [docs setup instructions](/contributing/docs-contributions#docs-site-setup-instructions) for docs-only changes.

### Gatsby functional changes

- Install [gatsby-cli](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-cli):
Expand Down Expand Up @@ -82,12 +82,22 @@ If you're adding e2e tests and want to run them against local changes:
- Run `gatsby-dev` inside your specific e2e test directory, for example `e2e-tests/themes/development-runtime`.
- While the previous step is running, open a new terminal window and run `yarn test` in that same e2e test directory.

### Troubleshooting

At any point during the contributing process the Gatsby team would love to help! For help with a specific problem you can [open an issue on GitHub](/contributing/how-to-file-an-issue/). Or drop in to [our Discord server](https://gatsby.dev/discord) for general community discussion and support.

- When you went through the initial setup some time ago and now want to contribute something new, you should make sure to [sync your fork](#sync-your-fork) with the latest changes from the primary branch on [gatsbyjs/gatsby](https://github.com/gatsbyjs/gatsby). Otherwise, you might run into issues where files are not found as they were renamed, moved, or deleted.
- After syncing your fork, run `yarn run bootstrap` to compile all packages. When files or tests depend on the build output (files in `/dist` directories) they might fail otherwise.
- Make sure to run `yarn run watch` on the packages' source code you're changing.

## Additional information

### Commits and pull requests

- Commit and push to your fork.
- Create a pull request from your branch.
- GitHub Help Page: [Using Git](https://docs.github.com/en/github/using-git)
- GitHub Help Page: [Proposing changes to your work with pull requests](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)

### Sync your fork

- GitHub Help Page [Syncing a fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork)
- GitHub Help Page [Merging an upstream repository into your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork)
- GitHub Help Page: [Syncing a fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork)
- GitHub Help Page: [Merging an upstream repository into your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/merging-an-upstream-repository-into-your-fork)
2 changes: 1 addition & 1 deletion docs/docs/building-a-contact-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Getform is a form backend platform which offers a free-plan for handling form su

Once you've made the code changes to your form, you can head over to the contact page on your site and start submitting data to the form. The submissions will then be visible on the Getform dashboard. You can add multiple email addresses to receive email notifications for the forms created, as well as manipulate the data you see on Getform using Zapier and Webhooks options that are offered.

You can find more info on the registration process and form setup on the [Getform website](https://getform.io/) and find code examples (AJAX, reCAPTCHA etc) on their [Codepen](https://codepen.io/getform).
You can find more info on the registration process and form setup on the [Getform website](https://getform.io/) and find code examples (AJAX, reCAPTCHA etc) on their [CodePen](https://codepen.io/getform).

### Netlify

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/creating-a-source-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ One challenge when developing locally is that a developer might make modificatio

If possible, the proactive listener approach creates the best experience if existing APIs in the data source can support it (or you have access to build support into the data source).

The code to support this behavior looks like this:
Here's some pseudo code that shows this behavior:

```javascript:title=source-plugin/gatsby-node.js
exports.sourceNodes = async ({ actions }, pluginOptions) => {
exports.sourceNodes = async ({ actions, getNodesByType }, pluginOptions) => {
const { createNode, touchNode, deleteNode } = actions

// highlight-start
Expand Down
Loading

0 comments on commit a80f6a9

Please sign in to comment.