Support the ongoing development of Laravel.io →
Installation Configuration Packages
Last updated 2 years ago.
0

Artisan is part of the base Laravel app, found at https://github.com/laravel/laravel

There's no quick Composer command to retrieve it. You should just download and add it to your project.

Last updated 2 years ago.
0

Thanks cryode. This is what I was suspecting.

I bet there is a way to do this using bower.

Last updated 2 years ago.
0

Yup. Looks like there is. http://joshbranchaud.com/blog/2014/02/19/Managing-Single-Files...

But where to put it? I guess it has to go in a setup script.

Last updated 2 years ago.
0

I'm pretty limited in how I can make this work the right way. The artisan file doesn't do a whole lot, but even so, I should be able to require it as a component so I can version control it and have it auto-install per each project setup.

Since artisan uses DIR in its formed paths, I can't leave it in a bower_components folder and require it from another PHP file, or symlink to it.

The only good option I can think of is copying it from the bower_components location to the project root as the last step of a setup.sh script, and leave it gitignored. This is what that would look like:

#!/usr/bin/env bash

composer install
npm install
bower install
cp ./bower_components/artisan/index ./artisan

This is the command I used to install artisan using bower:

bower install --save-dev https://raw.githubusercontent.com/laravel/laravel/master/artisan

Which put this in my bower.json file:

  "devDependencies": {
    "artisan": "https://raw.githubusercontent.com/laravel/laravel/master/artis...;
  }
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rm-rf-etc rm-rf-etc Joined 11 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.