Manage your app with Laravel+Grunt+Bower

  
 

Why do you choose this?

Open source is now popular, from the back-end libraries, to the front-end jQuery plug-ins, front-end frameworks, etc. More and more excellent components can be selected for use in existing projects. As the open source components are updated and iterated, their dependencies on each other are becoming more complex. The old framework is always difficult to adapt to new changes, and even if you change the old framework for new features, it will be slightly more frustrating. Then there will be new frameworks and tools that will emerge at this time.

The direction in which each project starts is very important, and a good start can avoid the various problems that follow. The three tools to be mentioned below are a good starting point for existing application development. Laravel

Laravel is a very new PHP
framework, drawing on the excellent features of many predecessors, starting with PHP
5, introducing Composer as a package management tool. It is called the PHP
framework created by WEB artists. Grunt

A JavaScript-based automated build tool that automates repetitive tasks such as minification, compilation, unit testing, linting, and more. Bower

Package management tools for web front-end development that address dependencies between front-end frameworks for ease of modularity and reuse. Advantages

Larvel can take advantage of the latest version of PHP and eliminate some historical issues. With Composer, you can greatly reduce the number of "wheels". Excellent packages can be found in Packagist. These packages are almost all managed by Github. Github's issue and request can help improve the quality of the package. Bower can help manage open source front-end libraries, such as Bootstrap and jQuery, and these packages are also hosted on Github. Grunt helps glue open source components to the front and back, automating work such as merge compilation and compression.

Installation Prerequisites

Some components that need to be installed in advance are not covered here. Please use Google.

ComposerNode & npmGruntBower

Laravel

Installing a Laravel project with Composer is very easy

composer create-project laravel/laravel myproject

After the installation is completed, the frame structure of laravel is generated in the myproject directory, and the entry file is in public. In the myproject root directory, there is a composer.json file. This file looks like this:

{"name": "laravel/laravel","description": "The Laravel Framework .","keywords": ["framework", "laravel"],"license": "MIT","require": {"laravel/framework": "4.1.*" ;}, //...}

This file can control some dependencies of the project. We need to add some components directly under require. Composer will help us find the required components. Dependency package.

Next, in order to install the front-end framework, we first create several public directories, and create a similar directory under public

.

Copyright © Windows knowledge All Rights Reserved