Last active
October 20, 2019 04:15
-
-
Save emmanuelbarturen/8c486446a2cea8171c65e10156c1b642 to your computer and use it in GitHub Desktop.
Install browserSync on Homestead (vagrant)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm cache clear (optional) | |
$ npm install --no-bin-links | |
$ npm install laravel-elixir --save-dev --no-bin-link | |
$ npm install laravel-elixir-livereload --save-dev --no-bin-links | |
#configurar gulpfile.js | |
$gulp watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var elixir = require('laravel-elixir'); | |
var livereload = require('gulp-livereload'); | |
elixir(function(mix) { | |
mix.browserSync({ proxy: 'name.dev', files: ["*.php", "assets/scripts/*.js", "assets/css/*.css"] }); | |
mix.sass('./assets/scss/style.scss', './assets/css/style.css'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. the domain should be .dev, in my experience don't work with .app | |
2. access to http://name.dev:3000/ | |
2. if terminal show: "Maximum call stack size exceeded", try again the command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment