Code Monkey home page Code Monkey logo

majorainstaller's Introduction

MajoraInstaller

SensioLabsInsight Scrutinizer Code Quality Build Status Code Coverage Total Downloads Latest Stable Version License

A tool to create Symfony projects using Majora skeletons

Install the installer

This step is only needed for the first time you use the installer.

Download the binary

You will download a binary ready to use in your system.

Linux / Mac OS X

$ sudo curl -LsS https://github.com/LinkValue/MajoraInstaller/releases/download/2.1.0/majora.phar -o /usr/local/bin/majora
$ sudo chmod a+x /usr/local/bin/majora

Windows

c:\> php -r "file_put_contents('majora', file_get_contents('https://github.com/LinkValue/MajoraInstaller/releases/download/2.1.0/majora.phar'));"

Move the downloaded majora file to your projects directory and execute it as follows:

c:\> php majora

If you prefer to create a global majora command, execute the following:

c:\> (echo @ECHO OFF & echo php "%~majora" %*) > majora.bat

Then, move both files (majora and majora.bat) to any location included in your execution path. Now you can run the majora command anywhere on your system.

Building from source

You will build the binary from the source code to use in your system after cloning the repository.

1. Install the dependencies

The project use Composer as package manager.

Execute the following command to download Composer binary:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Then, execute the following command to install the packages (dev required):

$ php composer.phar install -o

2. Build the binary

The project use Box as PHAR builder.

You must enable PHAR in your php.ini first:

phar.readonly = Off

Execute the following command to download the Box binary

$ curl -LSs https://box-project.github.io/box2/installer.php | php

Then, execute the following command ton build the application:

$ php box.phar build

3. Install in your system

To have the majora command, execute the following command:

# cp build/majora.phar /usr/local/bin/majora

Using the installer

1. Start a new project with the latest stable Majora Standard Edition version

Execute the new command and provide the name of your project as the only argument:

# Linux, Mac OS X
$ majora new my_project

# Windows
c:\> php majora new my_project

2. Start a new project based on a specific Majora Standard Edition branch

Execute the new command and provide the name of your project as the first argument and the branch number as the second argument. The installer will automatically select the most recent version available for the given branch:

# Linux, Mac OS X
$ majora new my_project 2.8

# Windows
c:\> php majora new my_project 2.8

3. Start a new project based on a specific Majora Standard Edition version

Execute the new command and provide the name of your project as the first argument and the exact Majora Standard Edition version as the second argument:

# Linux, Mac OS X
$ majora new my_project 2.8.1

# Windows
c:\> php majora new my_project 2.8.1

References

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.