Showing posts with label Node. Show all posts
Showing posts with label Node. Show all posts

May 16, 2016

How to use Bower as frontend dependencies manager for web project based on Laravel 5.x?

1. Install bower globally
$ npm install -g bower
2. We need a bower.json file to get started. The following command will create a file called bower.json.
$ bower init
Or we can create manually in the root of your directory with the following content:
{
  "name": "your-project"
}
3. Add .bowerrc
By default Bower installs into /bower_components, but we want our dependencies in public directory. Create a file named .bowerrc in our root directory with following content:
{
  "directory": "public/bower"
} 
4. Install our front-end dependencies. For example:
$ bower install angular --save
$ bower install jquery --save
Some Related topics:
https://laracasts.com/discuss/channels/laravel/assets-not-accessible-laravel-51

May 11, 2016

Node monitor - github.com/remy/nodemon

Nodemon restarts the server automatically whenever we save a file that the server uses. We can install Nodemon by using the following command:
$ npm install nodemon --save-dev
We only use nodemon on dev environment.