Skip to content

Commit

Permalink
Fix #19 - bug introduced by #16
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons committed May 6, 2013
1 parent 3f93bfe commit bad515b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ This will append the output file `dist/js/templates.js` to

## Changelog

### v0.3.4

- Attempt to fix a bug with `Path`, thanks to @cgross ([#19](https://github.com/ericclemmons/grunt-angular-templates/issues/19))

### v0.3.3

- Add `concat` option for automatically adding compiled template file to existing `concat` (or `usemin`-created) task, thanks to @cgross ([#17](https://github.com/ericclemmons/grunt-angular-templates/pull/17))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-angular-templates",
"description": "Grunt build task to concatenate & register your AngularJS templates in the $templateCache",
"version": "0.3.3",
"version": "0.3.4",
"homepage": "https://github.com/ericclemmons/grunt-angular-templates",
"author": {
"name": "Eric Clemmons",
Expand Down
2 changes: 1 addition & 1 deletion tasks/lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports.init = function(grunt) {

var concat = function(options, files, callback) {
grunt.util.async.concatSeries(files, function(file, next) {
var id = (options.prepend || '') + path.relative(options.base, file).replace( /\\/g, '/');
var id = (options.prepend || '') + path.relative(options.base || '.', file).replace( /\\/g, '/');
var template = '\n $templateCache.put("<%= id %>",\n "<%= content %>"\n );\n';
var cleaned = grunt.file.read(file).replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\r?\n/g, '" +\n "');
var cached = process(template, id, cleaned);
Expand Down

0 comments on commit bad515b

Please sign in to comment.