panugaling/require-js

There is no license information available for the latest version (dev-master) of this package.

dev-master 2014-11-19 02:14 UTC

This package is not auto-updated.

Last update: 2024-09-24 02:16:45 UTC


README

Laravel package to automatically create files for RequireJS. This is for my personal use but if there is anyone who wants to use this package, feel free to fork it.

Installation

Install the package using composer. Edit your composer.json file and require this.

"panugaling/require-js": "dev-master"

Next is to update composer from the terminal.

composer update

Let's now add the Service Provider by opening your app/config/app.php and add a new item in the providers array.

'Panugaling\RequireJS\RequireJSServiceProvider',

If you want to change the configuration of the package, type this command in the terminal.

php artisan config:publish panugaling/require-js

That's it! You are now ready to use the package.

Usage

In your blade template, you can use it like this.

<body>
	{{ Required::load('main') }}
</body>

The argument main is the filename of our main js file. you can change it what ever you like.