Skip to content

Commit

Permalink
Verbose comments added, build cleanups to strip comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdbarr committed Sep 13, 2018
1 parent 69b2856 commit 71cd1ad
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 48 deletions.
4 changes: 4 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ const stringReplacer = function(match, p1) {
return p1;
};

// Strip development code and comments
substitutedHTML = substitutedHTML.replace(/\s*\/\/ IFDEF DEV[^]+?\/\/ ENDIF\s*/g, '');
substitutedHTML = substitutedHTML.replace(/\s+\/\/.*?\n/g, '\n');

// Replace strings
substitutedHTML = substitutedHTML.replace(/(`[^`]*?`)/g, stringReplacer);
substitutedHTML = substitutedHTML.replace(/('[^']*?')/g, stringReplacer);
//substitutedHTML = substitutedHTML.replace(/("[^"]*?")/g, stringReplacer);
Expand Down
Loading

0 comments on commit 71cd1ad

Please sign in to comment.