Giter Club home page Giter Club logo

lambo's Introduction

Lambo logo

Super-powered laravel new for Laravel and Valet.

NOTE: If you're working with the alpha, you'll need PHP 7.2, and this readme is currently out of date.The major change is that you'll want to run lambo new myApplication instead of lambo myApplication.

Installation

For Laravel >= 6

composer global require tightenco/lambo

For Laravel 5.*

composer global require tightenco/lambo:"^0.4.7"

Upgrading

composer global update tightenco/lambo

If this doesn't get you the latest version, check the file at ~/.composer/composer.json. If your version spec for Lambo is ^0.1.#, change it to be ~0.1.

Usage

Make sure ~/.composer/vendor/bin is in your terminal's path.

cd ~/Sites
lambo superApplication

What exactly does it do?

  • laravel new $PROJECTNAME
  • cd $PROJECTNAME
  • Initialize a git repo, add all of the files, and make a commit with the text "Initial commit."
  • Open the project in your editor
  • Replace the .env database credentials with the default Mac MySQL credentials: database of $PROJECTNAME, user root, and empty password
  • Replace the .env APP_URL with $PROJECTNAME.$YOURVALETTLD
  • Open $PROJECTNAME.$YOURVALETTLD in your browser

Note that, in case your $PROJECTNAME has dashes (-) in it, they will be replaced with underscores (_) in the database name.

There are also a few optional behaviors based on the parameters you pass (or define in your config file).

Optional Arguments

  • -h or --help to get the help dialog

    lambo --help
  • -e or --editor to define your editor command. Whatever is passed here will be run as $EDITOR . after creating the project.

    # runs "subl ." in the project directory after creating the project
    lambo new superApplication --editor=subl
  • -m or --message to set the first commit message.

    lambo new superApplication --message="This lambo runs fast!"
  • -p or --path to specify where to install the application.

    lambo new superApplication --path=~/Sites
  • -q or --quiet use quiet/silent mode for git, yarn/npm and laravel installer.

  • -d or --dev to choose the develop branch instead of master, getting the beta install

    lambo new superApplication --dev
  • -a or --auth to use Artisan to scaffold all of the routes and views you need for authentication

    lambo new superApplication --auth
  • --node to run yarn if installed, otherwise runs npm install after creating the project

    lambo new superApplication --node
  • -l or --link to create a Valet link to the project directory.

    lambo new superApplication --link
  • -s or --secure to secure the Valet site using https.

    lambo new superApplication --secure
  • --create-db create a new MySql database which has the same name as your project. This requires mysql command to be available on your system.

    lambo new superApplication --create-db
  • --dbuser specify the database username.

    lambo new superApplication --dbuser=USER
  • --dbpassword specify the database password.

    lambo new superApplication --dbpassword=SECRET
  • --vue to set the frontend to the default Laravel 5.* scaffolding (set by default)

    lambo new superApplication --vue
  • --bootstrap to set the frontend to Bootstrap

    lambo new superApplication --bootstrap
  • --react to set the frontend to React

    lambo new superApplication --react

Commands

  • edit-config edits your config file

    lambo edit-config
  • make-after creates an "after" file so you can run additional commands after Lambo finishes

    lambo make-after
  • edit-after edits your after file

    lambo edit-after

Config File

You can create a config file at ~/.lambo/config rather than pass the same arguments each time you create a new project.

lambo make-config

If you wish to edit your config file later on you can always use the edit command:

lambo edit-config

After File

You can create an after file at ~/.lambo/after to run additional commands after you create a new project.

lambo make-after

The after file is a bash script so you can include any commands here such as installing additional composer dependencies

# Install additional composer dependencies as you would from the command line.
echo "Installing Composer Dependencies"
composer require tightenco/mailthief tightenco/quicksand

or copying additional files to your new project.

# To copy standard files to new lambo project place them in ~/.lambo/includes directory.
echo "Copying Include Files"
cp -R ~/.lambo/includes/ $PROJECTPATH

You also have access to variables from your config file such as $PROJECTPATH and $CODEEDITOR.

Requirements

A Linux fork of Valet can be found here

Acknowledgements

Inspired by Taylor Otwell and Adam Wathan's work on Valet.

Name from TJ Miller, inspired by Taylor's love for the lambo.


News

lambo's People

Contributors

jonsugar avatar mattstauffer avatar milose avatar quickliketurtle avatar santigarcor avatar naoray avatar ijpatricio avatar sbine avatar muhammetsait avatar nowendwell avatar curtisblackwell avatar lovatt avatar kraveir0 avatar philip avatar burakerdem avatar vlauciani avatar must-tests avatar wyattcast44 avatar sidis405 avatar ovvessem avatar nunomaduro avatar ninjaparade avatar lukeberry99 avatar josebailo avatar jasonvarga avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.