Comparing version 6.1.1 to 6.2.1
@@ -9,8 +9,9 @@ var glslifyBundle = require('glslify-bundle') | ||
module.exports = function(arg, opts) { | ||
var isShaderString = /(void\s+main\s?\(.*\)|\n)/.test(arg) | ||
if (Array.isArray(arg)) { // template string | ||
return iface().tag.apply(null, arguments) | ||
} else if (typeof arg === 'string' && !/\n/.test(arg) && opts && opts._flags) { | ||
} else if (typeof arg === 'string' && !isShaderString && opts && opts._flags) { | ||
// browserify transform | ||
return require('./transform.js').apply(this, arguments) | ||
} else if (typeof arg === 'string' && /\n/.test(arg)) { // source string | ||
} else if (typeof arg === 'string' && isShaderString) { // source string | ||
return iface().compile(arg, opts) | ||
@@ -17,0 +18,0 @@ } else if (typeof arg === 'string') { // source file |
{ | ||
"name": "glslify", | ||
"version": "6.1.1", | ||
"version": "6.2.1", | ||
"description": "A node.js-style module system for GLSL!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -141,3 +141,3 @@ var falafel = require('falafel') | ||
var d = createDeps(extend({ cwd: mdir }, mopts)) | ||
if (/\n/.test(marg)) { // source string | ||
if (/(void\s+main\s?\(.*\)|\n)/.test(marg)) { // source string | ||
d.inline(marg, mdir, ondeps) | ||
@@ -144,0 +144,0 @@ } else gresolve(marg, { basedir: mdir }, function (err, res) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35027
424