Last active
August 29, 2015 14:17
-
-
Save jaceju/767fc45af24e87ba87a8 to your computer and use it in GitHub Desktop.
Simple Laravel Elixir workflow
This file contains hidden or 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
{ | |
"directory": "public/bower_components" | |
} |
This file contains hidden or 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
'use strict'; | |
var elixir = require('laravel-elixir'); | |
require('laravel-elixir-wiredep'); | |
require('laravel-elixir-useref'); | |
require('laravel-elixir-browser-sync'); | |
require('laravel-elixir-serve'); | |
require('laravel-elixir-sync'); | |
require('laravel-elixir-jshint'); | |
require('laravel-elixir-clean'); | |
require('laravel-elixir-style-guide'); | |
require('laravel-elixir-apidoc'); | |
elixir(function (mix) { | |
var port = 8000; | |
mix.clean() | |
.sass('*.scss') | |
.wiredep() | |
.jshint() | |
.sync('resources/assets/js/**/*.js', 'public/js'); | |
if (elixir.config.production) { | |
mix.useref({src: false}) | |
.version(['js/*.js', 'css/*.css']) | |
.styleGuide() | |
.apidoc(); | |
} else { | |
mix.serve({ | |
port: port | |
}).browserSync(null, { | |
proxy: 'localhost:' + port, | |
reloadDelay: 2000 | |
}); | |
} | |
}); |
This file contains hidden or 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
{ | |
"private": true, | |
"devDependencies": { | |
"bower": "~1.3.0", | |
"gulp": "~3.8.0", | |
"laravel-elixir": "*", | |
"laravel-elixir-apidoc": "*", | |
"laravel-elixir-browser-sync": "*", | |
"laravel-elixir-clean": "*", | |
"laravel-elixir-codeception": "*", | |
"laravel-elixir-jshint": "*", | |
"laravel-elixir-serve": "*", | |
"laravel-elixir-style-guide": "*", | |
"laravel-elixir-sync": "*", | |
"laravel-elixir-twig": "*", | |
"laravel-elixir-useref": "*", | |
"laravel-elixir-wiredep": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you! This helped me a lot in setting up my local dev environment!