1
0
Fork 0

Using __dirname for modules rather than relative path

closure/master
Mike Gerwitz 2011-03-27 02:02:04 -04:00
parent 34ccb8f530
commit 87e7872f61
6 changed files with 13 additions and 13 deletions

View File

@ -22,10 +22,10 @@
* @package core * @package core
*/ */
var util = require( './util' ), var util = require( __dirname + '/util' ),
class_builder = require( './class_builder' ), class_builder = require( __dirname + '/class_builder' ),
member_builder = require( './member_builder' ), member_builder = require( __dirname + '/member_builder' ),
propobj = require( './propobj' ) propobj = require( __dirname + '/propobj' )
; ;

View File

@ -22,8 +22,8 @@
* @package core * @package core
*/ */
var util = require( './util' ), var util = require( __dirname + '/util' ),
member_builder = require( './member_builder' ) member_builder = require( __dirname + '/member_builder' )
; ;

View File

@ -22,9 +22,9 @@
* @package core * @package core
*/ */
var util = require( './util' ), var util = require( __dirname + '/util' ),
member_builder = require( './member_builder' ), member_builder = require( __dirname + '/member_builder' ),
Class = require( './class' ); Class = require( __dirname + '/class' );
/** /**

View File

@ -22,7 +22,7 @@
* @package core * @package core
*/ */
var util = require( './util' ), var util = require( __dirname + '/util' ),
// whether or not we support defining properties through // whether or not we support defining properties through
// Object.defineProperty() // Object.defineProperty()

View File

@ -22,7 +22,7 @@
* @package core * @package core
*/ */
var propParseKeywords = require( './prop_parser' ).parseKeywords; var propParseKeywords = require( __dirname + '/prop_parser' ).parseKeywords;
/** /**

View File

@ -85,14 +85,14 @@ for module in $CAT_MODULES; do
# each module must be enclosed in a closure to emulate a module # each module must be enclosed in a closure to emulate a module
echo "/** $module **/" echo "/** $module **/"
echo "( function( module )" echo "( function( module, __dirname )"
echo "{" echo "{"
echo " var exports = module.exports = {};" echo " var exports = module.exports = {};"
# add the module, removing trailing commas # add the module, removing trailing commas
cat $filename | $RMTRAIL cat $filename | $RMTRAIL
echo "} )( module['$module'] = {} );" echo "} )( module['$module'] = {}, '.' );"
done done
# include tests? # include tests?