Get hawk authors to add something like this to package info:

"directories": {
    "doc": "./images", // those pictures surely are documentation, aren't 
they
    "example": "./example",
    "test": "./test", // this is not in spec, but why not extend it?
}

But it's a convention. You might assume that these directories can be 
safely deleted, but it's a good idea to check everything.

Anyway, it's hard to get people publish information you need. So it might 
be a good idea to create private registry and republish packages there by 
hand (removing unnecessary information and adding whatever you want).


On Friday, June 14, 2013 1:18:19 PM UTC+4, Tim Oxley wrote:
>
> Interesting.
>
> I'd like to have an explicit set of "stuff you can safely delete in 
> production" since cruft does always fall under the categories in the spec 
> (man/example/lib/bin/doc). 
>
> For example: https://github.com/hueniverse/hawk
>
> I'd want to delete:
> - images
> - example
> - tests
>
> and maybe
> Makefile
>
> What would the logic would look like to purge those folders using 
> package.json directories?
>
>
> On Friday, 14 June 2013 15:30:42 UTC+8, Alex Kocharin wrote:
>>
>>
>> I believe we can do that right now.
>>
>> package.json allows a "directories" object, see 
>> https://npmjs.org/doc/json.html#directories .
>>
>> So you could ask sqlite maintainers to add this object to their json and 
>> write a software/patch that does this.
>>
>>
>> On Thursday, June 13, 2013 8:21:42 PM UTC+4, Shane Holloway wrote:
>>>
>>> >>> npm packages contain too much garbage anyway. I'm talking about 
>>> optional dependencies. For example, AFAIR restify depend on a 5MB spdy 
>>> library even though very few people use spdy. So there's no point to try to 
>>> save diskspace I guess, 'cause nobody doing that anyway. 
>>> >> I'm deploying on a device that doesn't have much diskspace or network 
>>> bandwidth. 
>>> > 
>>> > Then you should be able to remove docs and tests somehow... Hm... yes, 
>>> I guess a command like `npm strip` to remove those can sometimes make 
>>> sense. 
>>>
>>> +1 to `npm strip` — it would be very useful for deploying packages like 
>>> sqlite where the sqlite3.c & .h are 5MB themselves. 
>>>
>>>         node_modules/sqlite3% du -hd1 
>>>         424K  ./benchmark 
>>>         8.6M  ./build 
>>>         8.9M  ./deps 
>>>         4.0K  ./examples 
>>>         908K  ./lib 
>>>         692K  ./node_modules 
>>>         92K   ./src 
>>>         444K  ./test 
>>>         20M   . 
>>>
>>> If you trim this by hand, you can get it down to around 940K by keeping 
>>> the lib directory and the supporting files in the root. (measured on OSX 
>>> 10.8, Node 0.10.9) 
>>>
>>> It would be incredibly useful if that knowledge could be captured once 
>>> by the developers/maintainers of the npm modules.
>>
>>

-- 
-- 
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