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
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: update readme with defaults
  • Loading branch information
DSchau committed Oct 16, 2018
commit 7719cb93f68ac37ee8316ba7268e71211f07e7aa
48 changes: 24 additions & 24 deletions packages/gatsby-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 30,12 @@ development server.

#### Options

| Option | Description |
| :-------------: | ----------------------------------------------- |
| `-H`, `--host` | Set host. Defaults to localhost |
| `-p`, `--port` | Set port. Defaults to 8000 |
| `-o`, `--open` | Open the site in your (default) browser for you |
| `-S`, `--https` | Use HTTPS |
| Option | Description | Default |
| :-------------: | ----------------------------------------------- | :---------: |
| `-H`, `--host` | Set host. | `localhost` |
| `-p`, `--port` | Set port. | `8000` |
wardpeet marked this conversation as resolved.
Show resolved Hide resolved
| `-o`, `--open` | Open the site in your (default) browser for you | |
| `-S`, `--https` | Use HTTPS | |

Follow the [Local HTTPS guide](https://www.gatsbyjs.org/docs/local-https/)
to find out how you can set up an HTTPS development server using Gatsby.
Expand All @@ -47,11 47,11 @@ site.

#### Options

| Option | Description |
| :--------------------------: | ----------------------------------------------------------------------------------------------------------- |
| `--prefix-paths` | Build site with link paths prefixed (set pathPrefix in your config) |
| `--no-uglify` | Build site without uglifying JS bundles (for debugging) |
| `--open-tracing-config-file` | Tracer configuration file (open tracing compatible). See https://www.gatsbyjs.org/docs/performance-tracing/ |
| Option | Description | Default |
| :--------------------------: | ----------------------------------------------------------------------------------------------------------- | :-----: |
| `--prefix-paths` | Build site with link paths prefixed (set pathPrefix in your config) | `false` |
| `--no-uglify` | Build site without uglifying JS bundles (for debugging) | `false` |
| `--open-tracing-config-file` | Tracer configuration file (open tracing compatible). See https://www.gatsbyjs.org/docs/performance-tracing/ | |

### `serve`

Expand All @@ -60,33 60,33 @@ the site for testing.

#### Options

| Option | Description |
| :--------------: | ---------------------------------------------------------------------------------------- |
| `-H`, `--host` | Set host. Defaults to localhost |
| `-p`, `--port` | Set port. Defaults to 8000 |
| `-o`, `--open` | Open the site in your (default) browser for you |
| `--prefix-paths` | Serve site with link paths prefixed (if built with pathPrefix in your gatsby-config.js). |
| Option | Description | Default |
| :--------------: | ---------------------------------------------------------------------------------------- | :---------: |
| `-H`, `--host` | Set host. | `localhost` |
| `-p`, `--port` | Set port. | `8000` |
| `-o`, `--open` | Open the site in your (default) browser for you | |
| `--prefix-paths` | Serve site with link paths prefixed (if built with pathPrefix in your gatsby-config.js). | `false` |

### `clean`

At the root of a Gatsby site run `gatsby clean` to wipe out `node_modules`, cache, and the `public` directory. This is useful as a last resort when your local project seems to have many issues.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would maybe benefit from more of an explanation on why it's a last resort. Are there other things people should try first? Where can they go for more info? How can they help improve the cache so this isn't necessary?

I don't know if we have answers, but it'd be great to include whatever we can here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion!


#### Options

| Option | Description |
| :------------: | ----------------------------------------------------------------------------- |
| `--env-info` | Log environment information (e.g. system info, package info, etc.) to console |
| `--no-install` | Do not run yarn or npm install after cleaning directories |
| Option | Description | Default |
| :------------: | ------------------------------------------------------------------------------ | :-----: |
| `--env-info` | Log environment information (e.g. system info, package info, etc.) to console. | `false` |
| `--no-install` | Do not run yarn or npm install after cleaning directories | `false` |

### `info`

At the root of a Gatsby site run `gatsby info` to get helpful environment information which will be required when reporting a bug.

#### Options

| Option | Description |
| :-----------------: | ------------------------------------------------------- |
| `-C`, `--clipboard` | Automagically copy environment information to clipboard |
| Option | Description | Default |
| :-----------------: | ------------------------------------------------------- | :-----: |
| `-C`, `--clipboard` | Automagically copy environment information to clipboard | `false` |

### `repl`

Expand Down