Please follow the guidelines below if you want to contribute to the project.
If you are working on a new feature, please create an issue on GitHub first. This will help us to understand what you are working on and to avoid duplication of work.
You can clone the repo by running the following command:
git clone git@github.com:manchenkoff/nuxt-sanctum-precognition.gitThen you should create a new branch with the following name convention:
git checkout -b XXX-feature-nameWhere XXX is the issue number on the GitHub.
To set up the development environment, you should install the dependencies first. You can do this by running the following command:
pnpm installThen you can start dev server to see the playground app:
pnpm devOr if you want to build the project, you can run one of the following commands:
# Generate type stubs
pnpm dev:prepare
# Build the playground
pnpm dev:buildTo test playground app you need to have a Laravel API running with Sanctum and Precognition installed.
if there are tests for the feature you are working on, you can run them by executing one of the following commands:
# Run Vitest
pnpm test
# Run Vitest in watch mode
pnpm test:watchIf you want to test the package before publishing it to npm,
you can create an archive and install it as a dependency in your project.
To do this, run the following command:
pnpm rcThis will create a .tgz file in the dist directory. You can then reference it in your project:
{
"devDependencies": {
"nuxt-sanctum-precognition": "file:/dist/nuxt-sanctum-precognition-0.0.0.tgz"
}
}Then you can install the package by running:
pnpm installThis project uses ESLint to enforce code style and standards. Please make sure to run the following commands before creating a pull request:
# Run ESLint
pnpm lint
# Run Nuxt type check
pnpm test:types
# Run Vitest
pnpm testOnce all the changes are merged into main branch, run the following command to release a new version:
pnpm releaseAll contributors are expected to adhere to the Code of Conduct. Please read it.
If you have any questions or need help, feel free to reach out via artem@manchenkoff.me or by opening a new issue on GitHub.