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