Skip to content

Commit

Permalink
Migrated from package.js to index.js for easier requiring
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Feb 1, 2012
1 parent 87be12f commit fc736de
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"directories": {
"lib" : "."
},
"main": "./package.js",
"main": "./index.js",
"dependencies": {
"request": "2.9.100"
},
Expand Down
2 changes: 1 addition & 1 deletion src/yui/npm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</copy>

<copy file="../../package.json" tofile="${outdir}/package.json"/>
<copy file="./scripts/npm_package_shim.js" tofile="${outdir}/package.js"/>
<copy file="./scripts/npm_package_shim.js" tofile="${outdir}/index.js"/>

<echo level="info">Running Node.js package script</echo>
<exec executable="node" failonerror="true" searchpath="true" resolveexecutable="true">
Expand Down
8 changes: 4 additions & 4 deletions src/yui/scripts/npm_package.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ if (!path.existsSync(start)) {
process.chdir(start);

var makeIndex = function(mod, p) {
var o = '../package';
var o = '../index';
if (p) {
o = './package';
o = './index';
}
var str = 'var inst = require("' + o + '").getInstance();\n';
str += 'module.exports = inst.use("' + mod + '");\n';
return str;
};

var makeDebug = function(mod, p) {
var o = '../package';
var o = '../index';
if (p) {
o = './package';
o = './index';
}
var str = 'var inst = require("' + o + '").getInstance();\n';
str += 'inst.applyConfig({ debug: true, filter: "debug" });\n';
Expand Down

0 comments on commit fc736de

Please sign in to comment.