Skip to content

Commit

Permalink
plottable.d.ts fix in gruntfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Lewis committed Oct 4, 2015
1 parent c35fea5 commit e0f25c6
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 159 deletions.
16 changes: 9 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ module.exports = function(grunt) {
prereleaseName: "rc"
}
};

var prefixMatch = "\\n *(function |var |static )?";


var regexLF = (grunt.util.linefeed == "\r\n" ? "(\\u000D\\n)" : "\\n");
var prefixMatch = "\\n *(function |var |static )?".replace("\\n",regexLF);
var varNameMatch = "[^(:;]*(\\([^)]*\\))?"; // catch function args too
var nestedBraceMatch = ": \\{[^{}]*\\}";
var typeNameMatch = ": [^;]*";
var finalMatch = "((" + nestedBraceMatch + ")|(" + typeNameMatch + "))?\\n?;";
var jsdocInit = "\\n *\\/\\*\\* *\\n";
var jsdocMid = "( *\\*[^\\n]*\\n)+";
var finalMatch = "((" + nestedBraceMatch + ")|(" + typeNameMatch + "))?\\n?;".replace("\\n", regexLF);
var jsdocInit = "\\n *\\/\\*\\* *\\n".replace("\\n", regexLF);
var jsdocMid = "( *\\*[^\\n]*\\n)+".replace("\\n", regexLF);
var jsdocEnd = " *\\*\\/ *";
var jsdoc = "(" + jsdocInit + jsdocMid + jsdocEnd + ")?";

Expand Down Expand Up @@ -92,7 +94,7 @@ module.exports = function(grunt) {
// on each recompile
var updateTsFiles = function() {
tsFiles = grunt.file.read("src/reference.ts")
.split("\n")
.split(grunt.util.linefeed)
.filter(function(s) {
return s !== "";
}).map(function(s) {
Expand All @@ -104,7 +106,7 @@ module.exports = function(grunt) {
var testTsFiles;
var updateTestTsFiles = function() {
testTsFiles = grunt.file.read("test/testReference.ts")
.split("\n")
.split(grunt.util.linefeed)
.filter(function(s) {
return s !== "";
}).map(function(s) {
Expand Down
Loading

0 comments on commit e0f25c6

Please sign in to comment.