Git Product home page Git Product logo

Comments (8)

pasviegas avatar pasviegas commented on June 9, 2024

+1 :)

from monet.js.

cwmyers avatar cwmyers commented on June 9, 2024

Would you be able to show me how to do that?—
Sent from Mailbox

On Fri, Aug 1, 2014 at 3:17 PM, Erwin Poeze [email protected]
wrote:

It would be convenient if monet.js was available in npm too.

Reply to this email directly or view it on GitHub:
https://github.com/cwmyers/monet.js/issues/12

from monet.js.

donnut avatar donnut commented on June 9, 2024

I've done some modifications to make it work. The wrapper in monet.js needs to be adapted for node's require and some info must be added to the package.json.

A few points to consider.
One calls monet from node like:

var m = require('monet'); // (dropped the .js btw as is recommended)
var someString = m.Maybe.Some('abcd');

The curry function is a separate function attached to window and it will be a separate node module too. In node there is not something as a global space where you can attached functions to. It might be a better idea to add curry to the monet module.

The tests are created for the browser using jasmine. I'm not familiar with jasmine, maybe it can be made fit for node as well.

If you want to test packaging a node module locally take a look at this article

I'll send a PR with some mods I've made

from monet.js.

cwmyers avatar cwmyers commented on June 9, 2024

You are brilliant. Thanks so much. 

Can I ask, are you using monet in any projects? What parts of monet do you use the most?

Sent from Mailbox

On Sat, Aug 2, 2014 at 7:13 PM, Erwin Poeze [email protected]
wrote:

I've done some modifications to make it work. The wrapper in monet.js needs to be adapted for node's require and some info must be added to the package.json.
A few points to consider.
One calls monet from node like:

var m = require('monet'); // (dropped the .js btw as is recommended)
var someString = m.Maybe.Some('abcd');

The curry function is a separate function attached to window and it will be a separate node module too. In node there is not something as a global space where you can attached functions to. It might be a better idea to add curry to the monet module.
The tests are created for the browser using jasmine. I'm not familiar with jasmine, maybe it can be made fit for node as well.
If you want to test packaging a node module locally take a look at this article

I'll send a PR with some mods I've made

Reply to this email directly or view it on GitHub:
https://github.com/cwmyers/monet.js/issues/12#issuecomment-50958236

from monet.js.

donnut avatar donnut commented on June 9, 2024

Well, to be honest, I'm not using it in projects. I'm trying to program in a functional way in javascript as much as I can and stumbled across your library. At the moment I'm trying to sort out how to apply monads in a useful way. Obviously you do not need them in js, but as far as I can tell, using them could improve my projects.

from monet.js.

manpages avatar manpages commented on June 9, 2024

Are there any proceedings on this one, @donnut?
We want to use monet.js in production with webpack and it would be great if it was packaged properly.

Update:
I should have read the root of the project, it has package.json and

"monet":              "git://github.com/cwmyers/monet.js.git#master"

in our package.json did the trick, I'll test if [some-]things work and will provide feedback here.

from monet.js.

manpages avatar manpages commented on June 9, 2024

Installation with npm works perfectly for our team, everything works, this issue should be closed :)

from monet.js.

jcristovao avatar jcristovao commented on June 9, 2024

Hi,
I'm a bit rookie with npm, I was able to install (and require) monet with npm, but while a require("monet"); works, a require("monet-pimp"); after doesn't.

Am I missing something?

from monet.js.

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.