New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM package #57

Closed
peterbraden opened this Issue Jan 11, 2011 · 12 comments

Comments

Projects
None yet
5 participants
@peterbraden

peterbraden commented Jan 11, 2011

I can't find a npm package for requireJS. If there is one it should be more visible in the docs, if there isn't one, there should be.

@timoxley

This comment has been minimized.

Show comment
Hide comment
@timoxley

timoxley Apr 22, 2011

+1 to this, perhaps there's a reason there's no npm package?

timoxley commented Apr 22, 2011

+1 to this, perhaps there's a reason there's no npm package?

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Jul 19, 2011

Member

I just pushed the Node adapter, r.js, as an npm package:

npm install requirejs-r

Then use it by doing the following to run main.js through the adapter:

node node_modules/requirejs-r/r.js main.js

I'm still not sure about supplying require.js as an npm package, since it is not something that can be run in node directly, but if you find you would do installtion of require.js for use in the browser by using npm, then knowing those use cases would inform if/when to publish require.js as an npm-installable package.

Member

jrburke commented Jul 19, 2011

I just pushed the Node adapter, r.js, as an npm package:

npm install requirejs-r

Then use it by doing the following to run main.js through the adapter:

node node_modules/requirejs-r/r.js main.js

I'm still not sure about supplying require.js as an npm package, since it is not something that can be run in node directly, but if you find you would do installtion of require.js for use in the browser by using npm, then knowing those use cases would inform if/when to publish require.js as an npm-installable package.

@JasonGiedymin

This comment has been minimized.

Show comment
Hide comment
@JasonGiedymin

JasonGiedymin Jul 19, 2011

What about allowing a global r.js wrapper so that people can npm install -g requirejs-r and requirejs-r <file>.js ?

JasonGiedymin commented Jul 19, 2011

What about allowing a global r.js wrapper so that people can npm install -g requirejs-r and requirejs-r <file>.js ?

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Jul 19, 2011

Member

JasonGiedymin: Using the -g to install requirejs-r will install the package, however I do not follow the requirejs-r .js part. Is that some way of getting a global executable? If there is an example or reference I should look at, please let me know. I am new to npm publishing.

Member

jrburke commented Jul 19, 2011

JasonGiedymin: Using the -g to install requirejs-r will install the package, however I do not follow the requirejs-r .js part. Is that some way of getting a global executable? If there is an example or reference I should look at, please let me know. I am new to npm publishing.

@JasonGiedymin

This comment has been minimized.

Show comment
Hide comment
@JasonGiedymin

JasonGiedymin Jul 20, 2011

A good example I use for my personal projects is CoffeeScript. Jade, and Stylus are also other good examples. Each allow (when installed globally) me to call the binary without a path designation. Global binaries are in the 'path' /bin/.

see main & bin: https://github.com/jashkenas/coffee-script/blob/master/package.json

JasonGiedymin commented Jul 20, 2011

A good example I use for my personal projects is CoffeeScript. Jade, and Stylus are also other good examples. Each allow (when installed globally) me to call the binary without a path designation. Global binaries are in the 'path' /bin/.

see main & bin: https://github.com/jashkenas/coffee-script/blob/master/package.json

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Jul 21, 2011

Member

@JasonGiedymin: Thanks for the pointers! @arlolra did a pull request to show how to do it too. I updated the r.js setup in this commit, and npm has been updated with the change.

Member

jrburke commented Jul 21, 2011

@JasonGiedymin: Thanks for the pointers! @arlolra did a pull request to show how to do it too. I updated the r.js setup in this commit, and npm has been updated with the change.

@JasonGiedymin

This comment has been minimized.

Show comment
Hide comment
@JasonGiedymin

JasonGiedymin commented Jul 21, 2011

Awesome!!!

@millermedeiros

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Jul 21, 2011

Member

not sure if you guys think it should always be installed globally or not but NPM have an option to warn the user if the tries to install it locally: "preferGlobal" : true

to overwrite the package info you can just call npm publish --force.

PS: user can still install it locally, but if it can't find a global version it will show the warning.

Member

millermedeiros commented Jul 21, 2011

not sure if you guys think it should always be installed globally or not but NPM have an option to warn the user if the tries to install it locally: "preferGlobal" : true

to overwrite the package info you can just call npm publish --force.

PS: user can still install it locally, but if it can't find a global version it will show the warning.

@JasonGiedymin

This comment has been minimized.

Show comment
Hide comment
@JasonGiedymin

JasonGiedymin Jul 21, 2011

No not always, but only when i do npm install -g which signifies global. Otherwise npm install will install locally only.

JasonGiedymin commented Jul 21, 2011

No not always, but only when i do npm install -g which signifies global. Otherwise npm install will install locally only.

@timoxley

This comment has been minimized.

Show comment
Hide comment
@timoxley

timoxley Jul 22, 2011

I don't see any reason it should be installed globally. You'd use prefer global for a package that has an executable script (eg the coffeescript compiler in the coffee-script package) or something like a db wrapper.

timoxley commented Jul 22, 2011

I don't see any reason it should be installed globally. You'd use prefer global for a package that has an executable script (eg the coffeescript compiler in the coffee-script package) or something like a db wrapper.

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Oct 4, 2011

Member

There is a way to npm install requirejs now, closing.

Member

jrburke commented Oct 4, 2011

There is a way to npm install requirejs now, closing.

@jrburke jrburke closed this Oct 4, 2011

@timoxley

This comment has been minimized.

Show comment
Hide comment
@timoxley

timoxley Oct 4, 2011

Great, thanks.

timoxley commented Oct 4, 2011

Great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment