Skip to content

Commit

Permalink
feat: Normalize CSS hashing algorithims
Browse files Browse the repository at this point in the history
  • Loading branch information
kevee committed Oct 8, 2020
1 parent 6af43a4 commit e158bf9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 24 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ yarn install
The website is built from two separate data sources: our own API for COVID data, and Contentful for content. To download the most recent COVID data and setup a `.env` file with a copy of read-only API keys to Contentful, run:

```shell
yarn run setup
yarn setup
```

You can also run `yarn run setup:api-data` if you just want to download data and not touch the `.env` file.
You can also run `yarn setup:api-data` if you just want to download data and not touch the `.env` file.

To run the website locally, use:

Expand All @@ -58,15 +58,15 @@ Components live in `src/components` and are organized as follows:

[![Coverage Status](https://coveralls.io/repos/github/COVID19Tracking/website/badge.svg?branch=master)](https://coveralls.io/github/COVID19Tracking/website?branch=master)

We use Jest for automated testing, and all test files for Gatsby are located in `./src/__tests__`. Test files are structured following their related components. To run tests, use `yarn run test`.
We use Jest for automated testing, and all test files for Gatsby are located in `./src/__tests__`. Test files are structured following their related components. To run tests, use `yarn test`.

When you make a change to an interface, you will need to [update the Jest snapshot](https://jestjs.io/docs/en/snapshot-testing) for tests to complete successfully:

```shell
yarn run test:update
yarn test:update
```

Before pushing your local branch to the repository, make sure to run `yarn run test:dev`. This will make sure the project is linted and all tests pass. Make sure that every test passes. Pull requests are automatically checked against these same tests.
Before pushing your local branch to the repository, make sure to run `yarn test:dev`. This will make sure the project is linted and all tests pass. Make sure that every test passes. Pull requests are automatically checked against these same tests.

## Storybook

Expand All @@ -77,7 +77,7 @@ All common components throughout the site are documented in [Storybook](https://
To preview the storybook locally, just run:

```shell
yarn run storybook
yarn storybook
```

The storybook is now available at `http://localhost:6006`.
Expand Down
4 changes: 3 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const gatsbyConfig = {
resolve: 'gatsby-plugin-sass',
options: {
data: sassImports,
cssLoaderOptions: {
localIdentName: '[sha1:hash:hex:4]',
},
},
},
{
Expand Down Expand Up @@ -404,7 +407,6 @@ const gatsbyConfig = {
],
},
},
'gatsby-plugin-minify-classnames',
],
}

Expand Down
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build]
publish = "public"
command = "yarn run build"
command = "yarn build"
functions = "functions"

[context.production]
environment= { GATSBY_ALGOLIA_INDEX_PREFIX = "live_" }

[context.deploy-preview]
command = "yarn run build-preview"
command = "yarn build-preview"
environment = {DEV_ENVIRONMENT_VARIABLE_FILE = "false", ALGOLIA_ADMIN_KEY = "0", CTP_GITHUB_API_BUILD_TOKEN="0", CTP_GITHUB_API_BUILD_KEY="0"}

[[redirects]]
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"gatsby-plugin-feed": "^2.5.13",
"gatsby-plugin-global-context": "^1.0.0",
"gatsby-plugin-manifest": "^2.4.32",
"gatsby-plugin-minify-classnames": "^0.2.0",
"gatsby-plugin-netlify": "^2.3.16",
"gatsby-plugin-nprogress": "^2.3.12",
"gatsby-plugin-offline": "^3.2.29",
Expand Down Expand Up @@ -147,8 +146,6 @@
"clean:gatsby": "gatsby clean",
"develop": "gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md,scss}\"",
"start": "npm run develop",
"start:gatsby": "gatsby serve",
"storybook": "start-storybook -p 6006",
"storybook:deploy": "run-s storybook:build storybook:pages",
"storybook:build": "build-storybook",
Expand Down
12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9819,13 +9819,6 @@ gatsby-plugin-manifest@^2.4.32:
semver "^7.3.2"
sharp "^0.25.4"

gatsby-plugin-minify-classnames@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/gatsby-plugin-minify-classnames/-/gatsby-plugin-minify-classnames-0.2.0.tgz#5e2c36d53993337c9a900f37a5ad3dc2549c9955"
integrity sha512-U8KC24vuKsolqmvTwlx/nUQ1KJIQi4t1ur4+KApcbU65zEXWBRqbVhWdYorP1/k/O4GbWv4gy9JoEOmAmZltbw==
dependencies:
incstr "^1.2.3"

gatsby-plugin-netlify@^2.3.16:
version "2.3.16"
resolved "https://registry.yarnpkg.com/gatsby-plugin-netlify/-/gatsby-plugin-netlify-2.3.16.tgz#bf886aaa1540ff804909dcc1069ba5ca79f20194"
Expand Down Expand Up @@ -11781,11 +11774,6 @@ in-publish@^2.0.0:
resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.1.tgz#948b1a535c8030561cea522f73f78f4be357e00c"
integrity sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==

incstr@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/incstr/-/incstr-1.2.3.tgz#8f105bbec9bebe5fa777e52b3f516cee071c67cf"
integrity sha512-ySi29Lzdc3QnB1LzZgRf5kl59m5tPucNagrAyJJ9rWz4+Pa6IxAHSNyUHYvEvaj6QPwWAY2/thi3Rxt45qi3HQ==

indent-string@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
Expand Down

0 comments on commit e158bf9

Please sign in to comment.