Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby-cli): add a clean command to wipe out local dirs #9126

Merged
merged 28 commits into from
Feb 19, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift click to select a range
71ae282
feat: add a clean command to the CLI
DSchau Oct 15, 2018
b8aa501
chore: minor tweak
DSchau Oct 15, 2018
afdf123
chore: lint
DSchau Oct 15, 2018
763de23
refactor: move info to separate command; re-use in clean
DSchau Oct 15, 2018
1fa3d23
chore: fix lint error
DSchau Oct 15, 2018
dde4cd9
feat: add options including --no-install
DSchau Oct 16, 2018
e20f13c
chore: fix typo
DSchau Oct 16, 2018
7719cb9
docs: update readme with defaults
DSchau Oct 16, 2018
ab1ae5c
chore: bump to node 6; not node 4 requirement
DSchau Oct 16, 2018
d477877
Merge branch 'master' into gatsby/cli-clean
DSchau Nov 13, 2018
1ae9a0e
chore: update readme
DSchau Nov 13, 2018
3910ef0
chore: update crlf
DSchau Feb 5, 2019
2c87178
Merge remote-tracking branch 'upstream/master' into gatsby/cli-clean
DSchau Feb 5, 2019
4dc6814
chore: mrege
DSchau Feb 5, 2019
8745d28
chore: add clean command (drop info command)
DSchau Feb 5, 2019
43955a2
fix: reduce reliance on certain gatsby version
DSchau Feb 5, 2019
a353f01
chore: the env-info command is removed
DSchau Feb 5, 2019
07e002f
chore: remove option from command handler
DSchau Feb 5, 2019
5d4ec26
chore: remove info separate file
DSchau Feb 5, 2019
32a952b
chore: remove node_modules and install from clean command
DSchau Feb 7, 2019
933bede
chore: add a plugin comment
DSchau Feb 7, 2019
7b31ed9
Merge branch 'master' into gatsby/cli-clean
DSchau Feb 12, 2019
47b299e
Merge remote-tracking branch 'upstream/master' into gatsby/cli-clean
DSchau Feb 13, 2019
f24aa24
docs: add a debugging cache doc
DSchau Feb 13, 2019
ccfd4f8
chore: tweak dir
DSchau Feb 19, 2019
c09e39f
chore: Update packages/gatsby-cli/src/create-cli.js
sidharthachatterjee Feb 19, 2019
c4677fb
Merge remote-tracking branch 'upstream/master' into gatsby/cli-clean
DSchau Feb 19, 2019
a311f2a
Merge branch 'gatsby/cli-clean' of github.com:DSchau/gatsby into gats…
DSchau Feb 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add a debugging cache doc
  • Loading branch information
DSchau committed Feb 13, 2019
commit f24aa24ca6eb9ae0559ee1bb767e18c487a9d5af
36 changes: 36 additions & 0 deletions docs/docs/debugging-cache-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 1,36 @@
---
title: Debugging Cache Issues
---

There can be certain scenarios in which the Gatsby caching mechanism appears to fail, which leads to issues like:

- Content not appearing when it should
- Changes to plugin source code not appearing to be invoked appropriately

and more! If you've found yourself writing a script like:

```json:title=package.json
{
"scripts": {
"clean": "rm -rf .cache"
}
}
```

consider utilizing the `gatsby clean` command which will help to resolve caching issues for you.

First - make sure the version of `gatsby` specified in your `package.json` dependencies is _at least_ `2.1.1`, and then make the following change to `package.json`:

```json:title=package.json
{
"scripts": {
"clean": "gatsby clean"
}
}
```

Now when you issues arise that seem to be related to caching, you can use `npm run clean` to wipe out the cache and start from a fresh slate.

_Note: If you find yourself using this command regularly, consider helping us out and [responding to our Github Issue][github-issue] with clear reproduction steps._

[github-issue]: https://github.com/gatsbyjs/gatsby/issues/11747
2 changes: 2 additions & 0 deletions www/src/data/sidebars/doc-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 195,8 @@
link: /docs/debugging-replace-renderer-api/
- title: Debugging the build process
link: /docs/debugging-the-build-process/
- title: Debugging Cache Issues
link: /docs/debugging-cache-issues/
- title: Trace Gatsby builds
link: /docs/performance-tracing/
- title: Adding website functionality
Expand Down