Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juandl/rollup-plugin-tsc-generator
Rollup plugin to generate typescript declarations using tsc native
https://github.com/juandl/rollup-plugin-tsc-generator
rollup rollup-plugin types typescript
Last synced: 14 days ago
JSON representation
Rollup plugin to generate typescript declarations using tsc native
- Host: GitHub
- URL: https://github.com/juandl/rollup-plugin-tsc-generator
- Owner: juandl
- License: mit
- Created: 2024-07-20T12:54:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T10:00:39.000Z (4 months ago)
- Last Synced: 2024-09-24T11:35:35.898Z (about 2 months ago)
- Topics: rollup, rollup-plugin, types, typescript
- Language: TypeScript
- Homepage:
- Size: 27.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## rollup-plugin-tsc-generator
A Rollup plugin designed to generate TypeScript types using the native tsc program. This plugin aims to improve performance by leveraging TypeScript's built-in type-checking and declaration file generation capabilities.
### Why?
I was frustrated with the slow performance and lack of type-checking in existing plugins that generate TypeScript types. So, I created this plugin, which uses the native ```tsc (TypeScript)``` compiler and includes type-checking functionality.### Installation
You can install the plugin via npm:
```bash
npm install rollup-plugin-tsc-generator --save-dev
```### Usage
To use this plugin with Rollup, add it to your Rollup configuration:
```javascript
import {tscGenerator} from 'rollup-plugin-tsc-generator';export default {
input: 'src/index.ts',
output: {
dir: 'dist',
format: 'esm',
},
plugins: [
tscGenerator({
dist: './dist',
}),
],
};
```### Plugin Options
The tscGenerator function accepts a configuration object with the following options:
```typescript
type tscGenerator =
{
dist?: string; // The folder where TypeScript declaration files will be generated.
}
```# License
[MIT](https://github.com/juandl/rollup-plugin-tsc-generator/blob/main/LICENSE)