Developing for Outline has different considerations than developing with Outline.
If you are using Outline to create a design system, you should refer to the scaffolding information in the main ../README.md file along with the documentation in the ../packages/outline-docs package. This package should be added by default when you initialize your Outline project and its contents should show in your project's Storybook instance.
If you are developing to improve Outline there are two modes to consider for Outline packages:
- running in the context of the Outline project
- running in the context of a project using Outline.
Running in the context of the Outline project is relatively straightforward as it simply involves running commands in this repo. For example, yarn run start
will start Storybook in dev mode. Running in the context of a project, however, is more complicated. There are two techniques you should be aware of.
If you want to test your work within the context of a project and your change doesn't involve the installation of a package or initialization of a project, linking techniques may be sufficient for your needs.
When adjusting the project initialization process it can be executed via direct reference instead of using the @phase2/outline-cli
package. There is also a flag to the init
command, -l
, that will cause the templates used to come from the ../packages/outline-templates
and ../packages/outline-storybook
directories instead of the published @phase2/outline-templates
and @phase2/outline-storybook
packages. It will also cause the initial yarnpkg
command in the generated project to be skipped.
For example, to spin up a project directory as a sibling to this repo run:
npx ./outline/packages/outline-cli init -l
Note: Do not forget to execute a build before testing the project initialization process. Use of the -l flag does not currently cause any initially installed packages to use linking technique above.