filtercn 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 +41 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # FilterCN CLI
2
+
3
+ The official CLI tool to automatically install the [FilterCN](https://github.com/tmduoc/filtercn) component into your Next.js project.
4
+
5
+ FilterCN is a comprehensive, fully-customizable filter component built on top of [shadcn/ui](https://ui.shadcn.com/). It provides a visual filter builder UI that syncs state to URL search parameters, ideal for REST API-powered data tables.
6
+
7
+ ## Installation & Usage
8
+
9
+ Run the following command in the root of your Next.js project to install the component:
10
+
11
+ ```bash
12
+ npx filtercn init
13
+ ```
14
+
15
+ The CLI will:
16
+ 1. Detect your project structure (e.g., `src/components` vs `components`).
17
+ 2. Detect your package manager (npm, pnpm, yarn, bun).
18
+ 3. Detect your import alias (e.g., `@/`).
19
+ 4. Automatically create the necessary folder structure.
20
+ 5. Scaffold all 19 component files (UI components, hooks, helpers, types).
21
+ 6. Auto-install required peer dependencies (`lucide-react`, `date-fns`).
22
+
23
+ ## Force Overwrite
24
+
25
+ If you already have the component installed and want to overwrite it with a fresh copy:
26
+
27
+ ```bash
28
+ npx filtercn init --force
29
+ ```
30
+
31
+ ## Prerequisites
32
+
33
+ Since the component is built using shadcn/ui, you must have the following shadcn components installed in your project:
34
+
35
+ ```bash
36
+ npx shadcn@latest add button input select popover calendar command badge
37
+ ```
38
+
39
+ ## License
40
+
41
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filtercn",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "CLI to scaffold the FilterCN conditional filter component into your Next.js + shadcn/ui project",
5
5
  "type": "module",
6
6
  "bin": {