balmjs / laravel-balm
A standalone Front-End workflow for Laravel
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/balmjs/laravel-balm
Requires
- laravel/framework: >=5.3
This package is auto-updated.
Last update: 2025-10-28 13:06:13 UTC
README
A standalone Front-End workflow for Laravel
Requirements
- Laravel >= 5.3.x (requires PHP)
- BalmJS >= 3.x (requires Node.js)
npm install -g balm-core # required for balm 3.0
For Back-end
1.1 Installation
If you have composer installed globally you can run:
composer require balmjs/laravel-balm
Then run these commands to publish assets and config:
php artisan vendor:publish --provider="Balm\Runtime\BalmServiceProvider" --force
⚠️ --force: overwrite package.json or manual edit it:
{
"scripts": {
"dev": "balm",
"prod": "balm -p"
},
"devDependencies": {
"balm": "^3.0.0-rc.2"
}
}
1.2 Configuration
You should use Laravel's global balm function within your views to load the appropriately hashed asset. The balm function will automatically determine the current name of the hashed file:
<link rel="stylesheet" href="balm('css/app.css')" /> <script src="{{ balm('js/app.js') }}"></script>
For Front-end
2.1 Installation
Run the command in your project directory:
npm install
Then, you can install awesome libraries for your front-end project. (e.g. vue)
2.2 Configuration
Edit balm.config.js in your project directory, modify to your virtual host:
module.exports = { server: { proxy: 'your.project.local' // Target host } // More Config };
2.3 Usage
Run the command in your project directory:
# For development npm run dev # For production npm run prod