Giter VIP home page Giter VIP logo

foreman's Introduction

Foreman

Foreman is a Laravel scaffolding application that automates common tasks you typically perform with each new Laravel app you create. The directives you want Forman to perform are outlined in a JSON based template file.

Build Status Code Coverage Scrutinizer Code Quality

README Contents

## What does it do?
  • Structure
    • Copy files and directories
    • Move files and directories
    • Delete files and directores
    • Touch files
    • Make new directories
  • Composer
    • Require composer package dependencies
    • Require development composer package dependencies
    • Manage the composer autoload > classmap
    • Manage the composer autoload > psr-0 settings
    • Manage the composer autoload > psr-4 settings
## Installation ### Download the PHAR The simplest method of installation is to simply [download the foreman.phar](https://github.com/indatus/foreman/raw/master/foreman.phar) file from this repository. > **(Optional) Move and set permissions** Now if you'd like you can move the PHAR to `/usr/local/bin` as `foreman` for easy access. You may need to grant the file execution privileges (`chmod +x`) before running commands. ### Compile from source To compile the foreman.phar file yourself, clone this repository and run the `box build` command. To run box commands, you must install [kherge/Box](https://github.com/kherge/Box).

See optional move and permissions above.

### Install with Homebrew

You can also install Foreman via Homebrew. If you don't already have homebrew installed, you can install it with:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

Next you'll need to add the sources necessary to install foreman:

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap josegonzalez/homebrew-php

Now update all formulae

brew update

And then install Foreman

brew install foreman
### Updating Foreman

To update Foreman, you may use the foreman self-update command.

## Scaffolding a Template

To get started you'll want to generate a default / blank Foreman template. You can do this with the command:

foreman scaffold /path/to/my/template.json

Note: If you provide a directory instead of a file, Foreman will create a foreman-tpl.json file in the given directory.

A default Foreman template looks like this:

{
    "structure": {
        "copy": [
            {
                "from": "",
                "to": ""
            }
        ],
        "move": [
            {
                "from": "",
                "to": ""
            }
        ],
        "delete": [

        ],
        "touch": [

        ],
        "mkdir": [

        ]
    },
    "composer": {
        "require": [
            {
                "package": "laravel/framework",
                "version": "4.1.*"
            }
        ],
        "require-dev": [
            {
                "package": "",
                "version": ""
            }
        ],
        "autoload": {
            "classmap": [
                "app/commands",
                "app/controllers",
                "app/models",
                "app/database/migrations",
                "app/database/seeds",
                "app/test/TestCase.php"
            ],
            "psr-0": [

            ],
            "psr-4": [

            ]
        }
    }
}
### Working with a template

For structure references you can use either an absolute path (to a file or directory) or a path relative to your new application's root.

## Build a Laravel app from a template

In order to use your Foreman template to generate a new Laravel application you just need to use the build command.

The first argument is the absolute path to where you want to install the application, the second argument is the location of the template file.

foreman build /install/app/here /path/to/template.json

Now Foreman will generate your Laravel app with all your configuration applied.

foreman's People

Watchers

James Cloos avatar Kris Mulyandani P. 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.