Skip to content

Commit b998878

Browse files
committed
Merge pull request #7 from bholloway/master
added the ability to require() html templates
2 parents 0d67eaf + de3b087 commit b998878

File tree

4 files changed

+177
-34
lines changed

4 files changed

+177
-34
lines changed

npm-shrinkwrap.json

Lines changed: 171 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"shelljs": "latest",
9090
"source-map": "latest",
9191
"stream-spigot": "latest",
92+
"stringify": "latest",
9293
"through-pipes": "latest",
9394
"through2": "latest"
9495
},

tasks/javascript.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var gulp = require('gulp'),
66
runSequence = require('run-sequence'),
77
combined = require('combined-stream'),
88
to5ify = require('6to5ify'),
9+
stringify = require('stringify'),
910
ngAnnotate = require('browserify-ngannotate');
1011

1112
var config = require('../lib/config/config'),
@@ -58,7 +59,7 @@ gulp.task('js:init', function () {
5859
// karma unit tests in local library only
5960
gulp.task('js:unit', function () {
6061
return streams.jsSpecStream()
61-
.pipe(bundler.compile(to5ify, bundler.jasmineTransform).all('karma-main.js'))
62+
.pipe(bundler.compile(stringify(['.html']), to5ify, ngAnnotate, bundler.jasmineTransform).all('karma-main.js'))
6263
.pipe(gulp.dest(streams.JS_BUILD))
6364
.pipe(karma({
6465
files : streams.testDependencyStream({dev: true}).list,
@@ -72,6 +73,6 @@ gulp.task('js:unit', function () {
7273
// give a single optimised js file in the build directory with source map for each
7374
gulp.task('js:build', function () {
7475
return streams.jsSrcStream({read: false})
75-
.pipe(bundler.compile(to5ify, ngAnnotate).each(config.isMinify))
76+
.pipe(bundler.compile(stringify(['.html']), to5ify, ngAnnotate).each(config.isMinify))
7677
.pipe(gulp.dest(streams.JS_BUILD));
7778
});

tasks/watch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var gulp = require('gulp'),
55
watchSequence = require('gulp-watch-sequence');
66

77
var config = require('../lib/config/config'),
8+
hr = require('../lib/util/hr'),
89
streams = require('../lib/config/streams');
910

1011
var CONSOLE_WIDTH = config.getConsoleWidth();
@@ -13,7 +14,7 @@ gulp.task('watch', ['server'], function () {
1314

1415
// enqueue actions to avoid multiple trigger
1516
var queue = watchSequence(500, function () {
16-
console.log(streams.hr('\u2591', CONSOLE_WIDTH));
17+
console.log(hr('\u2591', CONSOLE_WIDTH));
1718
});
1819

1920
// watch statements

0 commit comments

Comments
 (0)