Skip to content

Commit 7c23411

Browse files
author
Mehdy Dara
committed
Merge pull request #96 from eleven-labs/fix
Fix usage of useref, wiredep with bower_components
2 parents a12fa69 + 8451f34 commit 7c23411

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

app/src/compile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ module.exports = function () {
6464
} else {
6565
this.model.cssLinks = [];
6666
if(this.props.ui.key === 'bootstrap') {
67-
this.model.cssLinks.push('bower_components/bootstrap/dist/css/bootstrap.css');
67+
this.model.cssLinks.push('../bower_components/bootstrap/dist/css/bootstrap.css');
6868
} else if(this.props.ui.key === 'foundation') {
69-
this.model.cssLinks.push('bower_components/foundation/css/foundation.css');
69+
this.model.cssLinks.push('../bower_components/foundation/css/foundation.css');
7070
}
7171
}
7272

app/src/format.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,11 @@ module.exports = function () {
111111
var styleAppDest = 'src/app/index.' + this.props.cssPreprocessor.extension;
112112
var styleCopies = {};
113113
styleCopies[styleAppSource] = styleAppDest;
114-
this.styleVendorPosition = '.';
115114

116115
if(this.model.vendorStylesPreprocessed) {
117116
var styleVendorSource = 'src/app/__' + this.props.ui.key + '-vendor.' + this.props.cssPreprocessor.extension;
118117
var styleVendorDest = 'src/app/vendor.' + this.props.cssPreprocessor.extension;
119118
styleCopies[styleVendorSource] = styleVendorDest;
120-
this.styleVendorPosition = '{.tmp,app}';
121119
}
122120

123121
this.optionalFiles.push({ copies: styleCopies });

app/templates/gulp/_wiredep.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,10 @@ var gulp = require('gulp');
66
gulp.task('wiredep', function () {
77
var wiredep = require('wiredep').stream;
88

9-
gulp.src('src/{app,components}/*.scss')
10-
.pipe(wiredep({
11-
directory: 'bower_components',
12-
ignorePath: /^\/|\.\.\//
13-
}))
14-
.pipe(gulp.dest('src'));
15-
16-
gulp.src('src/*.html')
9+
return gulp.src('src/index.html')
1710
.pipe(wiredep({
1811
directory: 'bower_components',
1912
exclude: [<%= wiredepExclusions %>],
20-
ignorePath: /^\/|\.\.\//
2113
}))
2214
.pipe(gulp.dest('src'));
2315
});

app/templates/src/_index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="viewport" content="width=device-width">
88
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
99

10-
<!-- build:css(<%= styleVendorPosition %>) styles/vendor.css -->
10+
<!-- build:css({.tmp,src}) styles/vendor.css -->
1111
<%= cssLinks %>
1212

1313
<!-- bower:css -->
@@ -19,8 +19,8 @@
1919
<link rel="stylesheet" href="app/index.css">
2020
<!-- endbuild -->
2121

22-
<!-- build:js(.) scripts/modernizr.js -->
23-
<script src="bower_components/modernizr/modernizr.js"></script>
22+
<!-- build:js scripts/modernizr.js -->
23+
<script src="../bower_components/modernizr/modernizr.js"></script>
2424
<!-- endbuild -->
2525
</head>
2626
<body>
@@ -40,13 +40,13 @@
4040
ga('create','UA-XXXXX-X');ga('send','pageview');
4141
</script>
4242

43-
<!-- build:js(.) scripts/vendor.js -->
43+
<!-- build:js scripts/vendor.js -->
4444
<!-- bower:js -->
4545
<!-- run `gulp wiredep` to automaticaly populate bower script dependencies -->
4646
<!-- endbower -->
4747
<!-- endbuild -->
4848

49-
<!-- build:js({src,.tmp}) scripts/app.js -->
49+
<!-- build:js({.tmp,src}) scripts/app.js -->
5050
<script src="app/index.js"></script>
5151
<script src="app/main/main.controller.js"></script>
5252
<script src="components/navbar/navbar.controller.js"></script>

0 commit comments

Comments
 (0)