Shared Svelte components for CommunityBoss applications
Setup
npm i -D @communityboss/components
Then, in your tailwindcss.config.js
file, add the following:
const config = {
content: [
"./src/**/*.{html,js,svelte,ts}",
"./node_modules/@communityboss/components/*.svelte",
],
};
module.exports = config;
Usage
<script lang="ts">
import CloseIcon from "@communityboss/components/CloseIcon.svelte";
</script>
<CloseIcon />
Development
This project uses SvelteKit to generate an npm package of components that live in src/lib
. When you're ready to package changes, run:
npm run package
Linking locally to other repos
When you
npm run push
{
"scripts": {
"push": "yalc push --changed"
}
}
Publishing changes
After you're happy with the changes you've made, you need to publish to npm.