Go to file
2018-05-31 19:07:11 -04:00
.circleci Tweaking test summary setup 2018-05-29 17:36:29 -04:00
public Adding humans and robots files 2018-02-10 16:12:11 -05:00
script Updating i18n:scrub script to remove defined keys from missing namespace 2018-05-31 18:23:04 -04:00
src Updating Header styles to allow right-hand items to reflow 2018-05-31 19:07:11 -04:00
.gitignore Setting up CircleCI test summary support 2018-05-29 17:30:51 -04:00
.yarnrc Fixing URLs in yarn.lock 2018-02-10 19:15:35 -05:00
deploy.config.js Invalidating CloudFront cache when deploying 2018-05-29 17:08:22 -04:00
LICENSE.txt Adding basic readme and license 2014-11-23 11:41:53 -05:00
package.json Tweaking test summary setup 2018-05-29 17:36:29 -04:00
README.md Fixing typo 2018-05-31 17:17:23 -04:00
webpack.bundle-analyzer.js Adding webpack bundle analyzer 2018-03-30 17:06:11 -04:00
webpack.common.js Adjusting chunk splitting config 2018-05-28 12:03:49 -04:00
webpack.dev.js Upgrading webpack to 4.0 2018-03-07 19:09:08 -05:00
webpack.prod-prerender.js Splitting prod configs 2018-03-30 17:05:33 -04:00
webpack.prod-web.js Removing unnecessary config 2018-05-28 11:21:25 -04:00
yarn.lock Setting up CircleCI test summary support 2018-05-29 17:30:51 -04:00

Regexper CircleCI

Code for the http://regexper.com/ site.

Contributing

I greatly appreciate any contributions that you may have for the site. Feel free to fork the project and work on any of the reported issues, or let me know about any improvements you think would be beneficial.

When sending pull requests, please keep them focused on a single issue. I would rather deal with a dozen pull requests for a dozen issues with one change each over one pull request fixing a dozen issues. Also, I appreciate tests to be included with feature development, but for minor changes I will probably not put up much of a fuss if they're missing.

Working with the code

Node is required for working with this site.

To start with, install the necessary dependencies:

$ yarn install

To start a development server, run:

$ yarn start

Available scripts

  • yarn start - Start a development server on port 8080
  • yarn start:prod - Run a build and start a web server on port 8080. This will not automatically rebuild.
  • yarn build - Run a production build (used for deployments and for rebuilding when running yarn start:prod)
  • yarn deploy - Deploy application to AWS S3 bucket
  • yarn test - Run lint and unit tests
  • yarn test:lint - Run eslint
  • yarn test:unit - Run jest unit tests
  • yarn test:watch - Run jest in watch mode
  • yarn test:bundle-analyzer - Generate webpack-bundle-analyzer report
  • yarn i18n:scrub - Scrubs i18n locale configs. Adds missing keys and normalizes YAML formatting

Configuration

Several environment variables are used to configure the application at build-time. None of these values are required during testing.

  • NODE_ENV - Effects build-time optimizations. Set to "production" for builds and unit tests in package.json. Setting to anything else will show a banner in the application's header.
  • GA_PROPERTY - Google Analytics property ID.
  • SENTRY_KEY - Sentry.io DSN key for error reporting.
  • CIRCLE_BRANCH, CIRCLE_BUILD_NUM, and CIRCLE_SHA1 - CircleCI values used to generate build ID. Displayed in application footer and used in Sentry.io error reports.
  • CLOUD_FRONT_ID - AWS CloudFront distribution ID to invalidating when running yarn deploy
  • DEPLOY_BUCKET - AWS S3 bucket to deploy application to when running yarn deploy.
  • DEPLOY_ENV - Environment the application will be deployed to. Used to report environment in Sentry.io error reports. Typically set to either "preview" or "production".
  • BANNER - Text to display in header banner. Generally generated from NODE_ENV
  • BUILD_ID - Application build ID. Generated from CIRCLE_BRANCH, CIRCLE_BUILD_NUM, and CIRCLE_SHA1 if not set.

License

See LICENSE.txt file for licensing details.