create-rolldown 0.0.1 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rolldown",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Scaffolding tool for Rolldown projects",
5
5
  "keywords": [
6
6
  "bundler",
@@ -24,11 +24,9 @@
24
24
  "create-rolldown": "index.js"
25
25
  },
26
26
  "files": [
27
- "dist",
28
27
  "index.js",
29
- "LICENSE",
30
- "README.md",
31
- "template-*"
28
+ "template-*",
29
+ "dist"
32
30
  ],
33
31
  "type": "module",
34
32
  "scripts": {
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [author]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,164 +0,0 @@
1
- # Rolldown React Starter
2
-
3
- > 🚀 Created with [create-rolldown](https://github.com/sunny-117/create-rolldown) - Fast scaffolding for Rolldown library projects
4
-
5
- A modern React component library starter powered by Rolldown - the blazingly fast JavaScript bundler written in Rust.
6
-
7
- ## ✨ Features
8
-
9
- - ⚡️ **Lightning Fast** - Powered by [Rolldown](https://rolldown.rs), a Rust-based bundler
10
- - ⚛️ **React 19** - Latest React with full TypeScript support
11
- - 🎮 **Live Playground** - Vite-powered dev environment with HMR
12
- - 📦 **NPM Ready** - Pre-configured for publishing React libraries
13
- - 🔧 **TypeScript First** - Full type safety and IntelliSense
14
- - 🔄 **Watch Mode** - Instant feedback during library development
15
- - 💡 **Perfect For** - React components, hooks, utilities, and UI libraries
16
-
17
- ## 🚀 Quick Start
18
-
19
- Install dependencies:
20
-
21
- ```bash
22
- npm install
23
- # or
24
- pnpm install
25
- # or
26
- yarn install
27
- ```
28
-
29
- ## 📦 Development Workflow
30
-
31
- ### 🎮 Run the playground (Recommended for development)
32
-
33
- ```bash
34
- npm run play
35
- ```
36
-
37
- Opens a Vite dev server at `http://localhost:5173` with:
38
-
39
- - ⚡️ Hot Module Replacement (HMR)
40
- - 🔄 Instant updates when you edit components
41
- - 🎨 Live preview of your library
42
-
43
- **Tip**: Edit `src/MyButton.tsx` and see changes instantly in the playground!
44
-
45
- ### 📦 Build the library
46
-
47
- ```bash
48
- npm run build
49
- ```
50
-
51
- Outputs to `dist/` directory with:
52
-
53
- - `index.js` - ESM bundle
54
- - `index.d.ts` - TypeScript declarations
55
-
56
- ### 🔄 Watch mode for library development
57
-
58
- ```bash
59
- npm run dev
60
- ```
61
-
62
- Automatically rebuilds the library on file changes. Use this when:
63
-
64
- - Testing your library in another project
65
- - Preparing for publishing
66
- - Running alongside the playground
67
-
68
- ### 🔍 Type checking
69
-
70
- ```bash
71
- npm run typecheck
72
- ```
73
-
74
- ## 📁 Project Structure
75
-
76
- ```
77
- your-library/
78
- ├── src/ # 📚 Your library source code
79
- │ ├── index.ts # 📝 Main entry - export your components here
80
- │ └── MyButton.tsx # 🎨 Example component (replace with yours)
81
-
82
- ├── playground/ # 🎮 Development playground (Vite)
83
- │ ├── src/
84
- │ │ ├── App.tsx # 🎪 Test your components here
85
- │ │ ├── index.tsx # 🚪 Playground entry point
86
- │ │ └── style.css # 🎨 Playground styles
87
- │ ├── index.html # 📄 HTML template
88
- │ └── public/ # 📁 Static assets
89
-
90
- ├── dist/ # 📦 Build output (generated)
91
- │ ├── index.js # ESM bundle
92
- │ └── index.d.ts # Type declarations
93
-
94
- ├── rolldown.config.js # ⚙️ Rolldown bundler config
95
- ├── vite.config.ts # ⚡️ Vite playground config
96
- ├── tsconfig.json # 🔧 TypeScript config
97
- └── package.json # 📋 Package metadata
98
- ```
99
-
100
- ## 💡 Usage Example
101
-
102
- After building and publishing, users can import your components:
103
-
104
- ```tsx
105
- import { MyButton } from 'your-library-name';
106
-
107
- function App() {
108
- return (
109
- <div>
110
- <MyButton />
111
- </div>
112
- );
113
- }
114
- ```
115
-
116
- ## 📤 Publishing to NPM
117
-
118
- 1. Update `package.json` with your library details:
119
- - `name` - Your package name (e.g., `@yourname/react-components`)
120
- - `version` - Semantic version (start with `0.1.0`)
121
- - `description` - What your library does
122
- - `author` - Your name and email
123
- - `repository` - Your git repository URL
124
- - `keywords` - Help users find your package
125
-
126
- 2. Build the library:
127
-
128
- ```bash
129
- npm run build
130
- ```
131
-
132
- 3. Test the build locally:
133
-
134
- ```bash
135
- npm pack
136
- # Creates a .tgz file you can test in another project
137
- ```
138
-
139
- 4. Publish to npm:
140
- ```bash
141
- npm publish
142
- ```
143
-
144
- The `prepublishOnly` script ensures your library is built before publishing.
145
-
146
- ## 🎯 Best Practices
147
-
148
- - **Export Strategy**: Export all public components from `src/index.ts`
149
- - **Peer Dependencies**: React and ReactDOM are peer dependencies (users provide them)
150
- - **Tree Shaking**: Use named exports for better tree-shaking
151
- - **TypeScript**: Add proper types and JSDoc comments
152
- - **Testing**: Test components in the playground before publishing
153
- - **Versioning**: Follow [semantic versioning](https://semver.org/)
154
-
155
- ## 🔗 Learn More
156
-
157
- - [Rolldown Documentation](https://rolldown.rs)
158
- - [create-rolldown](https://github.com/sunny-117/create-rolldown)
159
- - [React Documentation](https://react.dev)
160
- - [TypeScript Handbook](https://www.typescriptlang.org/docs/)
161
-
162
- ---
163
-
164
- Built with ❤️ using create-rolldown
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [author]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,168 +0,0 @@
1
- # Rolldown SolidJS Starter
2
-
3
- > 🚀 Created with [create-rolldown](https://github.com/sunny-117/create-rolldown) - Fast scaffolding for Rolldown library projects
4
-
5
- A modern SolidJS component library starter powered by Rolldown - the blazingly fast JavaScript bundler written in Rust.
6
-
7
- ## ✨ Features
8
-
9
- - ⚡️ **Lightning Fast** - Powered by [Rolldown](https://rolldown.rs), a Rust-based bundler
10
- - 🎯 **SolidJS** - Fine-grained reactivity with true reactivity
11
- - 🎮 **Live Playground** - Vite-powered dev environment with HMR
12
- - 📦 **NPM Ready** - Pre-configured for publishing Solid libraries
13
- - 🔧 **TypeScript First** - Full type safety and IntelliSense
14
- - 🔄 **Watch Mode** - Instant feedback during library development
15
- - 💡 **Perfect For** - Solid components, primitives, utilities, and reactive libraries
16
-
17
- ## 🚀 Quick Start
18
-
19
- Install dependencies:
20
-
21
- ```bash
22
- npm install
23
- # or
24
- pnpm install
25
- # or
26
- yarn install
27
- ```
28
-
29
- ## 📦 Development Workflow
30
-
31
- ### 🎮 Run the playground (Recommended for development)
32
-
33
- ```bash
34
- npm run play
35
- ```
36
-
37
- Opens a Vite dev server at `http://localhost:5173` with:
38
-
39
- - ⚡️ Hot Module Replacement (HMR)
40
- - 🔄 Instant updates when you edit components
41
- - 🎨 Live preview of your library
42
-
43
- **Tip**: Edit `src/MyButton.tsx` and see changes instantly in the playground!
44
-
45
- ### 📦 Build the library
46
-
47
- ```bash
48
- npm run build
49
- ```
50
-
51
- Outputs to `dist/` directory with:
52
-
53
- - `index.js` - ESM bundle
54
- - `index.jsx` - Solid-specific JSX output
55
- - `index.d.ts` - TypeScript declarations
56
-
57
- ### 🔄 Watch mode for library development
58
-
59
- ```bash
60
- npm run dev
61
- ```
62
-
63
- Automatically rebuilds the library on file changes. Use this when:
64
-
65
- - Testing your library in another project
66
- - Preparing for publishing
67
- - Running alongside the playground
68
-
69
- ### 🔍 Type checking
70
-
71
- ```bash
72
- npm run typecheck
73
- ```
74
-
75
- ## 📁 Project Structure
76
-
77
- ```
78
- your-library/
79
- ├── src/ # 📚 Your library source code
80
- │ ├── index.ts # 📝 Main entry - export your components here
81
- │ └── MyButton.tsx # 🎨 Example component (replace with yours)
82
-
83
- ├── playground/ # 🎮 Development playground (Vite)
84
- │ ├── src/
85
- │ │ ├── App.tsx # 🎪 Test your components here
86
- │ │ ├── index.tsx # 🚪 Playground entry point
87
- │ │ └── style.css # 🎨 Playground styles
88
- │ ├── index.html # 📄 HTML template
89
- │ └── public/ # 📁 Static assets
90
-
91
- ├── dist/ # 📦 Build output (generated)
92
- │ ├── index.js # ESM bundle
93
- │ ├── index.jsx # Solid JSX output
94
- │ └── index.d.ts # Type declarations
95
-
96
- ├── rolldown.config.js # ⚙️ Rolldown bundler config
97
- ├── vite.config.ts # ⚡️ Vite playground config
98
- ├── tsconfig.json # 🔧 TypeScript config
99
- └── package.json # 📋 Package metadata
100
- ```
101
-
102
- ## 💡 Usage Example
103
-
104
- After building and publishing, users can import your components:
105
-
106
- ```tsx
107
- import { MyButton } from 'your-library-name';
108
- import { createSignal } from 'solid-js';
109
-
110
- function App() {
111
- return (
112
- <div>
113
- <MyButton />
114
- </div>
115
- );
116
- }
117
- ```
118
-
119
- ## 📤 Publishing to NPM
120
-
121
- 1. Update `package.json` with your library details:
122
- - `name` - Your package name (e.g., `@yourname/solid-components`)
123
- - `version` - Semantic version (start with `0.1.0`)
124
- - `description` - What your library does
125
- - `author` - Your name and email
126
- - `repository` - Your git repository URL
127
- - `keywords` - Help users find your package
128
-
129
- 2. Build the library:
130
-
131
- ```bash
132
- npm run build
133
- ```
134
-
135
- 3. Test the build locally:
136
-
137
- ```bash
138
- npm pack
139
- # Creates a .tgz file you can test in another project
140
- ```
141
-
142
- 4. Publish to npm:
143
- ```bash
144
- npm publish
145
- ```
146
-
147
- The `prepublishOnly` script ensures your library is built before publishing.
148
-
149
- ## 🎯 Best Practices
150
-
151
- - **Export Strategy**: Export all public components from `src/index.ts`
152
- - **Peer Dependencies**: SolidJS is a peer dependency (users provide it)
153
- - **Tree Shaking**: Use named exports for better tree-shaking
154
- - **TypeScript**: Add proper types and JSDoc comments
155
- - **Reactivity**: Leverage Solid's fine-grained reactivity
156
- - **Testing**: Test components in the playground before publishing
157
- - **Versioning**: Follow [semantic versioning](https://semver.org/)
158
-
159
- ## 🔗 Learn More
160
-
161
- - [Rolldown Documentation](https://rolldown.rs)
162
- - [create-rolldown](https://github.com/sunny-117/create-rolldown)
163
- - [SolidJS Documentation](https://www.solidjs.com)
164
- - [TypeScript Handbook](https://www.typescriptlang.org/docs/)
165
-
166
- ---
167
-
168
- Built with ❤️ using create-rolldown
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [author]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,161 +0,0 @@
1
- # Rolldown Svelte Starter
2
-
3
- > 🚀 Created with [create-rolldown](https://github.com/sunny-117/create-rolldown) - Fast scaffolding for Rolldown library projects
4
-
5
- A modern Svelte 5 component library starter powered by Rolldown - the blazingly fast JavaScript bundler written in Rust.
6
-
7
- ## ✨ Features
8
-
9
- - ⚡️ **Lightning Fast** - Powered by [Rolldown](https://rolldown.rs), a Rust-based bundler
10
- - 🔥 **Svelte 5** - Latest Svelte with runes and enhanced reactivity
11
- - 🎮 **Live Playground** - Vite-powered dev environment with HMR
12
- - 📦 **NPM Ready** - Pre-configured for publishing Svelte libraries
13
- - 🔧 **TypeScript First** - Full type safety and IntelliSense
14
- - 🔄 **Watch Mode** - Instant feedback during library development
15
- - 💡 **Perfect For** - Svelte components, actions, stores, and utilities
16
-
17
- ## 🚀 Quick Start
18
-
19
- Install dependencies:
20
-
21
- ```bash
22
- npm install
23
- # or
24
- pnpm install
25
- # or
26
- yarn install
27
- ```
28
-
29
- ## 📦 Development Workflow
30
-
31
- ### 🎮 Run the playground (Recommended for development)
32
-
33
- ```bash
34
- npm run play
35
- ```
36
-
37
- Opens a Vite dev server at `http://localhost:5173` with:
38
-
39
- - ⚡️ Hot Module Replacement (HMR)
40
- - 🔄 Instant updates when you edit components
41
- - 🎨 Live preview of your library
42
-
43
- **Tip**: Edit `src/MyButton.svelte` and see changes instantly in the playground!
44
-
45
- ### 📦 Build the library
46
-
47
- ```bash
48
- npm run build
49
- ```
50
-
51
- Outputs to `dist/` directory with:
52
-
53
- - `index.js` - ESM bundle
54
- - `index.d.ts` - TypeScript declarations
55
-
56
- ### 🔄 Watch mode for library development
57
-
58
- ```bash
59
- npm run dev
60
- ```
61
-
62
- Automatically rebuilds the library on file changes. Use this when:
63
-
64
- - Testing your library in another project
65
- - Preparing for publishing
66
- - Running alongside the playground
67
-
68
- ### 🔍 Type checking
69
-
70
- ```bash
71
- npm run typecheck
72
- ```
73
-
74
- ## 📁 Project Structure
75
-
76
- ```
77
- your-library/
78
- ├── src/ # 📚 Your library source code
79
- │ ├── index.ts # 📝 Main entry - export your components here
80
- │ └── MyButton.svelte # 🎨 Example component (replace with yours)
81
-
82
- ├── playground/ # 🎮 Development playground (Vite)
83
- │ ├── src/
84
- │ │ ├── App.svelte # 🎪 Test your components here
85
- │ │ ├── main.ts # 🚪 Playground entry point
86
- │ │ └── style.css # 🎨 Playground styles
87
- │ ├── index.html # 📄 HTML template
88
- │ └── public/ # 📁 Static assets
89
-
90
- ├── dist/ # 📦 Build output (generated)
91
- │ ├── index.js # ESM bundle
92
- │ └── index.d.ts # Type declarations
93
-
94
- ├── rolldown.config.js # ⚙️ Rolldown bundler config
95
- ├── vite.config.ts # ⚡️ Vite playground config
96
- ├── tsconfig.json # 🔧 TypeScript config
97
- └── package.json # 📋 Package metadata
98
- ```
99
-
100
- ## 💡 Usage Example
101
-
102
- After building and publishing, users can import your components:
103
-
104
- ```svelte
105
- <script lang="ts">
106
- import { MyButton } from 'your-library-name';
107
- </script>
108
-
109
- <MyButton />
110
- ```
111
-
112
- ## 📤 Publishing to NPM
113
-
114
- 1. Update `package.json` with your library details:
115
- - `name` - Your package name (e.g., `@yourname/svelte-components`)
116
- - `version` - Semantic version (start with `0.1.0`)
117
- - `description` - What your library does
118
- - `author` - Your name and email
119
- - `repository` - Your git repository URL
120
- - `keywords` - Help users find your package
121
-
122
- 2. Build the library:
123
-
124
- ```bash
125
- npm run build
126
- ```
127
-
128
- 3. Test the build locally:
129
-
130
- ```bash
131
- npm pack
132
- # Creates a .tgz file you can test in another project
133
- ```
134
-
135
- 4. Publish to npm:
136
- ```bash
137
- npm publish
138
- ```
139
-
140
- The `prepublishOnly` script ensures your library is built before publishing.
141
-
142
- ## 🎯 Best Practices
143
-
144
- - **Export Strategy**: Export all public components from `src/index.ts`
145
- - **Peer Dependencies**: Svelte is a peer dependency (users provide it)
146
- - **Tree Shaking**: Use named exports for better tree-shaking
147
- - **TypeScript**: Add proper types and JSDoc comments
148
- - **Svelte 5 Runes**: Leverage `$state`, `$derived`, and `$effect` for reactivity
149
- - **Testing**: Test components in the playground before publishing
150
- - **Versioning**: Follow [semantic versioning](https://semver.org/)
151
-
152
- ## 🔗 Learn More
153
-
154
- - [Rolldown Documentation](https://rolldown.rs)
155
- - [create-rolldown](https://github.com/sunny-117/create-rolldown)
156
- - [Svelte Documentation](https://svelte.dev)
157
- - [TypeScript Handbook](https://www.typescriptlang.org/docs/)
158
-
159
- ---
160
-
161
- Built with ❤️ using create-rolldown
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [author]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,124 +0,0 @@
1
- # Rolldown Vanilla Starter
2
-
3
- > 🚀 Created with [create-rolldown](https://github.com/sunny-117/create-rolldown) - Fast scaffolding for Rolldown library projects
4
-
5
- A minimal TypeScript library starter powered by Rolldown - the blazingly fast JavaScript bundler written in Rust.
6
-
7
- ## ✨ Features
8
-
9
- - ⚡️ **Lightning Fast** - Powered by [Rolldown](https://rolldown.rs), a Rust-based bundler
10
- - 📦 **NPM Ready** - Pre-configured for publishing to npm with proper exports
11
- - 🔧 **TypeScript First** - Full TypeScript support with type declarations
12
- - 🎯 **Zero Config** - Minimal setup, maximum productivity
13
- - 🔄 **Watch Mode** - Hot reload during development
14
- - 💡 **Perfect For** - Utility libraries, tools, helpers, and pure JavaScript/TypeScript packages
15
-
16
- ## 🚀 Quick Start
17
-
18
- Install dependencies:
19
-
20
- ```bash
21
- npm install
22
- # or
23
- pnpm install
24
- # or
25
- yarn install
26
- ```
27
-
28
- ## 📦 Development
29
-
30
- ### Build the library
31
-
32
- ```bash
33
- npm run build
34
- ```
35
-
36
- Outputs to `dist/` directory with:
37
-
38
- - `index.js` - ESM bundle
39
- - `index.d.ts` - TypeScript declarations
40
-
41
- ### Watch mode for development
42
-
43
- ```bash
44
- npm run dev
45
- ```
46
-
47
- Automatically rebuilds on file changes.
48
-
49
- ### Type checking
50
-
51
- ```bash
52
- npm run typecheck
53
- ```
54
-
55
- ## 📁 Project Structure
56
-
57
- ```
58
- your-library/
59
- ├── src/
60
- │ └── index.ts # 📝 Main entry point - export your library here
61
- ├── dist/ # 📦 Build output (generated)
62
- │ ├── index.js # ESM bundle
63
- │ └── index.d.ts # Type declarations
64
- ├── rolldown.config.js # ⚙️ Rolldown configuration
65
- ├── tsconfig.json # 🔧 TypeScript configuration
66
- └── package.json # 📋 Package metadata
67
- ```
68
-
69
- ## 💡 Usage Example
70
-
71
- After building, your library can be imported:
72
-
73
- ```typescript
74
- import { greet, Counter } from 'your-library-name';
75
-
76
- // Use the greeting function
77
- console.log(greet('World')); // "Hello, World!"
78
-
79
- // Use the Counter class
80
- const counter = new Counter();
81
- counter.increment(); // 1
82
- counter.increment(); // 2
83
- console.log(counter.value); // 2
84
- ```
85
-
86
- ## 📤 Publishing to NPM
87
-
88
- 1. Update `package.json` with your library details:
89
- - `name` - Your package name
90
- - `version` - Semantic version
91
- - `description` - Package description
92
- - `author` - Your name and email
93
- - `repository` - Your git repository URL
94
-
95
- 2. Build the library:
96
-
97
- ```bash
98
- npm run build
99
- ```
100
-
101
- 3. Publish to npm:
102
- ```bash
103
- npm publish
104
- ```
105
-
106
- The `prepublishOnly` script ensures your library is built before publishing.
107
-
108
- ## 🎯 Best Practices
109
-
110
- - Keep your public API in `src/index.ts`
111
- - Use named exports for better tree-shaking
112
- - Add JSDoc comments for better IDE support
113
- - Run `npm run typecheck` before committing
114
- - Version your releases using semantic versioning
115
-
116
- ## 🔗 Learn More
117
-
118
- - [Rolldown Documentation](https://rolldown.rs)
119
- - [create-rolldown](https://github.com/sunny-117/create-rolldown)
120
- - [TypeScript Handbook](https://www.typescriptlang.org/docs/)
121
-
122
- ---
123
-
124
- Built with ❤️ using create-rolldown
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) [year] [author]
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,165 +0,0 @@
1
- # Rolldown Vue Starter
2
-
3
- > 🚀 Created with [create-rolldown](https://github.com/sunny-117/create-rolldown) - Fast scaffolding for Rolldown library projects
4
-
5
- A modern Vue 3 component library starter powered by Rolldown - the blazingly fast JavaScript bundler written in Rust.
6
-
7
- ## ✨ Features
8
-
9
- - ⚡️ **Lightning Fast** - Powered by [Rolldown](https://rolldown.rs), a Rust-based bundler
10
- - 💚 **Vue 3** - Latest Vue with Composition API and `<script setup>`
11
- - 🎮 **Live Playground** - Vite-powered dev environment with HMR
12
- - 📦 **NPM Ready** - Pre-configured for publishing Vue libraries
13
- - 🔧 **TypeScript First** - Full type safety and IntelliSense
14
- - 🔄 **Watch Mode** - Instant feedback during library development
15
- - 💡 **Perfect For** - Vue components, composables, directives, and plugins
16
-
17
- ## 🚀 Quick Start
18
-
19
- Install dependencies:
20
-
21
- ```bash
22
- npm install
23
- # or
24
- pnpm install
25
- # or
26
- yarn install
27
- ```
28
-
29
- ## 📦 Development Workflow
30
-
31
- ### 🎮 Run the playground (Recommended for development)
32
-
33
- ```bash
34
- npm run play
35
- ```
36
-
37
- Opens a Vite dev server at `http://localhost:5173` with:
38
-
39
- - ⚡️ Hot Module Replacement (HMR)
40
- - 🔄 Instant updates when you edit components
41
- - 🎨 Live preview of your library
42
-
43
- **Tip**: Edit `src/MyButton.vue` and see changes instantly in the playground!
44
-
45
- ### 📦 Build the library
46
-
47
- ```bash
48
- npm run build
49
- ```
50
-
51
- Outputs to `dist/` directory with:
52
-
53
- - `index.js` - ESM bundle
54
- - `index.d.ts` - TypeScript declarations
55
-
56
- ### 🔄 Watch mode for library development
57
-
58
- ```bash
59
- npm run dev
60
- ```
61
-
62
- Automatically rebuilds the library on file changes. Use this when:
63
-
64
- - Testing your library in another project
65
- - Preparing for publishing
66
- - Running alongside the playground
67
-
68
- ### 🔍 Type checking
69
-
70
- ```bash
71
- npm run typecheck
72
- ```
73
-
74
- ## 📁 Project Structure
75
-
76
- ```
77
- your-library/
78
- ├── src/ # 📚 Your library source code
79
- │ ├── index.ts # 📝 Main entry - export your components here
80
- │ └── MyButton.vue # 🎨 Example component (replace with yours)
81
-
82
- ├── playground/ # 🎮 Development playground (Vite)
83
- │ ├── src/
84
- │ │ ├── App.vue # 🎪 Test your components here
85
- │ │ ├── main.ts # 🚪 Playground entry point
86
- │ │ └── style.css # 🎨 Playground styles
87
- │ ├── index.html # 📄 HTML template
88
- │ └── public/ # 📁 Static assets
89
-
90
- ├── dist/ # 📦 Build output (generated)
91
- │ ├── index.js # ESM bundle
92
- │ └── index.d.ts # Type declarations
93
-
94
- ├── rolldown.config.js # ⚙️ Rolldown bundler config
95
- ├── vite.config.ts # ⚡️ Vite playground config
96
- ├── tsconfig.json # 🔧 TypeScript config
97
- └── package.json # 📋 Package metadata
98
- ```
99
-
100
- ## 💡 Usage Example
101
-
102
- After building and publishing, users can import your components:
103
-
104
- ```vue
105
- <script setup lang="ts">
106
- import { MyButton } from 'your-library-name';
107
- </script>
108
-
109
- <template>
110
- <div>
111
- <MyButton />
112
- </div>
113
- </template>
114
- ```
115
-
116
- ## 📤 Publishing to NPM
117
-
118
- 1. Update `package.json` with your library details:
119
- - `name` - Your package name (e.g., `@yourname/vue-components`)
120
- - `version` - Semantic version (start with `0.1.0`)
121
- - `description` - What your library does
122
- - `author` - Your name and email
123
- - `repository` - Your git repository URL
124
- - `keywords` - Help users find your package
125
-
126
- 2. Build the library:
127
-
128
- ```bash
129
- npm run build
130
- ```
131
-
132
- 3. Test the build locally:
133
-
134
- ```bash
135
- npm pack
136
- # Creates a .tgz file you can test in another project
137
- ```
138
-
139
- 4. Publish to npm:
140
- ```bash
141
- npm publish
142
- ```
143
-
144
- The `prepublishOnly` script ensures your library is built before publishing.
145
-
146
- ## 🎯 Best Practices
147
-
148
- - **Export Strategy**: Export all public components from `src/index.ts`
149
- - **Peer Dependencies**: Vue is a peer dependency (users provide it)
150
- - **Tree Shaking**: Use named exports for better tree-shaking
151
- - **TypeScript**: Add proper types and JSDoc comments
152
- - **Testing**: Test components in the playground before publishing
153
- - **Versioning**: Follow [semantic versioning](https://semver.org/)
154
- - **Composition API**: Prefer `<script setup>` for better DX
155
-
156
- ## 🔗 Learn More
157
-
158
- - [Rolldown Documentation](https://rolldown.rs)
159
- - [create-rolldown](https://github.com/sunny-117/create-rolldown)
160
- - [Vue 3 Documentation](https://vuejs.org)
161
- - [TypeScript Handbook](https://www.typescriptlang.org/docs/)
162
-
163
- ---
164
-
165
- Built with ❤️ using create-rolldown