Skip to content

Commit 534d164

Browse files
committed
Fix bower concat issue
Hack to copy bower_components/ into dist/ folder and reference each dependency from here.
1 parent a81f0aa commit 534d164

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bower_components/
22
node_modules/
3+
dist/
34
*.pem

gulpfile.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ gulp.task('build',['templates'], function(){
6060
gulp.src('resources/**')
6161
.pipe(gulp.dest('dist/resources'));
6262

63+
gulp.src('bower_components/materialize/font/**')
64+
.pipe(gulp.dest('dist/font'));
65+
66+
gulp.src('bower_components/**')
67+
.pipe(gulp.dest('dist/bower_components'));
68+
6369
return gulp.src('index.html')
6470
.pipe(inject(gulp.src('src/**/*.css',{read: false})))
6571
.pipe(inject(
@@ -80,13 +86,12 @@ gulp.task('build',['templates'], function(){
8086
css: [minifyCss({
8187
keepSpecialComments: 0
8288
}), rev()],
83-
js: [ngAnnotate({single_quotes: true}), uglify(), rev()],
84-
bower: [uglify(), rev()]
89+
js: [ngAnnotate({single_quotes: true}), uglify(), rev()]
8590
}))
8691
.pipe(htmlify({
8792
customPrefixes: ['my-']
8893
}))
89-
.pipe(minifyHtml())
94+
// .pipe(minifyHtml())
9095
.pipe(size())
9196
.pipe(gulp.dest('dist/'));
9297
});

index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
<div id="toast-container"></div>
3434

35-
<!-- build:bower bower.min.js-->
3635
<!-- Dependencies -->
3736
<script src="bower_components/chrome-platform-analytics/google-analytics-bundle.js"></script>
3837
<script src="bower_components/angular/angular.min.js"></script>
@@ -45,7 +44,6 @@
4544
<script src="bower_components/jquery/dist/jquery.min.js"></script>
4645
<script src="bower_components/materialize/dist/js/materialize.min.js"></script>
4746
<script src="bower_components/moment/min/moment.min.js"></script>
48-
<!-- endbuild -->
4947

5048
<!-- build:js cardboard.min.js-->
5149
<!-- inject:js -->

0 commit comments

Comments
 (0)