Hi!

In my module samples, I presume the module is not installed, and then, in
your case, I would use:

tal = require('..'); // it use the package.json of your root project folder

The same for any tests.

Example:
https://github.com/ajlopez/SimpleMessages/blob/master/samples/Broadcast/server.js
https://github.com/ajlopez/SimpleMessages<https://github.com/ajlopez/SimpleMessages/blob/master/samples/Broadcast/server.js>

To publish the package, make an account at npm (I can't remember the
process). Then you can install user/pwd in any machine. Then

npm publish

from your package.json folder

Angel "Java" Lopez
@ajlopez



On Wed, Jul 10, 2013 at 6:20 AM, Jean-Michel Hiver <[email protected]> wrote:

> Hummm looks like I'm getting stuck on something silly... now my
> package.json passes and 'npm install' doesn't barf when I run it. I have
> the following file structure so far:
>
> ./examples/synopsis.js
> ./lib/template-tal.js
> ./package.json
> ./README.md
>
> However the following statement in my synopsis.js file:
>
>     tal = require ('template-tal');
>
> Throws the following error:
>
> Error: Cannot find module 'template-tal'
>
> What am I missing here?
>
> Thanks in advance for your help.
>
>
>
> Le mercredi 10 juillet 2013 12:59:57 UTC+4, Jean-Michel Hiver a écrit :
>
>> Hello
>>
>> Thanks for this feedback, I'll be working on it!
>>
>> Cheers
>> JM
>>
>> Le mercredi 10 juillet 2013 12:20:03 UTC+4, Floby a écrit :
>>>
>>> You're right you need tests.
>>> I personnally like nodeunit, but people like tape or mocha or vows.
>>> You'll see it's pretty simple to understand. The only trick is again the
>>> async nature of node.
>>> I tried your module and found this
>>>
>>>    - Your module doesn't install. `npm install` errors when parsing
>>>    JSON. after a quick inspection, you're using trailing commas where they
>>>    shouldn't be in package.json.
>>>    - the "directories" entry in package.json is deprecated IIRC
>>>    - There should be an example directory that I could run directly
>>>    using `node examples/example.js`
>>>    - The example in the synopsis doesn't work =) error when loading the
>>>    module
>>>    - Its because the "main" entry in the package.json is wrong.
>>>    - After fixing package.json, I get an error while running it.
>>>
>>> This is as far as I went trying out your module =)
>>> When you've fixed these issues, you should be able to publish it to npm
>>> using `npm publish` from your project's directory.
>>>
>>> On Tuesday, 9 July 2013 17:11:22 UTC+2, Jean-Michel Hiver wrote:
>>>>
>>>> Hi List,
>>>>
>>>> If a few charitable and experience eyeballs could take a look at my
>>>> first node module: 
>>>> https://github.com/**jhiver/template-tal<https://github.com/jhiver/template-tal>
>>>>
>>>> template-tal is a shot at implementing the ZPT / Page Template TAL XML
>>>> template specification. It is a port of Petal::Tiny, a Perl module which I
>>>> also wrote.
>>>>
>>>> For those who wouldn't know, TAL is a pretty neat way of producing
>>>> XML/XHTML while keeping a pretty strict separation from code and
>>>> presentation.
>>>>
>>>> I don't really know what to do to make my module appear in the npm
>>>> repository, and wouldn't have a clue on where to start for a proper unit
>>>> testing framework (because when I get bug reports in, I'd want to write a
>>>> test for it).
>>>>
>>>> Your advice is appreciated.
>>>>
>>>> Cheers
>>>> JM
>>>>
>>>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to