diff --git a/README.md b/README.md index 4f0c9f00b..009fae2bc 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 @@ -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`. diff --git a/gatsby-config.js b/gatsby-config.js index 9232bc2a9..50c0a3062 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -51,6 +51,9 @@ const gatsbyConfig = { resolve: 'gatsby-plugin-sass', options: { data: sassImports, + cssLoaderOptions: { + localIdentName: '[sha1:hash:hex:4]', + }, }, }, { @@ -404,7 +407,6 @@ const gatsbyConfig = { ], }, }, - 'gatsby-plugin-minify-classnames', ], } diff --git a/netlify.toml b/netlify.toml index 18b120954..1e1de2009 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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]] diff --git a/package.json b/package.json index 44a5c55e0..cc8063338 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/yarn.lock b/yarn.lock index 404f3fb1b..bd135bb6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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"