0.0.2 • Published 4 years ago

cryptosheets v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Cryptosheets

Cryptosheets monorepo setup utilizing Yarn Workspaces, Lerna, Docker, and Azure.

Prerequisites

  1. Yarn - NPM package manager replacement
  2. Lerna - link dependencies between packages
  3. Docker - Containerized deployments Link
  4. Azure CLI - Commands to push to Azure Container Registry (ACR) and Azure App Service Link
npm i -g yarn lerna

Install

yarn bootstrap

The bootstrap command utilizes Lerna, and completes the following actions:

  1. Runs a prepare script inside any packages that contain a prepare.
  2. Installs all required modules in parallel, and hoists to the root level

yarn i

Brings up the interactive scripts runner for all commands inside of terminal. See package-scripts.js for explanations of all scripts

Resources

Terminology

Environments

  • Local: Runs application from computer at localhost:port. Ex. http://localhost:3000
  • Dev/development: Runs application in development mode. Unoptimized. Typically contains enhanced debugging features
  • Staging: Pushes application and builds application to prepare for transition to dev or prod server
  • Production: Runs application in production mode. Uses advanced techniques such as compression. For an example, see https://expressjs.com/en/advanced/best-practice-performance.html

Environment Methods

  • Dev: Starts application in development environment, typically localhost
  • Build: Runs application through build process
  • Deploy: Deploys build application to production environment

Environment Variables (.env)

.env files can be downloaded from the following url: TBD

Building a Gatsby theme

https://www.gatsbyjs.org/tutorial/building-a-theme/#set-up-gatsby-theme-events-and-site

Adding packages to themes

  1. Add dependencies to site: yarn workspace <site> add <dependency>
  2. Add dependencies to theme: yarn workspace <theme> add <dependency>

Changing Ant Design variables

Theme Documentation https://ant.design/docs/react/customize-theme

Raw Variables https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less