Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

README.md

Outline

Code.org Frontend

This directory contains packages and applications that power Code.org sites.

Note: Most of Code.org's Studio product (student experience, curriculum, teacher tools, etc.) is built in the top-level apps package and is not currently located in this directory.

What's inside?

This directory uses Turborepo to manage the monorepo and uses the following package structure:

  • apps: Applications or services (Contentful CMS, Storybook, etc.)
  • packages: Libraries, build tools, configurations (Shared linter configs, component library, etc.)

Apps

Open source Code.org applications:

Packages

Publicly available packages:

Getting Started

(!!!) If you're unable to find some information in this README.md, please refer to the documentation of package/app that you're working on. (e.g. go to packages/component-library/README.md, apps/marketing/README.md, etc)

Prerequisites

Ensure that corepack is enabled.

corepack enable

Initialize the frontend package:

yarn install

Build

Turborepo will automatically detect changed sub-directories and appropriately cache to avoid duplicate work.

To build all apps and packages, run the following command:

yarn build

Develop

To develop all apps and packages, run the following command:

yarn dev

To develop a specific set of apps and packages, use yarn workspace [workspace name] [command]. More information on this command here.

For example, to only run the design system storybook:

yarn workspace @code-dot-org/design-system-storybook dev

Formatting, Linting. (Prettier, ESLint, Stylelint)

To format all files in all packages and apps, run the following command:

yarn lint:fix

You can also run this command for some specific package or app using yarn workspace:

yarn lint:fix --filter @code-dot-org/component-library

OR

yarn workspace @code-dot-org/component-library lint:fix

Pre-release Testing

To run all tests that the pull-request quality checks do:

yarn release:dryrun

This command executes all lint, test, and build commands.

Visual Snapshot Testing (Eyes)

The design system uses Applitools Eyes via their Storybook integration to take a visual snapshot of a storybook component and compare it with baselines. Visual snapshots on pull requests and during the CI build.

To run visual snapshots locally, first obtain an Applitools API Key.

Then, assign the API key to frontend/.env in the APPLITOOLS_API_KEY key. (If this file does not exist, copy it from frontend/.env.example)

To run the visual tests:

yarn workspace @code-dot-org/design-system-storybook eyes-storybook

If differences are detected, follow the baseline update guide to resolve.

Cleaning

To remove build artifacts, use the following commmand:

yarn clean
Morty Proxy This is a proxified and sanitized view of the page, visit original site.