basecoat-css 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +30 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,42 +8,51 @@ Your project must have [Tailwind CSS](https://tailwindcss.com/docs/installation)
8
8
 
9
9
  ## Installation
10
10
 
11
- You can install `basecoat-css` using your preferred package manager:
11
+ Install with any package manager:
12
12
 
13
13
  ```bash
14
- # npm
15
- npm install basecoat-css
14
+ npm install basecoat-css # or pnpm add / yarn add / bun add
15
+ ```
16
16
 
17
- # yarn
18
- yarn add basecoat-css
17
+ ## Usage
19
18
 
20
- # pnpm
21
- pnpm add basecoat-css
19
+ Add it just after Tailwind in your stylesheet:
22
20
 
23
- # bun
24
- bun add basecoat-css
21
+ ```css
22
+ @import "tailwindcss";
23
+ @import "basecoat-css";
25
24
  ```
26
25
 
27
- Alternatively, you can download the `basecoat.css` file directly from the [GitHub repository](https://github.com/hunvreus/basecoat/blob/main/src/css/basecoat.css) (or the `dist/basecoat.css` file from this package after installation) and include it in your project.
26
+ That's it, you can use any Basecoat class (`btn`, `card`, `input`, etc) in your markup.
28
27
 
29
- ## Usage
28
+ ### (Optional) JavaScript files
30
29
 
31
- After installation, import `basecoat-css` into your main CSS file. Make sure to import it **after** Tailwind CSS and **before** any custom theme overrides.
30
+ Some interactive components (Dropdown Menu, Popover, Select, Sidebar, Tabs, Toast) need some JavaScript.
32
31
 
33
- ```css
34
- /* Your main CSS file (e.g., styles.css) */
32
+ With a build tool (ESM):
33
+
34
+ ```js
35
+ import 'basecoat-css/all';
36
+ ```
37
+
38
+ Or cherry-pick the components you need:
35
39
 
36
- @import "tailwindcss/base";
37
- @import "tailwindcss/components";
38
- @import "tailwindcss/utilities";
40
+ ```js
41
+ import 'basecoat-css/tabs';
42
+ import 'basecoat-css/popover';
43
+ ```
39
44
 
40
- @import "basecoat-css"; /* Or the path to basecoat.css if manually added */
45
+ Without a build tool, copy the files from `node_modules`:
41
46
 
42
- /* Your custom styles or theme overrides (optional) */
43
- /* @import "your-theme.css"; */
47
+ ```bash
48
+ npx copyfiles -u 1 "node_modules/basecoat-css/dist/js/**/*" public/js/basecoat
44
49
  ```
45
50
 
46
- Once imported, you can start using Basecoat's component classes in your HTML.
51
+ Then reference what you need, e.g.
52
+
53
+ ```html
54
+ <script src="/js/basecoat/tabs.min.js" defer></script>
55
+ ```
47
56
 
48
57
  ## Documentation
49
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basecoat-css",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Tailwind CSS for Basecoat components",
5
5
  "author": {
6
6
  "name": "hunvreus",