Ship CSS, Sass, JS, TypeScript, React and Vue from Laravel packages. A package registers its assets in its service provider. Its Blade components load them on the pages they render on, the app's own Vite builds them, Inertia renders the package's pages, and apps override any single file.
// In a package's service provider
$this->registerAssets('filters', __DIR__ . '/../resources', function (Package $package) {
$package
->style('filters', 'css/filters.css')
->script('filter-bar', 'js/filter-bar.ts', depends_on: ['filters'])
->js() // import { FilterBar } from '@javaabu/filters'
->pages(); // Inertia::render('filters::Index')
});#[RequiresAssets('filters::filter-bar')]
class FilterBar extends Component {}You'll find the documentation on https://docs.javaabu.com/manifest, and in the docs folder.
AI coding assistants can start from llms.txt. The package ships a Laravel Boost skill and guideline, which Boost finds by itself. See AI assistants.
composer require javaabu/manifest// vite.config.js
import laravel from "laravel-vite-plugin"
import { defineConfig } from "vite"
import manifest from "./vendor/javaabu/manifest/dist/vite.js"
export default defineConfig({
plugins: [laravel({ input: ["resources/js/app.js"], refresh: true }), manifest()],
})php artisan manifest:check # installs what packages need from npm
php artisan manifest:types # TypeScript paths and Inertia page types| Building | Read |
|---|---|
| An app | Installation & Setup, Loading assets in Blade, Inertia pages |
| A package | Registering assets, Building a package |
The reference packages are in tests/Fixtures/app/vendor/acme.
composer test # PHPUnit
composer lint # Pint
pnpm install
pnpm lint && pnpm format:check && pnpm typecheck
pnpm build # dist/, committed
pnpm test:coverage # Vitest: unit tests, plus real Vite builds and a dev server (needs PHP)
vendor/bin/phpunit --group e2e # renders pages against that buildPlease see CHANGELOG for what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.
MIT. See LICENSE.md.