Giter VIP home page Giter VIP logo

Comments (8)

huntc avatar huntc commented on August 11, 2024

Hey Greg. sbt-web presently provides a means of making WebJar based Node artifacts available to Trireme (a package.json inside a WebJar is all that is required). I'm going to extend this in order to support npm, in fact I'm going to try running npm within Trireme and make this functionality available from within sbt.

The bottom line here: the npm/Trireme functionality could be made available as a separate jar for use by Trireme if this is of interest. May be the availability of the library is all that is required to satisfy the requirement that you have. I shall keep you posted, but please share any further thinking that you may have on this.

from trireme.

gbrail avatar gbrail commented on August 11, 2024

Thanks for looking at this! There are actually two separate issues.

The first is to just make NPM work within trireme. With the latest release
it is much closer, and the code in master now gets us even closer. However,
NPM seems to use every tiny optional corner of both JavaScript and Node so
it still may not be totally working -- but getting it working is a great
compatibility test. There's actually a separate issue for that -- in
general, you should be able to just install the "npm" module from, well,
npm and use the API directly.

The other issue, and what's in here, is to extend our module support in
Trireme to treat JAR files inside NPM modules just like regular Node treats
binary code. So there'd be something in the package.json for a module that
asks Trireme to load a JAR, and if we find it, we classload it and register
anything in there that implements the "NodeModule" interface just like we
do for internal modules.

That way, we'd have a way to distribute Trireme-enabled modules in NPM in a
standard way.

Doing that would probably require forking module.js to call out to Trireme
-- right now, module.js is one of the modules that is just copied
identically from regular node.js.

On Sat, Feb 1, 2014 at 11:19 PM, Christopher Hunt
[email protected]:

Hey Greg. sbt-web presently provides a means of making WebJar based Node
artifacts available to Trireme (a package.json inside a WebJar is all that
is required). I'm going to extend this in order to support npm, in fact I'm
going to try running npm within Trireme and make this functionality
available from within sbt.

The bottom line here: the npm/Trireme functionality could be made
available as a separate jar for use by Trireme if this is of interest. May
be the availability of the library is all that is required to satisfy the
requirement that you have. I shall keep you posted, but please share any
further thinking that you may have on this.

Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-33894196
.

greg brail | apigee https://apigee.com/ | twitter
@gbrailhttp://twitter.com/gbrail

from trireme.

huntc avatar huntc commented on August 11, 2024

I'm travelling at the mo, but back in 24 hours. I think we can combine our efforts here, particularly with my involvement on WebJars. Would you mind connecting via Skype? I'm located in Bulli, nsw, Australia so I should be easy to find. 'Look forward to chatting.

from trireme.

gbrail avatar gbrail commented on August 11, 2024

Talking about this sounds great but I'm about to head off for a lot of
meetings the next few days -- so I might have to put it off as late as
Thursday. If that doesn't work then I'll see if we can work out something
sooner!

On Mon, Feb 3, 2014 at 3:51 AM, Christopher Hunt
[email protected]:

I'm travelling at the mo, but back in 24 hours. I think we can combine our
efforts here, particularly with my involvement on WebJars. Would you mind
connecting via Skype? I'm located in Bulli, nsw, Australia so I should be
easy to find. 'Look forward to chatting.

Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-33945874
.

greg brail | apigee https://apigee.com/ | twitter
@gbrailhttp://twitter.com/gbrail

from trireme.

huntc avatar huntc commented on August 11, 2024

Anytime that's convenient for you... I've coded quite a bit of my npm lib using Trireme, so we will have something concrete to talk about...

from trireme.

gbrail avatar gbrail commented on August 11, 2024

Great! In the meantime is there any source that I should look at in the
meantime so I can understand what you did (or try it)? I had an easy time
with jshint for instance...

On Mon, Feb 3, 2014 at 1:05 PM, Christopher Hunt
[email protected]:

Anytime that's convenient for you... I've coded quite a bit of my npm lib
using Trireme, so we will have something concrete to talk about...

Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-33999860
.

greg brail | apigee https://apigee.com/ | twitter
@gbrailhttp://twitter.com/gbrail

from trireme.

gbrail avatar gbrail commented on August 11, 2024

BTW, [email protected]...

On Mon, Feb 3, 2014 at 1:05 PM, Christopher Hunt
[email protected]:

Anytime that's convenient for you... I've coded quite a bit of my npm lib
using Trireme, so we will have something concrete to talk about...

Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-33999860
.

greg brail | apigee https://apigee.com/ | twitter
@gbrailhttp://twitter.com/gbrail

from trireme.

gbrail avatar gbrail commented on August 11, 2024

This actually got resolved already, in 0.8.5:

#93

You can use the "trireme-support" NPM module to read JAR files from the filesystem that include Node modules implemented in Java, and then use those modules inside a Node script as if they were regular Node modules.

https://www.npmjs.com/package/trireme-support

from trireme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.