Code Monkey home page Code Monkey logo

rp's Introduction

About rp

rp is a package manager for RingoJS. It aims to provide an easy way to both manage packages of local RingoJS installations and to publish packages in a remote package registry (by default the RingoJS Package Registry).

Status

rp is experimental beta, so expect bugs. Because of that and because rp adds and removes files, directories and links on local disks you should not use it on production systems or without an up-to-date backup.

Important note for Windows users: As of now, rp is largely untested on Windows (due to the fact that none of my computers run Windows), so your mileage may vary.

Installation

rp can be easily installed using ringo-admin:

ringo-admin install http://packages.ringojs.org/download/rp/latest

Note that rp will be installed within the RingoJS installation containing ringo-admin script. If you have the environment variable RINGO_HOME set, rp will be installed where it points to (so if want to try out rp in a pristine RingoJS installation, make sure to unset RINGO_HOME before).

Usage

If you have RingoJS' bin directory in the path (which you should), you can start rp by simply entering

rp

on the command line. If called without a command rp will output the list of available commands. To get detailed information about a command simply call

rp help <command>

Replace with the command you want information about.

Configuration

rp stores it's configuration and a local cache of the package registry catalog in a subdirectory of the user's home directory. On Linux/OS X the directory is $HOME/.rp/, on Windows USER_HOME/rp/.

Normally rp doesn't need any configuration. If you want to use a package registry different than the RingoJS Package Registry or explicitly specify a RingoJS installation to manage packages for (normally rp uses the one it has been installed in), use

rp config

The configuration will be stored in a file "config" within the rp directory.

Uninstallation

rp itself is a RingoJS package, so it's as easy to uninstall as other packages: remove the directory packages/rp and the symlinks in RingoJS' bin directory.

Bugs/Enhancements

If you encounter bugs or unexpected behaviour, or have any ideas on how to make rp better, please file an issue on GitHub.

Disclaimer

rp is provided as-is, without warranty of any kind, expressed or implied.

The packages in the RingoJS Package Registry registry are the sole property of their respective maintainers, and are in no way affiliated with or endorsed by RingoJS Package Registry or the maintainers of the registry. There is absolutely no guarantee, warrantee, or assertion made as to the quality, fitness for a specific purpose or lack of malice in any given package published in the RingoJS Package Registry registry.

rp's People

Contributors

grob avatar oberhamsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

oberhamsi yaaqoub

rp's Issues

install not working if piped

if i pipe the install.js directly into ringo as recommended by README i get NPE. most recent ringo.

simon@duchov:~/ringojs$ echo curl -s http://rpr.nomatic.org/install.js | /home/simon/ringojs/bin/ringo --verbose
Loading module: system
java.lang.NullPointerException
Java Exception: java.lang.NullPointerException
at org.ringojs.engine.Require.call(Require.java:81)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen._stdin__3._c_script_0(:1)
at org.mozilla.javascript.gen._stdin__3.call()
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
at org.mozilla.javascript.gen._stdin__3.call()
at org.mozilla.javascript.gen._stdin__3.exec()
at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
at org.ringojs.tools.RingoShell.runSilently(RingoShell.java:185)
at org.ringojs.tools.RingoShell.run(RingoShell.java:79)
at org.ringojs.tools.RingoRunner.run(RingoRunner.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.ringojs.tools.launcher.Main.run(Main.java:66)
at org.ringojs.tools.launcher.Main.main(Main.java:45)

it worked like this:

$ echo `curl -s http://rpr.nomatic.org/install.js` > ~/Downloads/rpr-install.js
$ ringo ~/Downloads/rpr-install.js 
Downloading http://rpr.nomatic.org/download/rp/latest ...
....

what does "rp update" do?

My guess is that it updates the packages that I have installed on my machine.
is that correct?

However, I also have packages that are done by me, and 1 is published.
I changed some things in the code of the package, what do I do to "update" this package in the registry?
Do I "rp publish" it again ?

How do you update your email address?

I changed my email address from [email protected] to [email protected] and I wish to update my email address. However there's no command in rp to do so. I see that there is a command to change your password though. Would you please add this feature so that I may update my email address. My gravatar account no longer uses my old email address.

rp throws useless error on syntax error

If you have an invalid version range (e.g. "gestalt": "=> 0.1.1") in the dependencies, rp throws the following error:

Philipps-MacBook-Pro:collodion philipp$ rp install
Resolving dependencies of collodion ...
Cannot find function undefined in object [object Object]. 

The output should be something like "Invalid version range".

Package does not exist in registry

I published two new packages to the RingoJS Package Registry, namely lex and augment. However when I try to install them using the commands rp install lex or rp install augment it gives me the error Package does not exist in registry.

When I run the command rp search it does list my packages. If I try to install other packages then it doesn't give me any problems. Only my packages are broken. I tried to figure out what's wrong and found out that the error occurred in rp/lib/utils/registry.js on line 13.

The function throwing the error was named getPackageDescriptor so I assume that it can't fetch my package descriptor (package.json) which is weird because it fetched the details of my packages from the package descriptor itself. Is this because of some bug in the registry, the package manager or my package?

error msg when package.json is invalid

currently I get this because my package.json had "contributors" set to [] (empty array):

simon@duchov:~/reinhardt$ rp publish
Username: oberhamsi
Password: ********
4551 [main] ERROR rp.lib.rp.utils.httpclient  - org.apache.http.client.HttpResponseException: Server Error
Unable to connect to registry 

Clear cached catalog when switching to a different registry

Currently it's necessary to do a rp cache init after switching to a different package registry using rp config. This shouldn't be necessary: either store the registry URL in the cached catalog and wipe it if the URL changed, or clear/init the cached catalog when the config changes.

Install packages from npm

Even if this might be a non-goal of rp, but I just want to drop this issue in: At the moment we have some npm modules mirrored into our package registry. Some of them require modifications, so this is okay. Others (like rx/rxjs) don't. Is there an easier way to install the latter then taking the indirect route over npm? In case this is a non-goal, it's still okay to use npm imho.

Check dependency on specific RingoJS versions

See Hannes' posting in RingoJS group

rp should check if a package or it's dependencies requires a specific version of RingoJS, and at least display a message if the local ringojs installation doesn't meet this requirement (or prohibit the installation of such packages at all).

for this the package.json descriptor of a package should contain the following property:

"engines": {
    "ringojs": ">= 0.8"
}

evalPackageDescriptor() in publish command should probably display a warning if the descriptor doesn't specify this (or throw an error if it's an array of engine names).

(commonjs package specifies "engines" as array of engine names, but rp should follow kris kowal's proposal)

rp blocked by alias for Remove-ItemProperty in Windows PowerShell

The Windows PowerShell has a lot of aliases for a lot of Commandlets. One of them is rp for Remove-ItemProperty:

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation.

PS Z:\> get-alias
[...]
Alias     rp     Remove-ItemProperty

This alias masks the rp command and you always have to enter the full path the the Ringo package manager instead of just two letters. So I removed the rp alias as administrator with Remove-Item alias:\rp -Force Since Microsoft does not recommend the use of aliases in scripts, this looks like a proper solution for Windows PowerShell users.

Maybe this should be documented somewhere.

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.