Skip to content

Bower integration #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bower_components
/node_modules
.env
/public/css
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,6 +32,9 @@ composer install --prefer-dist
```
npm install
```
```
bower install
```

### Database Setup

Expand Down
20 changes: 20 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
18 changes: 12 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var elixir = require('laravel-elixir');

require('laravel-elixir-livereload');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
Expand All @@ -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',
Expand All @@ -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();
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"devDependencies": {
"gulp": "^3.8.8",
"laravel-elixir": "*"
"laravel-elixir": "*",
"laravel-elixir-livereload": "0.0.3"
}
}
2 changes: 1 addition & 1 deletion resources/assets/less/app.less
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 5 additions & 1 deletion resources/views/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<div ng-view>
</div>
</div>

@if ( Config::get('app.debug') )
<script type="text/javascript">
document.write('<script src="//localhost:35729/livereload.js?snipver=1" type="text/javascript"><\/script>')
</script>
@endif
</body>
</html>