basecoat-cli 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +56 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # basecoat-cli
2
+
3
+ This package provides a Command Line Interface (CLI) to help you quickly scaffold [Basecoat](https://basecoatui.com) components into your project.
4
+
5
+ ## Prerequisites
6
+
7
+ - Ensure you have Node.js and npm (or your preferred package manager) installed.
8
+ - For the components to function correctly, your project should have:
9
+ - [Tailwind CSS](https://tailwindcss.com/docs/installation) installed and configured.
10
+ - The `basecoat-css` package installed and imported (or `basecoat.css` manually added).
11
+ - [Alpine.js](https://alpinejs.dev/docs/installation) installed and initialized, as Basecoat components rely on it for interactivity.
12
+
13
+ ## Usage
14
+
15
+ Use the `add` command to add components to your project:
16
+
17
+ ```bash
18
+ # npx
19
+ npx basecoat-cli add [component]
20
+
21
+ # pnpm
22
+ pnpm dlx basecoat-cli add [component]
23
+
24
+ # bun
25
+ bunx basecoat-cli add [component]
26
+
27
+ # yarn
28
+ yarn dlx basecoat-cli add [component]
29
+ ```
30
+
31
+ Replace `[component]` with the name of the component you wish to add (e.g., `dialog`, `select`) or leave it out if you want to pick from the list of available components
32
+ or install all of them at once.
33
+
34
+ The CLI will prompt you for:
35
+
36
+ 1. **Template Engine:** Choose between Nunjucks (`.njk`) or Jinja (`.html.jinja`).
37
+ 2. **Assets Directory:** The path where component assets (like JavaScript files) should be placed (e.g., `src/assets/js/components`).
38
+ 3. **Macros Directory:** The path where component macros should be placed (e.g., `src/_includes/macros/components`).
39
+
40
+ The CLI will then copy the necessary JavaScript files and Nunjucks/Jinja macros for the selected component into the specified directories.
41
+
42
+ ### Example
43
+
44
+ To add the `dialog` component:
45
+
46
+ ```bash
47
+ npx basecoat-cli add dialog
48
+ ```
49
+
50
+ ## Documentation
51
+
52
+ For more detailed information on components, their usage, and customization options, please refer to the [Basecoat documentation](https://basecoatui.com/installation/#install-cli).
53
+
54
+ ## License
55
+
56
+ [MIT](https://github.com/hunvreus/basecoat/blob/main/LICENSE.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basecoat-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Add Basecoat components to your project",
5
5
  "author": "hunvreus",
6
6
  "license": "MIT",