diff --git a/.gitignore b/.gitignore index 9ceb7e73..263d176d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/bower_components /node_modules .env /public/css diff --git a/README.md b/README.md index 44d0ca2f..688c6d68 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ This is a repo for a starter application for a Single Page Application featuring - Versioning of CSS and JS files (cache busting) - CSS and JS files will be included automatically - A whole ready CRUD architecture -- Comes with Bootstrap and AngularJS configured to work together at their best +- Comes with Bootstrap and AngularJS (via Bower) configured to work together at their best +- Livereload is enabled (cf https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei) - And more... have a try! ## Installation @@ -31,6 +32,9 @@ composer install --prefer-dist ``` npm install ``` +``` +bower install +``` ### Database Setup diff --git a/bower.json b/bower.json new file mode 100644 index 00000000..db2de226 --- /dev/null +++ b/bower.json @@ -0,0 +1,20 @@ +{ + "name": "starter-laravel", + "version": "0.1", + "homepage": "https://github.com/pierrerigal/starter-laravel-angular", + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "angular": "1.4.2", + "angular-route": "1.4.2", + "angular-resource": "1.4.2", + "ngstorage": "~0.3.7", + "bootstrap": "~3.3.5" + } +} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 43881b90..25bfdfb7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,5 +1,5 @@ var elixir = require('laravel-elixir'); - +require('laravel-elixir-livereload'); /* |-------------------------------------------------------------------------- | Elixir Asset Management @@ -20,7 +20,12 @@ elixir(function (mix) { 'style.css' ]) .scripts([ - 'libs/**/*.js', + '../../../bower_components/jquery/dist/jquery.js', + '../../../bower_components/angular/angular.js', + '../../../bower_components/ngstorage/ngStorage.js', + '../../../bower_components/angular-route/angular-route.js', + '../../../bower_components/angular-resource/angular-resource.js', + '../../../bower_components/bootstrap/dist/js/bootstrap.js', 'app.js', 'appRoutes.js', 'controllers/**/*.js', @@ -32,9 +37,10 @@ elixir(function (mix) { 'js/all.js' ]) .copy( - 'public/js/all.js.map', 'public/build/js/all.js.map' - ) + 'public/js/all.js.map', 'public/build/js/all.js.map' + ) .copy( - 'public/css/all.css.map', 'public/build/css/all.css.map' - ); + 'public/css/all.css.map', 'public/build/css/all.css.map' + ) + .livereload(); }); \ No newline at end of file diff --git a/package.json b/package.json index f45052ae..dbfdc8ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "devDependencies": { "gulp": "^3.8.8", - "laravel-elixir": "*" + "laravel-elixir": "*", + "laravel-elixir-livereload": "0.0.3" } } diff --git a/resources/assets/less/app.less b/resources/assets/less/app.less index 99be0764..11d0bf33 100644 --- a/resources/assets/less/app.less +++ b/resources/assets/less/app.less @@ -1,4 +1,4 @@ -@import "bootstrap/bootstrap"; +@import "../../../bower_components/bootstrap/less/bootstrap"; @btn-font-weight: 300; @font-family-sans-serif: "Roboto", Helvetica, Arial, sans-serif; diff --git a/resources/views/layout.blade.php b/resources/views/layout.blade.php index bd78c87b..2e291a78 100644 --- a/resources/views/layout.blade.php +++ b/resources/views/layout.blade.php @@ -38,6 +38,10 @@
- +@if ( Config::get('app.debug') ) + +@endif