Skip to content
Browse files

0.0.4

  • Loading branch information...
1 parent 434b98c commit f42eec3965273612cf1065c05f8d361f17f30ea2 @weepy committed
Showing with 11 additions and 5 deletions.
  1. +5 −0 History.md
  2. +5 −4 lib/brequire.js
  3. +1 −1 package.json
View
5 History.md
@@ -1,3 +1,8 @@
+0.0.4
+=====
+
+ * directories are not source files
+
0.0.3 / 2010-11-03
==================
View
9 lib/brequire.js
@@ -47,13 +47,13 @@ compile.prototype._files = function() {
files = files.concat(x)
}
-
+ var ret = []
for(var i=0; i<files.length;i++) {
- // if(files[i][files[i].length-1] != "/") files[i] += "/"
- files[i] = files[i].replace(this.root + "/", "")
+ if(!fs.statSync(files[i]).isFile()) continue
+ ret.push(files[i].replace(this.root + "/", ""))
}
- return files
+ return ret
}
function join() {
@@ -100,6 +100,7 @@ compile.prototype.write = function(path) {
for(var i =0; i< files.length; i++) {
var module = join(this._module_base, files[i]) //.replace(/\.js$/,"") // leave off the ending .js
+ // console.log(join(this.root, files[i]))
var txt = fs.readFileSync(join(this.root, files[i])).toString()
if(files[i].match(/\.k$/)) {
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "brequire",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "Use CommonJS (require, exports) functionality in the browser",
"author": "weepy",
"licenses": [{

0 comments on commit f42eec3

Please sign in to comment.
Something went wrong with that request. Please try again.