[nodejs] Continue with package installation if node-gyp fails

2014-07-11 Thread Pascal Mathis
Hello everyone

I am currently trying to offer an *optional native library* for my own 
Node.js package. My library actually works 6+ (up to 20, didn't test 
further) times faster than with the plain JS implementation. The drawback: 
It requires libcrypto++-dev, otherwise the build will fail. Also, it will 
not work on Windows operating systems. What I am trying to do is to make 
the node-gyp build process optional, so that npm would continue with 
installing the package, even if node-gyp fails. Is there any way to do 
that? I've already looked through various example gyp-files and stumbled 
upon some documentations, but was not able to find a solution.

Thanks in advance for your answer and have a nice evening!

Best regards
Pascal

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/13272d96-7d7e-4432-91a2-ded5eaffbe98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Continue with package installation if node-gyp fails

2014-07-11 Thread Elijah Insua
https://www.npmjs.org/doc/package.json.html#optionalDependencies


On Fri, Jul 11, 2014 at 11:55 AM, Pascal Mathis 
wrote:

> Hello everyone
>
> I am currently trying to offer an *optional native library* for my own
> Node.js package. My library actually works 6+ (up to 20, didn't test
> further) times faster than with the plain JS implementation. The drawback:
> It requires libcrypto++-dev, otherwise the build will fail. Also, it will
> not work on Windows operating systems. What I am trying to do is to make
> the node-gyp build process optional, so that npm would continue with
> installing the package, even if node-gyp fails. Is there any way to do
> that? I've already looked through various example gyp-files and stumbled
> upon some documentations, but was not able to find a solution.
>
> Thanks in advance for your answer and have a nice evening!
>
> Best regards
> Pascal
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/13272d96-7d7e-4432-91a2-ded5eaffbe98%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CALKLjxpicOdBMi%3Dd0jgMsnDADF4bT2enQdX_VVT7QHK6RkCVPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Continue with package installation if node-gyp fails

2014-07-13 Thread Pascal Mathis
Thanks for your answer, Elijah. I know that already, but I would rather 
prefer to -not- split my native library into a new package. It is just a 
single .cpp & binding.gyp file and I don't like the idea of having 2 
separate repositories. Thats why I was looking for any sort of option which 
would tell npm: "Hey, node-gyp failed, it doesn't matter, the package is 
still fine." Is there anything like that?

Am Samstag, 12. Juli 2014 06:03:56 UTC+2 schrieb Elijah Insua:
>
> https://www.npmjs.org/doc/package.json.html#optionalDependencies
>
>
> On Fri, Jul 11, 2014 at 11:55 AM, Pascal Mathis  > wrote:
>
>> Hello everyone
>>
>> I am currently trying to offer an *optional native library* for my own 
>> Node.js package. My library actually works 6+ (up to 20, didn't test 
>> further) times faster than with the plain JS implementation. The drawback: 
>> It requires libcrypto++-dev, otherwise the build will fail. Also, it will 
>> not work on Windows operating systems. What I am trying to do is to make 
>> the node-gyp build process optional, so that npm would continue with 
>> installing the package, even if node-gyp fails. Is there any way to do 
>> that? I've already looked through various example gyp-files and stumbled 
>> upon some documentations, but was not able to find a solution.
>>
>> Thanks in advance for your answer and have a nice evening!
>>
>> Best regards
>> Pascal
>>
>> -- 
>> Job board: http://jobs.nodejs.org/
>> New group rules: 
>> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
>> Old group rules: 
>> 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 unsubscribe from this group and stop receiving emails from it, send an 
>> email to nodejs+un...@googlegroups.com .
>> To post to this group, send email to nod...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nodejs/13272d96-7d7e-4432-91a2-ded5eaffbe98%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/af30ce5a-2131-4a3e-b81c-29d4cf2f1e7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Continue with package installation if node-gyp fails

2014-07-13 Thread Ryan Graham
I think you're looking for something like this:

"install": "node-gyp rebuild || exit 0"

Putting that in the scripts section of your module's package.json will
prevent the installation of the module from failing just because node-gyp
fails.

~Ryan
https://twitter.com/rmgraham
On Jul 11, 2014 8:49 PM, "Pascal Mathis"  wrote:

> Hello everyone
>
> I am currently trying to offer an *optional native library* for my own
> Node.js package. My library actually works 6+ (up to 20, didn't test
> further) times faster than with the plain JS implementation. The drawback:
> It requires libcrypto++-dev, otherwise the build will fail. Also, it will
> not work on Windows operating systems. What I am trying to do is to make
> the node-gyp build process optional, so that npm would continue with
> installing the package, even if node-gyp fails. Is there any way to do
> that? I've already looked through various example gyp-files and stumbled
> upon some documentations, but was not able to find a solution.
>
> Thanks in advance for your answer and have a nice evening!
>
> Best regards
> Pascal
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/13272d96-7d7e-4432-91a2-ded5eaffbe98%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAGjmZGwzBE7GZQTv3LBK4HMokf05ydZQayrn_sWtUKbp%3D%2B_ceg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.