Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"grunt": "~0.3.10",
"handlebars": "1.0.5beta"
"handlebars": "1.0.7"
},
"devDependencies": {
"mocha": "~1.2.1",
Expand Down
12 changes: 10 additions & 2 deletions tasks/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,24 @@ module.exports = function(grunt) {
if (process.platform == "win32") {
// win32 cmd doesn't know what "&&" is and is also not able to use wildcards
// anyway this will match all the files in the template dir anyway.
finalCmd = __dirname + '/../node_modules/.bin/handlebars -m ' + templateDir + '/ -f ' + this.file.dest;
finalCmd = '"'+__dirname + '/../node_modules/.bin/handlebars" -m ' + templateDir + '/ -f ' + this.file.dest;
} else {
// others platform, set to the default command
finalCmd = truncateFileCmd +' && '+ handlebarsCmd;
}
// Check if we want to build it AMD style
var amdSuffix='';
if ("undefined" !== typeof this.data.amd && this.data.amd) {
amdSuffix=' -a';
}

// Update finalCmd
finalCmd += amdSuffix;

exec(finalCmd, function(err, stdout, stderr) {
if (err) {
grunt.fail.fatal(stderr);
}
}
done();
});
});
Expand Down
1 change: 1 addition & 0 deletions test/grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function(grunt) {
all: {
src: 'fixtures',
dest: 'fixtures/output/templates.js'
//amd:true
}
}
});
Expand Down