Skip to content

Commit de3b087

Browse files
author
benholloway
committed
added the ability to require() html templates
1 parent ccd44de commit de3b087

File tree

3 files changed

+175
-33
lines changed

3 files changed

+175
-33
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
});

0 commit comments

Comments
 (0)