This solves the unintuitive problem of npm scripts. A user follows
instructions for writing a "test" script, and everything seems to work.
Then he writes another script, and it doesn't, and he wonders why. He takes
time away from getting actual work done to lookup why his script won't run.
Surprise, you have to type a bunch more characters in order to access
custom scripts.

This workflow might have made sense if custom scripts were placed inside a
"run-script" key, but they're not, and the distinction between writing a
"test" script and another script is needlessly conceptually separated. Make
doesn't require "run-script" to execute a task, why should npm?

npm is converging towards dependent tasks, where such distinctions do not
make sense. npm is more than just a package manager, it's a build tool,
let's embrace this.
On Apr 23, 2013 4:29 PM, "Luke Arduini" <[email protected]> wrote:

> I don't think this is a good idea. It doesn't solve any actual problem and
> potentially creates problems for package maintainers in the future.
>
>
> On Tue, Apr 23, 2013 at 3:40 PM, greelgorke <[email protected]> wrote:
>
>> a simple alias npmr npm run-script ?
>>
>> Am Dienstag, 23. April 2013 19:22:14 UTC+2 schrieb Kevin Swiber:
>>
>>>
>>>
>>> On Apr 23, 2013, at 1:13 PM, Andrew Pennebaker <[email protected]>
>>> wrote:
>>>
>>> > It would be nice to not have to type "run-script" to refer to custom
>>> scripts. Some package managers like leiningen expose custom scripts without
>>> any fuss ("lein cust"). Could we do the same with NPM ("npm cust")?
>>> >
>>> > Yes, security may be a concern, for package.json files that attempt to
>>> overwrite NPM built-ins like "install", "update", "help", etc. We have
>>> several options for handling collisions. My solution is for NPM to strip
>>> out scripts that would overwrite these built-ins, and print a warning along
>>> the lines of:
>>> >
>>> > "WARN: package.json attempted to overwrite npm built-in script
>>> "install". Ignoring custom script..."
>>> >
>>> > Just an idea.
>>>
>>> Note that `npm run` is an alias for `npm run-script`.  That should
>>> reduce the pain by 70%.  :)
>>>
>>> --
>>> Kevin Swiber
>>> @kevinswiber
>>> https://github.com/kevinswiber
>>>
>>>  --
>> --
>> 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 a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/b1Yyh0jkzgw/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, 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