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

Gatsby initial configuration #28

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

arcticicestudio
Copy link
Contributor

Closes GH-27

All metadata and constants, like defined in GH-26, are
placed in the corresponding folders for configurations (`src/config`)
and data (`src/data`). Initially this includes information stored in
the `package.json` file of the project and the `nord` package which has
also been installed.
This commit also adds base and important constants that will be used
later on:

- `src/config/internal/constants.js` - Provides internally used
  constants
- `src/config/internal/nodes.js` - Provides internally used data about
  custom Gatsby GraphQL API nodes.
- `src/config/routes/constants.js` - Provides routing constants.
- `src/config/routes/mappings.js` - Provides route mapping constants.

GH-27
Added new NPM scripts for Gatsby specific commands and tasks:

- `build` - Base script that cleans up the project (`clean`) and runs
  `build:gatsby` afterwards.
- `build:gatsby` - Run Gatsby's `build` command to build a production
  bundle.
- `clean` - Cleans up the project by removing generated data like
  `.cache` and `public`/`build` of previous builds.
- `dev` - Starts the Gatsby development mode.
- `dev:fresh` - Base script that cleans up the project (`clean`) and
  runs `dev` afterwards.
- `dev:local` - Same as `dev`, but adds the `-H` option with the
  `0.0.0.0` parameter to make the development mode available in the
  network through the hosts network IP.
- `format` - Base script to run all configured code style formatter in
  order: Prettier -> ESLint
- `lint` - Base script to run all configured code style linters in
  order: ESLint -> remark-lint
- `serve` - Starts Gatsby's HTTP server to host the created production
  bundle (build with `build` or `build:gatsby`).

>> Installed packages

To create the base scripts that run multiple scripts (parallel or
serial) the `npm-run-all` package has been installed as development
dependency. Also to clean up the project (`clean` script) the `del-cli`
package has also been installed.

GH-27
@arcticicestudio arcticicestudio merged commit 3cda262 into develop Nov 19, 2018
@arcticicestudio arcticicestudio deleted the feature/gh-27-gatsby-initial-configuration branch November 19, 2018 07:06
@arcticicestudio arcticicestudio removed their assignment Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants