Categories
Laravel

Laravel Installation

The intro docs have you using Composer to pull in all its dependencies, which come to about 100mb. Apparently it should be possible to turn off development bundles, but not sure I’ve done it yet.

This composer.json:

{
	"require": {
		"laravel/framework": "4.0.*"
	},
	"autoload": {
		"classmap": [
			"app/commands",
			"app/controllers",
			"app/models",
			"app/database/migrations",
			"app/database/seeds",
			"app/tests/TestCase.php"
		]
	},
	"scripts": {
		"pre-update-cmd": [
			"php artisan clear-compiled"
		],
		"post-install-cmd": [
			"php artisan optimize"
		],
		"post-update-cmd": [
			"php artisan vendor-cleanup",
			"php artisan optimize"
		]
	},
	"config": {
		"preferred-install": "dist"
	},
	"minimum-stability": "dev"
}

Should cut file size down with the vendor-cleanup, but I’m wondering if the artisan command does nothing on my local system. When did it get into Windows?

Code Bright takes a different approach, pulling from GitHub. Haven’t tried it yet though.

Categories
JavaScript

Require.JS

It seems to be a popular way of managing JS dependencies. From what I gather it expects files to be self contained anonymous functions that stay out of the global scope. jQuery can be hacked to fit Require.JS’ approach, but the jQuery file won’t by default.

don’t think it’s about LazyLoading so much as getting all the scripts you need for a given page without having to call them explicitly in the markup.