melonJS icon indicating copy to clipboard operation
melonJS copied to clipboard

Add melon to bower

Open nvlbg opened this issue 13 years ago • 14 comments

I think it would be nice if you register melon to http://bower.io/

nvlbg avatar May 18 '13 08:05 nvlbg

seems that someone already registered it on bower, so i'm closing this one ;)

obiot avatar Jul 08 '13 07:07 obiot

Only that it doesn't contain any build source. It's main property references "melonJS-0.9.8-min.js" but there is no such file.

despairblue avatar Oct 22 '13 11:10 despairblue

I made a pull request: https://github.com/melonjs/melonJS/pull/314. This fixes the path, but one still needs to run grunt in the project directory to get the ready-to-use file.

mik01aj avatar Nov 22 '13 12:11 mik01aj

Reopened this one, because it's apparently not ready-made for bower. I also want to get the version number dynamically loaded from package.json, so that version increments only need to happen in one file.

And ... moving this ticket to milestone 1.0.0, because I have no idea when these concerns can be addressed.

parasyte avatar Nov 22 '13 20:11 parasyte

Running npm install on 1.0.0-dev branch logs this to the console:

> [email protected] install /Users/parasyte/projects/melonJS
> bower install;grunt

sh: bower: command not found

parasyte avatar Nov 29 '13 23:11 parasyte

You need bower installed:

[sudo] npm install -g bower

despairblue avatar Nov 30 '13 16:11 despairblue

My point is that npm install should install bower before it attempts to run it.

On Nov 30, 2013, at 8:03 AM, Danny Arnold [email protected] wrote:

You need bower installed:

[sudo] npm install -g bower


Reply to this email directly or view it on GitHub.

parasyte avatar Nov 30 '13 21:11 parasyte

Maybe I'm wrong here, but npm install won't install dependencies globally and bower needs to be installed globally or at least the executable must be somewhere in PATH. So why should npm install install bower? It doesn't install grunt-cli either.

Correct me if I'm wrong here.

despairblue avatar Dec 02 '13 23:12 despairblue

Ah, point taken and well-received! This is a simple fix, then. We'll just update README.md to add bower to the install instructions.

parasyte avatar Dec 03 '13 03:12 parasyte

to be honest I'm not super familiar with bower neither (i actually never used it), but about this plugin :

https://npmjs.org/package/grunt-bower-install

obiot avatar Dec 03 '13 03:12 obiot

@obiot: this plugin only adds <script> tags to your HTML.

Bower is a package manager for the web. You type bower install melonJS in some other project and get MelonJS installed. And right now it downloads the source from github and places it in bower_components directory. The problem is that it doesn't build the final JS file (so you have to manually run grunt in the melonJS project) and the path was wrong (I corrected the path in my pr).

So basically you don't need bower as a dependence in your project if you don't use it; and bower.json is a file that tells bower how to install this package in some other environment.

mik01aj avatar Dec 03 '13 07:12 mik01aj

i'm confused about what is the conclusion for this one, do we then just need to add the following line to the install/build instructions : npm install -g bower

obiot avatar Jan 03 '14 02:01 obiot

I don't think you need it, unless you install some melonJS dependencies using bower.

bower.json, however, is another thing: it is there to allow melonJS being installed in some other web app.

mik01aj avatar Jan 03 '14 09:01 mik01aj

All right, thank you for the feedback and I'm therefore closing this one.

obiot avatar Jan 03 '14 10:01 obiot