3.0.2 • Published 8 months ago

@chakra-ui/cli v3.0.2

Weekly downloads
383
License
MIT
Repository
github
Last release
8 months ago

@chakra-ui/cli

Generate TypeScript types to provide autocomplete for your custom theme.

Usage

npx @chakra-ui/cli tokens <path/to/your/theme.(js|ts)>

or

npx @chakra-ui/cli tokens <@your-org/chakra-theme-package>
$ npx @chakra-ui/cli tokens --help

Usage: chakra-cli tokens [options] <source>

Options:
  --out <path>              output file e.g. node_modules/@chakra-ui/styled-system/dist/declarations/src/theming.types.d.ts
  --strict-component-types  Generate strict types for props variant and size
  --strict-token-types      Generate strict types for theme tokens (e.g. color, spacing)
  --no-format               Disable auto formatting
  --watch [path]            Watch directory for changes and rebuild
  --template <template>     Choose the template to use for the generation (choices: "default", "augmentation", default: "default"
  -h, --help                display help for command

Example call:
  $ chakra-cli tokens theme.ts

Note 🚨: If you delete the node_modules directory, you'll need to re-run the command to get proper typings again.

For convenience, you can add a postinstall script to your package.json, so you don't have to think about this every time you re-install your dependencies.

"scripts": {
  "gen:theme-typings": "chakra-cli tokens <path/to/your/theme.(js|ts)>",
  "postinstall": "npm run gen:theme-typings"
}
3.0.2

8 months ago

3.0.1

8 months ago

3.0.0

8 months ago

3.0.0-next.32

8 months ago

3.0.0-next.31

8 months ago

3.0.0-next.30

8 months ago

2.5.5

8 months ago

3.0.0-next.29

8 months ago

3.0.0-next.28

8 months ago

3.0.0-next.27

8 months ago

2.5.0

9 months ago

2.5.2

8 months ago

2.5.1

9 months ago

2.5.4

8 months ago

2.5.3

8 months ago

3.0.0-next.26

9 months ago

3.0.0-next.22

9 months ago

3.0.0-next.21

9 months ago

3.0.0-next.24

9 months ago

3.0.0-next.23

9 months ago

3.0.0-next.20

10 months ago

3.0.0-next.25

9 months ago

3.0.0-next.11

11 months ago

3.0.0-next.10

12 months ago

3.0.0-next.13

10 months ago

3.0.0-next.12

11 months ago

3.0.0-next.19

10 months ago

3.0.0-next.2

1 year ago

3.0.0-next.18

10 months ago

3.0.0-next.1

1 year ago

3.0.0-next.4

1 year ago

3.0.0-next.3

1 year ago

3.0.0-next.15

10 months ago

3.0.0-next.14

10 months ago

3.0.0-next.17

10 months ago

3.0.0-next.0

1 year ago

3.0.0-next.16

10 months ago

3.0.0-next.9

12 months ago

3.0.0-next.6

12 months ago

3.0.0-next.5

12 months ago

3.0.0-next.8

12 months ago

3.0.0-next.7

12 months ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.1

2 years ago

2.3.0

2 years ago

2.2.1

2 years ago

2.2.0

3 years ago

2.1.8

3 years ago

2.1.7

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.6

3 years ago

2.1.5

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

2.0.0-next.2

3 years ago

1.9.1-next.0

3 years ago

2.0.0-next.1

3 years ago

1.9.0

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.1-next.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

5 years ago