Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.14 KB

DEVELOPING.md

File metadata and controls

48 lines (31 loc) · 1.14 KB

Developing

Command line

Installing dependencies

npm install

Building

npm run build

Development

You can watch to rebuild on every change using:

npm run watch

To test, you may run the example Storybook:

npm run storybook

For a manual testing workflow, you should run watch and storybook at the same time.

Testing local version elsewhere

You may configure a user package (like amphtml) to use your locally built version by using a package path.

Point to a local copy on build-system/tasks/storybook/package.json. The following relative path has amphtml/ and storybook-addon-amp/ on the same level directory:

  "devDependencies" {
-   "@ampproject/storybook-addon": "1.1.1",
+   "@ampproject/storybook-addon": "file:../../../../../storybook-addon-amp",
  }

This way, you may use the local addon package's npm run dev in conjunction with amp storybook under amphtml/. Changes are picked up automatically.