amd-wrapper
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -153,6 +153,7 @@ /** | ||
function transformToAMD(code, options) { | ||
if (!/^\s*define\s*\(\s*/.test(code)) { | ||
// remove comment | ||
var tmp = code.replace(/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, ''); | ||
if (!/^\s*define\s*\(\s*/.test(tmp)) { | ||
if (options && options.checkUMD) { | ||
// remove comment | ||
var tmp = code.replace(/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, ''); | ||
// check whether has umd definition | ||
@@ -159,0 +160,0 @@ if (/\Wdefine\s*\(/.test(tmp) |
{ | ||
"name": "amd-wrapper", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "The AMD wrapper for CommonJS files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
8783