@spark-ui/cli-utils 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.3.2](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@1.3.1...@spark-ui/cli-utils@1.3.2) (2023-02-22)
7
+
8
+ **Note:** Version bump only for package @spark-ui/cli-utils
9
+
6
10
  ## [1.3.1](https://github.com/adevinta/spark/compare/@spark-ui/cli-utils@1.3.0...@spark-ui/cli-utils@1.3.1) (2023-02-21)
7
11
 
8
12
  **Note:** Version bump only for package @spark-ui/cli-utils
@@ -38,6 +38,7 @@ const packageUtils = {
38
38
  alreadyExists: name => {
39
39
  return rootPackageJSON.workspaces.some(workspace => {
40
40
  const existingPackages = glob.sync(`${BASE_DIR}/${workspace}/`)
41
+
41
42
  return existingPackages.some(path => path.endsWith(`/${name}/`))
42
43
  })
43
44
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-ui/cli-utils",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Spark CLI utils",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,5 +25,5 @@
25
25
  "url": "git@github.com:adevinta/spark.git",
26
26
  "directory": "packages/utils/cli"
27
27
  },
28
- "gitHead": "6667269271cbbc620443701a6de33587938901e9"
28
+ "gitHead": "d31d127a513beafe224e16ba94347cf0b968c486"
29
29
  }
@@ -0,0 +1,51 @@
1
+ import { Meta } from '@storybook/blocks'
2
+ import { StoryHeading } from '@docs/helpers/StoryHeading'
3
+
4
+ <Meta title="utils/CLI" />
5
+
6
+ # CLI utils
7
+
8
+ This package provides some CLI commands to improve the development experience when building the Spark design system. Right now there are some different commands available:
9
+
10
+ - A command for generating new components: `$ spark generate`.
11
+ - A command for doing the initial setup for a new theme: `$ spark setup-theme`.
12
+
13
+ ## Contents
14
+
15
+ - [Installation](#installation)
16
+ - [Generating a new package](#generating-a-new-package)
17
+ - [Setting up a theme](#setting-up-a-theme)
18
+
19
+ <StoryHeading label="Installation" as="h2" />
20
+
21
+ CLI utils can be used by installing the package `@spark-ui/cli-utils` in your project:
22
+
23
+ ```bash
24
+ $ npm install --save-dev @spark-ui/cli-utils
25
+ ```
26
+
27
+ or just by running the following command:
28
+
29
+ ```bash
30
+ $ npx spark COMMAND_NAME
31
+ ```
32
+
33
+ <StoryHeading label="Generating a new package" as="h2" />
34
+
35
+ In order to generate a new package, the following command has to be executed:
36
+
37
+ ```bash
38
+ $ spark generate
39
+ ```
40
+
41
+ Then, a command prompt will guide you through the process by asking you for:
42
+
43
+ - the package name (required),
44
+ - the template used (required, only `Component` template available right now)
45
+ - and the package description (optional).
46
+
47
+ <StoryHeading label="Setting up a theme" as="h2" />
48
+
49
+ ```bash
50
+ $ spark setup-theme
51
+ ```