I am writing a new smart package which I have working using meteorite and a path link in the smart.json file.
However, I can't seem to get it working as a testable package like the built-in Meteor ones i.e. I want to be
able to cd into the package and run either meteor or mrt and get back test results in the browser.
so far I have tried setting up a package.js file:
Package.describe({
summary: "text comparison tools"
});
Package.on_use(function (api, where) {
where = where || ['client', 'server'];
api.use(['underscore'], where);
api.add_files([
'text-tools.js'
], where);
});
Package.on_test(function (api) {
api.use('text-tools', 'client');
api.use('tinytest');
api.add_files('text_tools_tests.js', 'client');
});
with a single dummy test in the test file and
simple do nothing code in text-tools.js
which didn't work and gave me an error about the 'text-tools' not being found.
Then I made a new folder using 'meteor create text-tools' with the same files replacing the ones created by meteor.
This now runs (using meteor) but then I get an error saying 'Package is not defined'.
Is there something obvious I am doing wrong? Should this all be inside the meteor source packages folder?
Joc