From 7c880a145cbe71c582bb578ffe549d59b988738e Mon Sep 17 00:00:00 2001 From: Ben Kates Date: Wed, 24 Jul 2024 11:02:42 -0400 Subject: [PATCH] add to readme/changelog --- CHANGELOG.md | 1 + README.md | 8 ++++++++ src/docs/Intro.docs.mdx | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6854c3e8..5cf4a346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Feature: GitHub source links for components via [@etchteam/storybook-addon-github-link](https://storybook.js.org/addons/@etchteam/storybook-addon-github-link) in storybook docs - Patch: Update method of declaring Storybook component descriptions and add import instructions to components - Patch: Remove description field from top level `meta` object in component `.stories.svelte` files (do not render) +- Feature: CLI command to generate new component boilerplate (`npm run create-component`) ## v0.10.2 diff --git a/README.md b/README.md index 58666e5f..7a537e38 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ To build your library: npm run package ``` +### CLI-based command for creating new component boilerplate + +To create three boilerplate files for a new component (`ComponentName.svelte`, `ComponentName.stories.svelte`, and `ComponentName.docs.md`), run the following command: + +```bash +npm run create-component +``` + ## Contributing to this library When contributing to this library, keep the following guidelines in mind. The [pull request template](https://github.com/UrbanInstitute/dataviz-components/blob/main/.github/pull_request_template.md) requires explanation of changes and provides a checklist of tasks to ensure clean code and documentation. Please name all branches in `kebab-case`, beginning with "patch", "feature", or "bugfix", and provide insightful commit messages. diff --git a/src/docs/Intro.docs.mdx b/src/docs/Intro.docs.mdx index 5102a141..b1c3363e 100644 --- a/src/docs/Intro.docs.mdx +++ b/src/docs/Intro.docs.mdx @@ -47,3 +47,11 @@ You can either wrap your entire page with a `` instance, or you can wrap ## Contributing to this library We welcome contributions to this library! The [pull request template](https://github.com/UrbanInstitute/dataviz-components/blob/main/.github/pull_request_template.md) requires explanation of changes and provides a checklist of tasks to ensure clean code and documentation. Please name all branches in `kebab-case`, beginning with "patch", "feature", or "bugfix", and provide insightful commit messages. + +### CLI-based command for creating new component boilerplate + +To create three boilerplate files for a new component (`ComponentName.svelte`, `ComponentName.stories.svelte`, and `ComponentName.docs.md`), run the following command: + +```bash +npm run create-component +```