Closed badslug closed 12 years ago
Agreed. This is definitely on my radar screen.
awesome, can't wait. + 1
@IainShigeoka - suppose I include a smart.json
file in my Github repo. How does Atmosphere "know" where the Meteor package files are in my Github repo? Does it search the repo for a package.js
file?
For example, the meteor-validation package has a package.js
file in lib/validation
, not in the root directory of the repository.
Hmm. I'm not sure. I've only created smart packages where the smart.json
and package.js
files are in the project root. @possibilities or @tmeasday would be the people who know... hopefully they'll see their mention and respond.
mrt expects smart.json to be in the repo root and searches the tree for a package.js to determine the smart package root. smart, eh? (;
@possibilities - smart, indeed. Thanks for the response!
@possibilities - What about using require()
within my package.js
file? Meteor "overrides" the require
function with its own, which prevents me from including my code.
Previously, I did something like var blade = require('../../packages/blade/node_modules/blade');
instead of simply var blade = require('blade');
since paths had to be relative to app/lib/packages.js
(since that's the file that evals the package.js file)
Now I have code like this...
try {
blade = require('blade')
}
catch(e) {
try {
//XXX super lame! we actually have to give paths relative to
// app/lib/packages.js, since that's who's evaling us.
// The next line is for the core Meteor-installed package
blade = require('../../packages/blade/node_modules/blade');
}
catch(e) {
//XXX super lame! The next line is for the Meteorite-installed package
blade = require(process.cwd() + "/.meteor/meteorite/packages/blade/node_modules/blade");
}
}
//-- end of horrible hack
Is there any way around this?!?!
It would be convenient to package and submit blade to the Atmosphere smart package repository
https://atmosphere.meteor.com
See the "WTF¿" tab, "Building a smart package" page for how. This would make including blade in Meteorite projects a single dependency line (like npm dependencies).