Skip to content

Commit

Permalink
Merge pull request #624 from sethkinast/dustc-windows
Browse files Browse the repository at this point in the history
dustc always creates templates with forward slashes
  • Loading branch information
prashn64 committed Apr 14, 2015
2 parents 98dda84 + 9403c79 commit 82dee90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/dustc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ function handle() {
templateName = path.relative(cli.options.pwd, templateName);
}

// Windows creates template names with \ so normalize to / to allow AMD loaders
// to correctly load templates, and so you don't have to write templates differently
// depending on what OS you use
templateName = templateName.replace(/\\/g, '/');

compiledData = compile(data, templateName);
output(compiledData, outputFile);
});
Expand Down

0 comments on commit 82dee90

Please sign in to comment.