new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Storybook · all subjects

contributing/templates

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Sandbox template configuration structure

Sandbox templates are configured in `code/lib/cli-storybook/src/sandbox-templates.ts`. Each template entry includes: a key consisting of a tool prefix (e.g., 'cra') and options suffix (e.g., 'default-js'); a name field with human-readable description; a script field specifying the command to generate the application (using `.` for current directory or `{{beforeDir}}` placeholder); an expected field reflecting the expected framework/renderer/builder for `sb init`; an optional inDevelopment flag for templates in development; and an optional skipTasks field to exclude specific tasks.

Developing a new sandbox template

To develop a new sandbox template: add an entry to `code/lib/cli-storybook/src/sandbox-templates.ts` with the template configuration. Include the `inDevelopment` flag until the PR is merged, which makes development easier. Once merged, remove the flag in a fast-follow PR and the template will be generated on a nightly cadence pulling from the templates repository.

Running a sandbox with inDevelopment flag

If a template has the `inDevelopment` flag, it will be generated locally as part of the sandbox process. Create the sandbox with `yarn task --task dev --template <template-key> --start-from=install`, replacing `<template-key>` with the template id (e.g., `cra/default-js`). Templates with `inDevelopment` automatically run with the `--no-link` flag, which is required for local template generation to work.

Give your agent this brain