File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict' ;
22/*jslint node: true */
3-
3+ /*jslint esversion: 6*/
44//TODO(shuwen): split into multiple files
55//TODO(shuwen): replace path string concatenation with path.join
66
@@ -33,6 +33,7 @@ var conventionalChangelog = require('gulp-conventional-changelog');
3333var ghPages = require ( 'gulp-gh-pages' ) ;
3434var through = require ( 'through2' ) ;
3535var hogan = require ( 'hogan.js' ) ;
36+ var header = require ( 'gulp-header' ) ;
3637
3738var SRC = 'src/' ;
3839var BUILD = 'build/' ;
@@ -130,28 +131,19 @@ gulp.task('vulcanize:prod', function() {
130131 spare : true
131132 } ) )
132133 . pipe ( inlinemin ( ) )
134+ . pipe ( header ( `<!--\n${ fs . readFileSync ( 'BANNER.txt' ) . toString ( 'utf8' ) } \n-->` ) )
133135 . pipe ( gulp . dest ( BUILD ) ) ;
134136} ) ;
135137
136138gulp . task ( 'copy:prod' , [ 'vulcanize:prod' ] , function ( ) {
137- return gulp . src ( [ BUILD + '**/*.+(html|woff)' , '!' + BUILD + '/shared/**/*.html' , '!' + BUILD + '**/example.html' ] )
139+ return gulp . src ( [
140+ path . join ( BUILD , 'strand.html' ) ,
141+ path . join ( BUILD , '**/*.woff' )
142+ ] )
138143 . pipe ( changed ( DIST ) )
139- . pipe ( debug ( ) )
140144 . pipe ( gulp . dest ( DIST ) ) ;
141145} ) ;
142146
143- // gulp.task('minify:prod', function() {
144- // return gulp.src(BUILD+'strand.html')
145- // .pipe(debug())
146- // .pipe(htmlmin({
147- // quotes: true,
148- // empty: true,
149- // spare: true
150- // }))
151- // .pipe(inlinemin())
152- // .pipe(gulp.dest(DIST))
153- // });
154-
155147/** DOCS **/
156148gulp . task ( 'docs' , [ 'copy:docs' , 'sass:docs' , 'docs:templates' ] ) ;
157149
Original file line number Diff line number Diff line change 2626 "gulp-debug" : " ^2.1.2" ,
2727 "gulp-gh-pages" : " ^0.5.4" ,
2828 "gulp-git" : " ^1.7.0" ,
29+ "gulp-header" : " ^1.7.1" ,
2930 "gulp-inline-assets" : " ^0.1.1" ,
3031 "gulp-marked" : " ^1.0.0" ,
3132 "gulp-minify-html" : " ^1.0.5" ,
You can’t perform that action at this time.
0 commit comments