From b306d40bf141aa2e27977d90bbb3f82a3cd58cfb Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Sun, 14 Mar 2010 13:48:58 -0700 Subject: [PATCH] we don't need relative requires for the language --- lib/lexer.js | 4 ++-- lib/rewriter.js | 2 +- src/lexer.coffee | 4 ++-- src/rewriter.coffee | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/lexer.js b/lib/lexer.js index beda598b..3e64a712 100644 --- a/lib/lexer.js +++ b/lib/lexer.js @@ -8,8 +8,8 @@ // Which is a format that can be fed directly into [Jison](http://github.com/zaach/jison). // Set up the Lexer for both Node.js and the browser, depending on where we are. if ((typeof process !== "undefined" && process !== null)) { - Rewriter = require('./rewriter').Rewriter; - process.mixin(require('./helpers')); + Rewriter = require('rewriter').Rewriter; + process.mixin(require('helpers')); } else { this.exports = this; Rewriter = this.Rewriter; diff --git a/lib/rewriter.js b/lib/rewriter.js index 98f5b5f1..ca0a8c32 100644 --- a/lib/rewriter.js +++ b/lib/rewriter.js @@ -9,7 +9,7 @@ // add implicit indentation and parentheses, balance incorrect nestings, and // generally clean things up. // Set up exported variables for both Node.js and the browser. - (typeof process !== "undefined" && process !== null) ? process.mixin(require('./helpers')) : (this.exports = this); + (typeof process !== "undefined" && process !== null) ? process.mixin(require('helpers')) : (this.exports = this); // The **Rewriter** class is used by the [Lexer](lexer.html), directly against // its internal array of tokens. exports.Rewriter = (function() { diff --git a/src/lexer.coffee b/src/lexer.coffee index 27c081e4..ea4b9063 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -9,8 +9,8 @@ # Set up the Lexer for both Node.js and the browser, depending on where we are. if process? - Rewriter: require('./rewriter').Rewriter - process.mixin require './helpers' + Rewriter: require('rewriter').Rewriter + process.mixin require 'helpers' else this.exports: this Rewriter: this.Rewriter diff --git a/src/rewriter.coffee b/src/rewriter.coffee index 065ab5cf..e11093ad 100644 --- a/src/rewriter.coffee +++ b/src/rewriter.coffee @@ -8,7 +8,7 @@ # Set up exported variables for both Node.js and the browser. if process? - process.mixin require './helpers' + process.mixin require 'helpers' else this.exports: this