Let's switch from import back to require, to simplify future Node support
This commit is contained in:
parent
28f47a3424
commit
5e2073f3ac
37 changed files with 179 additions and 166 deletions
|
|
@ -92,6 +92,8 @@ gulp.task('mktmp', function() {
|
|||
.pipe(header('/**\n * @copyright ' + file.path.replace(/.*\/(modules\/.*)/, "http://pcjs.org/$1") + ' (C) Jeff Parsons 2012-2016\n */\n\n'))
|
||||
.pipe(replace(/(^|\n)[ \t]*(['"])use strict\2;?/g, ""))
|
||||
.pipe(replace(/^(import|export)[ \t]+[^\n]*\n/gm, ""))
|
||||
.pipe(replace(/^[ \t]*var\s+\S+\s+=\s+require\((['"]).*?\1\);/gm, ""))
|
||||
.pipe(replace(/^[ \t]*(if\s+\(NODE\)\s*|)module\.exports\s+=\s+\S+;/gm, ""))
|
||||
.pipe(replace(/\/\*\*\s*\*\s*@fileoverview[\s\S]*?\*\/\s*/g, ""))
|
||||
.pipe(replace(/[ \t]*if\s*\(NODE\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
||||
.pipe(replace(/[ \t]*if\s*\(typeof\s+module\s*!==\s*(['"])undefined\1\)\s*(\{[^}]*}|[^\n]*)(\n|$)/gm, ""))
|
||||
|
|
|
|||
Loading…
Reference in a new issue