Search by

javaabu / manifest

dash8xjavaabun4ff4h

Ship CSS, Sass, JS, TypeScript, React and Vue from Laravel packages: register assets in a service provider, load them automatically or with Blade directives, and build them with Vite.

Package info

github.com/Javaabu/manifest

pkg:composer/javaabu/manifest

Statistics

Installs: 0

Dependents: 11

Suggesters: 0

Stars: 0

Open Issues: 2

dev-main / 1.x-dev 2026-11-10 09:59 UTC

This package is auto-updated.

Last update: 2026-11-15 10:49:57 UTC


README

Tests codecov Latest Version on Packagist License: MIT

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 {}

Documentation

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.

Quick start

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.

Testing

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 build

Changelog

Please see CHANGELOG for what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.

License

MIT. See LICENSE.md.