Skip to content

Commit

Permalink
Added regex comments to rollup.config
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 24, 2017
1 parent d124fd4 commit 86424d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ function glsl() {

var transformedCode = 'export default ' + JSON.stringify(
code
.replace( /[ \t]*\/\/.*\n/g, '' )
.replace( /[ \t]*\/\*[\s\S]*?\*\//g, '' )
.replace( /\n{2,}/g, '\n' )
.replace( /[ \t]*\/\/.*\n/g, '' ) // remove //
.replace( /[ \t]*\/\*[\s\S]*?\*\//g, '' ) // remove /* */
.replace( /\n{2,}/g, '\n' ) // # \n+ to \n
) + ';';
return {
code: transformedCode,
Expand Down

0 comments on commit 86424d9

Please sign in to comment.