Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/repalash/rollup-library-starter
Minimal starter project for typescript/javascript libraries with rollup
https://github.com/repalash/rollup-library-starter
template
Last synced: 1 day ago
JSON representation
Minimal starter project for typescript/javascript libraries with rollup
- Host: GitHub
- URL: https://github.com/repalash/rollup-library-starter
- Owner: repalash
- License: mit
- Created: 2023-05-29T17:20:10.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-21T10:59:16.000Z (7 months ago)
- Last Synced: 2024-06-26T05:20:51.981Z (5 months ago)
- Topics: template
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Rollup library starter
A starter repo for creating libraries for browsers using TypeScript and Rollup.
## Usage
To start, click the `Use Template` button on Github (or download the zip file and run `git init`). Then clone the repo and install dependencies with `npm install`.
To create a new library, change the name, description, author, copyright notice, license and other properties in `package.json`, `LICENSE` and `README`.
Create source files in `src` and export them in `index.ts`.
To test the library, make tests/examples in `examples` and include them in `index.html`. Examples should access the builds from `../dist` and not the source files from the `src` directory.
To use the library locally, make a new project and include it in the `package.json` dependencies using `file:./../../path/to/this/repo`.
When pushing to Github on the master or main branch, the docs will be build using Github actions and pushed to Github pages. For this, Github pages must be enabled in the Github repository settings.
Build for development (Build and watch):
```bash
npm run dev
```
To serve the local build and examples, run
```bash
npm run serve
```Build for production (Build):
```bash
npm run build
```Build docs
```bash
npm run docs
```View docs locally
```bash
npm run serve-docs
```Publish to npm
```bash
npm run new:publish
```Generate a packed `.tgz`
```bash
npm run new:pack
```Generate a new version
```bash
npm version
```## License
MIT## References
Generated with [rollup-library-starter](https://github.com/repalash/rollup-library-starter)