Thanks for being interested in contributing to this project!
Clone this repo to your local machine and install the dependencies.
pnpm install
Run the tests to make sure everything is working.
pnpm test
We use commitizen. Installed on your machine.
pnpm git:add && pnpm commit
Feel free to enhance the existing functions. You can add more tests, more examples, or even more features.
There are some notes for adding new functions
-
Before you start working, it's better to discuss the function you want to add in discord.
-
Try to introduce 3rd-party dependencies as this package is aimed to be solving integration between svelte and other libraries.
-
If you'd like to add a function that doesn't depends on any 3rd-party libraries, please contribute to @sveu/actions, @sveu/browser or @sveu/shared.
-
Install the 3rd-party library you want to use,
pnpm add -D <library>
. -
Add the package that you just installed to
peerDependencies
andpeerDependenciesMeta
inpackage.json
.{ "peerDependencies": { "<library>": "*" }, "peerDependenciesMeta": { "<library>": { "optional": true } } }
-
Details explained in the Function Folder section.
Please note you don't need to update packages'
src/index.ts
. It's automatically generated.
A function folder typically contains these 2 files:
index.ts # function source code itself
index.test.ts # vitest unit testing
for index.ts
you should export the function with names.
// DO
export { myFunction }
// Do
export function myFunction() {}
// DON'T
export default myFunction
// DON'T
export default function myFunction() {}
Thank you again for being interested in this project! You are awesome!