browserify
Advanced tools
Comparing version 0.1.1 to 0.1.2
22
index.js
@@ -44,5 +44,7 @@ var fs = require('fs'); | ||
+ wrapperBody | ||
.replace('$body', | ||
fs.readFileSync(__dirname + '/builtins/events.js', 'utf8') | ||
) | ||
.replace('$body', function () { | ||
return fs.readFileSync( | ||
__dirname + '/builtins/events.js', 'utf8' | ||
) | ||
}) | ||
.replace(/\$filename/g, '"events"') | ||
@@ -91,4 +93,6 @@ + (req.length ? exports.wrap(req).source : '') | ||
source : wrapperBody | ||
.replace('$body', body) | ||
.replace(/\$filename/g, JSON.stringify(libname)) | ||
.replace('$body', function () { return body }) | ||
.replace(/\$filename/g, function () { | ||
return JSON.stringify(libname) | ||
}) | ||
, | ||
@@ -109,4 +113,8 @@ }; | ||
return wrapperBody | ||
.replace('$body', mods[name]) | ||
.replace(/\$filename/g, JSON.stringify(name)) | ||
.replace('$body', function () { | ||
return mods[name].toString() | ||
}) | ||
.replace(/\$filename/g, function () { | ||
return JSON.stringify(name) | ||
}) | ||
; | ||
@@ -113,0 +121,0 @@ }) |
{ | ||
"name" : "browserify", | ||
"version" : "0.1.1", | ||
"version" : "0.1.2", | ||
"description" : "Browser-side require() for js directories and npm modules", | ||
@@ -17,2 +17,3 @@ "main" : "./index.js", | ||
"middleware", | ||
"bundle", | ||
"npm" | ||
@@ -28,3 +29,4 @@ ], | ||
"expresso" : ">=0.6.0", | ||
"seq" : ">=0.1.8" | ||
"seq" : ">=0.1.8", | ||
"backbone" : ">=0.3.3" | ||
}, | ||
@@ -31,0 +33,0 @@ "author" : { |
@@ -6,3 +6,3 @@ var assert = require('assert'); | ||
exports.browserSeq = function () { | ||
exports.seq = function () { | ||
var port = 10000 + Math.floor(Math.random() * (Math.pow(2,16) - 10000)); | ||
@@ -9,0 +9,0 @@ var server = connect.createServer(); |
@@ -6,2 +6,3 @@ function require (path) { | ||
|| require.modules[path + '.js'] | ||
|| require.modules[path + '/index'] | ||
|| require.modules[path + '/index.js'] | ||
@@ -8,0 +9,0 @@ ; |
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
25687
31
554
3