{"id":15288407,"url":"https://github.com/bunlong/create-svelte-library","last_synced_at":"2025-04-13T07:49:18.346Z","repository":{"id":72262656,"uuid":"363056361","full_name":"Bunlong/create-svelte-library","owner":"Bunlong","description":"📦 CLI for creating reusable Svelte libraries.","archived":false,"fork":false,"pushed_at":"2021-05-03T16:50:33.000Z","size":152,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T07:49:12.118Z","etag":null,"topics":["babel","cli","component","create-svelte-library","library","rollup","svelte","sveltejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bunlong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T07:05:45.000Z","updated_at":"2023-03-23T06:39:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"879dd492-db2b-4636-91be-ee1b315937b2","html_url":"https://github.com/Bunlong/create-svelte-library","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"61e2ddccc14a5db664cab129364269a16b62d05c"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bunlong%2Fcreate-svelte-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bunlong%2Fcreate-svelte-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bunlong%2Fcreate-svelte-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bunlong%2Fcreate-svelte-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bunlong","download_url":"https://codeload.github.com/Bunlong/create-svelte-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","cli","component","create-svelte-library","library","rollup","svelte","sveltejs"],"created_at":"2024-09-30T15:48:42.356Z","updated_at":"2025-04-13T07:49:18.321Z","avatar_url":"https://github.com/Bunlong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# create-svelte-library\n\nCLI for creating reusable, modern Svelte libraries using Rollup.\n\n[![NPM](https://img.shields.io/npm/v/create-svelte-library.svg)](https://www.npmjs.com/package/create-svelte-library) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Features\n\n* Easy-to-use CLI\n* Handles all modern JS features\n* Bundles commonjs and es module formats\n* [Sapper](https://sapper.svelte.dev) for example usage and local dev\n* [Rollup](https://rollupjs.org/guide/en) for bundling\n* [Babel](https://babeljs.io) for transpiling\n* Thorough documentation\n\n## Install globally\n\n```bash\nnpm install -g create-svelte-library\n```\n\n## Usage with npx\n\n```bash\nnpx create-svelte-library\n```\n\n([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))\n\n## Creating a New Module\n\n```bash\ncreate-svelte-library\n```\n\nAnswer some basic prompts about your module, and then the CLI will perform the following steps:\n\n* copy over the template\n* install dependencies via yarn or npm\n* link packages together for local development\n* initialize local git repo\n\n## Development\n\nLocal development is broken into two parts (ideally using two tabs).\n\nFirst, run rollup to build your `src/` module and automatically recompile it into `dist/` whenever you make changes.\n\n```bash\nnpm run build # runs rollup\n```\n\nThe second part will be running the `example/` sapper that's linked to the local version of your module.\n\n```bash\ncd example\nnpm run dev # runs sapper dev server\n```\n\nNow, anytime you make a change to your library in `src/` or to the example app's `example/src`, sapper will reload your local dev server so you can iterate on your component in real-time.\n\n#### Publishing to npm\n\n```bash\nnpm publish\n```\n\nThis builds `commonjs` and `es` versions of your module to `dist/` and then publishes your module to `npm`.\n\n\n## ❗ Issues\n\nIf you think any of the `create-svelte-library` can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.\n\n## 💪 Contribution\n\nWe'd love to have your helping hand on contributions to `create-svelte-library` by forking and sending a pull request!\n\nYour contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)\n\nHow to contribute:\n\n- Open pull request with improvements\n- Discuss ideas in issues\n- Spread the word\n- Reach out with any feedback\n\n## ⚖️ License\n\nThe MIT License [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunlong%2Fcreate-svelte-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbunlong%2Fcreate-svelte-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbunlong%2Fcreate-svelte-library/lists"}