Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.01 KB

CONTRIBUTING.md

File metadata and controls

70 lines (49 loc) · 2.01 KB

Contributing

Thanks for your interest in contributing to Inertia.js!

Packages

To make local Inertia.js development easier, this project has been setup as a monorepo using NPM Workspaces. To set it up, start by cloning the repository on your system.

git clone https://github.com/inertiajs/inertia.git inertia
cd inertia

Next, install the JavaScript dependencies:

npm install

Next, build the packages:

npm run build --workspace=packages --if-present

If you're making changes to one of the packages that requires a build step (core, react, vue2, vue3), you can setup a watcher to automatically run the build step whenever files are changed.

cd packages/core
npm run dev

When proposing changes to one of the adapters (react, vue2, vue3, svelte), please try to apply the same changes to the other adapters where possible.

Playgrounds

It's often helpful to develop Inertia.js using a real application. The playground folder contains an example Laravel project for each of the adapters. Here's how to get a playground running:

cd playgrounds/react
npm run build
composer install
cp .env.example .env
php artisan key:generate
php artisan serve
# visit the site at http://127.0.0.1:8000

To automatically see changes to the JavaScript files in the browser, start the development server:

npm run dev

To test the SSR mode, first run the build, and then start the SSR server:

npm run build
npm run ssr:serve

Publishing

This section is really for the benefit of the core maintainers.

  1. Increment the version numbers in the package.json file for each package, making sure to also update the adapter dependencies on @inertiajs/core.
  2. Run npm install to update the top-laravel package-lock.json file.
  3. Update CHANGELOG.md.
  4. Run npm publish for each package. This will automatically run the necessary build step.
  5. Add release notes to GitHub.