Eric Naujock Posted January 6, 2017 Share Posted January 6, 2017 I am looking inside of npm and am finding that melon seems to only go up to version .0.3.0 Is melon something that I can manage though NPM is is the project one that I am not going to easily be able to build as a NPM based project. My main project is build using Melon 3.x and I am looking to upgrade it to 4.0. Quote Link to comment Share on other sites More sharing options...
Parasyte Posted January 6, 2017 Share Posted January 6, 2017 Hi! I had no idea our recently releases haven't been published to npm. (I've been away from the project for quite some time.) Thank you for pointing that out. I'll get those published shortly! Quote Link to comment Share on other sites More sharing options...
Parasyte Posted January 6, 2017 Share Posted January 6, 2017 Whoops, I got confused. melonJS isn't currently on npm. I think the only thing it really needs is a small change to package.json to get it working. But once it's there, you won't be able to just `require('melonJS')` ... There's a JavaScript file in the `build/` directory that you can link in your web app with a <script> element. For a quick workaround, you can install melonJS right now using bower; the same linking instructions above work for this method. Quote Link to comment Share on other sites More sharing options...
obiot Posted January 7, 2017 Share Posted January 7, 2017 i though it was the case as well, and was even discussed here : https://github.com/melonjs/melonJS/issues/772 Quote Link to comment Share on other sites More sharing options...
Eric Naujock Posted January 8, 2017 Author Share Posted January 8, 2017 Thank you for the reply. Part of my motivation for this would be to make is so I could compile a melonjs game into a single page app or Angular 2 type of application. Then be able to have the NPM libraries compile and optimise the loading of the game to make things start better. Or integrate the game into an Angular 2 object. My reason for doing this is that I am using the MelonJS environment to perform training functions for employees at a local food service provider. I like being able to make up levels that can work like a restaurant to help a salesperson better understand how the restaurant works with the company. I know this is not the conventional concept of a game, but it just fits in and works so well. Quote Link to comment Share on other sites More sharing options...
Eric Naujock Posted January 8, 2017 Author Share Posted January 8, 2017 I tried to use yo to install and build a basic niolerplate MelonJS app and found this was the versions available of melonjs in the system. npm ERR! notarget No compatible version found: [email protected] npm ERR! notarget Valid install targets: npm ERR! notarget 0.4.6, 0.4.5, 0.4.3, 0.4.2, 0.4.1, 0.4.0, 0.3.10, 0.3.9, 0.3.8, 0.3.7, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.3.1, 0.2.5, 0.2.3, 0.0.1 This is how YO answered. yo ? 'Allo erlic! What would you like to do? Melonjs Make sure you are in the directory you want to scaffold into. This generator can also be run with: yo melonjs OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO00 OOOOOOOOOOOOOOOOOOOOOOOZ. I7? =OOOO000000 OOOOOOOOOOOOOOOOOOO ,OOOOOOOOOOOOI?OOO OOOOOOOOOOOOOOO, .OOOOOOOOOOOOOOOO, OOO00 OOOOOOOOOOOO, ~OOOOOOOOOOOOOOOOOO+ ,OO OOOOOOOOOO .OOOOOOOOOOOOOOOOOOOO OO OOOOOOO, OOOOOOOOOOOOOOOOOOOOO: OO OOOOO~ OOOOOOOOOOOOOOOOOOOOO+ OO OOOO OOOOOOOOOOOOOOOOOOOOO, IO OO..OOOOOOOOOOOOOOOOOOOO OO O,IOOOOOOOOOOOOOOOOO? OO O OOOOOOOOOOOOOOZ ?O O ZOOOOOOOOO~ ZO OO OO OOO: OOO OOOOO OOOO OOOOOOO~ ZOOOO OOOOOOOOOOO7. ~OOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO00 OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO00 Hi! It's time to build great games with MelonJS ? What's the name of your game? mygame create mygame/package.json create mygame/bower.json create mygame/Gruntfile.js create mygame/manifest.json create mygame/.jshintrc create mygame/.gitignore create mygame/index.html create mygame/css/index.css create mygame/build/game.js create mygame/build/game-min.js create mygame/js/game.js create mygame/js/resources.js create mygame/js/screens/play.js create mygame/js/debugPanel.js create mygame/data/img/melonjs.png create mygame/data/img/bg.png create mygame/data/img/icon-152x152.png create mygame/data/img/icon-192x192.png I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself. npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree. npm WARN deprecated [email protected]: use uuid module instead npm WARN prefer global [email protected] should be installed with -g Quote Link to comment Share on other sites More sharing options...
Eric Naujock Posted January 8, 2017 Author Share Posted January 8, 2017 This is the version of melonjs that was installed using yo. /* * MelonJS Game Engine * Copyright (C) 2011 - 2014 Olivier Biot, Jason Oster, Aaron McLeod * http://www.melonjs.org * * a simple debug panel plugin * usage : me.plugin.register(debugPanel, "debug"); * * you can then use me.plugin.debug.show() or me.plugin.debug.hide() * to show or hide the panel, or press respectively the "S" and "H" keys. * * note : * Heap Memory information is available under Chrome when using * the "--enable-memory-info" parameter to launch Chrome */ Quote Link to comment Share on other sites More sharing options...
Parasyte Posted January 10, 2017 Share Posted January 10, 2017 That's pretty old. I guess we'll have to update the generator: https://github.com/melonjs/generator-melonjs/blob/master/app/templates/index.html#L25 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.