Monkey Package Manager

About Monkey 2 Forums Monkey 2 Development Monkey Package Manager

This topic contains 7 replies, has 3 voices, and was last updated by  Tibit 3 years ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #615

    Tibit
    Participant

    I’m hyped about monkey2 getting a nice package manager.

    Been using npm a lot, and for me it is day and night compared to how it was in monkey 1.

    Whats-so-great-about-npm

    @Mark, have you seen it? I am curious to hear your thoughts on package managers.

     

    #623

    Mark Sibly
    Keymaster

    All I know about npm is that it broke the internet recently! But that page is interesting, I’ll definitely take a closer look at it.

    I’ve vaguely been thinking about implementing something similar to haxelib…

    http://lib.haxe.org/

    …but I’m not sure how that deals with version conflicts.

    I kind of like how macos frameworks do it – there’s just top-level ‘VersionA’, ‘VersionB’ etc. subdirs inside each framework. Simple but effective.

     

    #646

    Tibit
    Participant

    Seems to be quite similar.

    This was a fun read, did not know, how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code/, everything in web development does seem to have a dependancy to npm these days 🙂

    Seems Macos also use semver version notation, and seems npm does similar with sub-dir but only when there is version conflicts. So in the form of X.Y.Z, changes in Y has non breaking API changes or API additions, Z never breaks but include bug fixes and X is breaking current API calls. So if I want a more stable build I could listen for version 0.* which is fairly intuitive.

    So in npm versioning the way I get it. An module has a package.json file, something like this:

    All modules to the App are found in a app/modules folder, and the modules get there by typing “npm install or npm update” and the modules folder is then updated to match my package.json file (which is the default name if none is specified). This is the same process when I clone from github. git clone && npm install. However I rarly manually edit the package.json in order to install packages.

    Then if I find a npm module I like on the internet the how to install usually looks like:

    Install the electron command globally in your $PATH
    npm install electron-prebuilt -g

    Which downloads the module to the apps local /module/ folder or with -g the global /modules/ folder and any dependancies that this module needs that I do not already have in my local module folder. I think that only if a module in it’s package.json depends on an older version that one currently have that it adds it as a “sub-module” to that module.

    I guess you are able to device more cleaver solutions more specific to monkey 2.

    Local and sub-module versioning seems to relieve the dependancy-fear that a module used might get a breaking API update, might avoid the feeling that you “should” inline code instead of using a proper module.

    I also used meteor(meteor.com)’s package manager which has an even simpler interface:
    meteor add author:package <– download and compile package
    meteor remove author:package meteor <– compiles and starts local dev server if the local folder contains a .meteor folder where all modules and build stuff is in
    meteor deploy your-app.com –settings production-settings.json
    meteor add-platform ios <– build an app
    meteor run ios

    What I hope at the end of the day is just a simple command-tool, so the editor can provide an really user friendly interface for easily finding, installing and removing modules + docs + examples which I think could be a key piece of building a flourishing monkey2 community.

    #647

    Tibit
    Participant

    Owff seems codeboxes are not working, but they where in preview! Let me know if there is something I missed.

    #729

    Anonymous

    Owff seems codeboxes are not working,

    Hopefully fixed now!

     

    #735

    Tibit
    Participant

    Maybe there is a timeout on edits, I cannot find any edit link now.

    #736

    Mark Sibly
    Keymaster

    Ok, found the time limit on edits setting and changed it to 999999.

    Not sure if it works retroactively though – can you edit now?

    Look like it’ll take me a while to get the forums ‘tuned’. Still way better than having to write them myself!

    #743

    Tibit
    Participant

     

    Solved, I can edit now!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.