Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
A few small requests for npm users...
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Isaac Schlueter  
View profile  
 More options Oct 28 2010, 3:19 pm
From: Isaac Schlueter <i...@izs.me>
Date: Thu, 28 Oct 2010 12:19:33 -0700
Local: Thurs, Oct 28 2010 3:19 pm
Subject: A few small requests for npm users...
If you put a package.json file in your project (which is a great way
to automatically link in your deps with npm, even if you don't plan on
publishing it for others to use), and you should do the following:

1. If it's a website or something, provide a "start" command.

Your package.json file could be something like this:

{ "name" : "my-blog"
, "version" : "1.2.3"
, "dependencies" : { "express" : "*" }
, "scripts" : { "start" : "node my-blog.js" }

}

There are also "stop" and "restart" commands that you can put in
there, if they make sense.  These aren't terribly useful at the
moment, since npm doesn't handle pid management and such, but it
provides a consistent hook that can be leveraged automatically in the
future.

2. Regardless of what it is, but especially if it's a library or util
designed for others to use, provide a test command:

{ "name" : "my-tdd-app"
, "version" : "1.2.3"
, "scripts" : { "test" : "make test" }

}

To run the test script, "npm test my-tdd-app".

3. If there are dependencies that are *only* required for testing or
other development scenarios, then list them as "devDependencies",
rather than "dependencies".

{ "name" : "my-express-app"
, "version" : "1.2.3"
, "dependencies" : { "express" : "*" }
, "devDependencies" : { "expresso" : "*"}
, "scripts" : { "test" : "expresso blah blah" }

}

To install the dev dependencies, you can either set the `dev` config
to true, or do `npm install whatever --dev`, or just do `npm link` in
your project dir, and it'll pull in the dev dependencies as well as
the "normal" dependencies.

Some of these things aren't yet very useful, but they're going to be
awesome in the near-ish future, so you should start adding them to
your package now.

--i


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Felix Geisendörfer  
View profile  
 More options Oct 28 2010, 3:36 pm
From: Felix Geisendörfer <fe...@debuggable.com>
Date: Thu, 28 Oct 2010 12:36:09 -0700 (PDT)
Local: Thurs, Oct 28 2010 3:36 pm
Subject: Re: A few small requests for npm users...

> 2. Regardless of what it is, but especially if it's a library or util
> designed for others to use, provide a test command:

Just updated node-mysql. One question about testing so:

Are you planning to execute these tests when installing a package in
the future? If so, it would probably be wise to only run tests that
are independent of environment (think database credentials), right?

--fg

On Oct 28, 9:19 pm, Isaac Schlueter <i...@izs.me> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Gahl  
View profile  
 More options Oct 28 2010, 3:38 pm
From: Ryan Gahl <ryan.g...@gmail.com>
Date: Thu, 28 Oct 2010 14:38:33 -0500
Local: Thurs, Oct 28 2010 3:38 pm
Subject: Re: [nodejs] A few small requests for npm users...

Holy crap npm is getting all kinds of win and awesome added it to it!

When the day finally arrives for us to package something, you can bet we'll
be adding all the sugar.

I know you know it, but saying it anyway... you rock.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Gahl  
View profile  
 More options Oct 28 2010, 3:42 pm
From: Ryan Gahl <ryan.g...@gmail.com>
Date: Thu, 28 Oct 2010 14:42:09 -0500
Local: Thurs, Oct 28 2010 3:42 pm
Subject: Re: [nodejs] A few small requests for npm users...

Wasn't there a nifty site (or github Pages site) for npm once, with a groovy
ASCII-lookin logo? and more docs?

Or was that just in a dream I had?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ryan Gahl  
View profile  
 More options Oct 28 2010, 3:43 pm
From: Ryan Gahl <ryan.g...@gmail.com>
Date: Thu, 28 Oct 2010 14:43:20 -0500
Local: Thurs, Oct 28 2010 3:43 pm
Subject: Re: [nodejs] A few small requests for npm users...

Nevermind on the "more docs" thing... found plenty.  :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Rajlich  
View profile  
 More options Oct 28 2010, 4:02 pm
From: Nathan Rajlich <nat...@tootallnate.net>
Date: Thu, 28 Oct 2010 13:02:05 -0700
Local: Thurs, Oct 28 2010 4:02 pm
Subject: Re: [nodejs] A few small requests for npm users...

@Ryan http://npmjs.org/

<http://npmjs.org/>@isaacs is devDependencies new? That's a feature I've
been wanting!!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Isaac Schlueter  
View profile  
 More options Oct 28 2010, 4:13 pm
From: Isaac Schlueter <i...@izs.me>
Date: Thu, 28 Oct 2010 13:13:41 -0700
Local: Thurs, Oct 28 2010 4:13 pm
Subject: Re: [nodejs] Re: A few small requests for npm users...
2010/10/28 Felix Geisendörfer <fe...@debuggable.com>:

> Are you planning to execute these tests when installing a package in
> the future?

I'm not going to execute tests on install, no.  In fact, I'm not
entirely sure exactly what it's going to look like long-term, but in
my foggy imaginings of the future, I see a CI system where brave
volunteers can install and test packages, and automatically upload
their results.  Then, we can gather information about package
stability and worth, and have some heuristics that can help people
decide which piece of software is best for their needs.

The "test" script will be a bit part of making all that work.  It will
probably not be until well after a 1.0.0 release, I'm sure.

On Thu, Oct 28, 2010 at 13:02, Nathan Rajlich <nat...@tootallnate.net> wrote:
> is devDependencies new? That's a feature I've been wanting!!

No, it's been sitting quietly in `npm help json` for a while now.

--i


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »