Skip to content

Commit

Permalink
Added MelonJS tutorial, completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ripsawridge committed Nov 16, 2014
1 parent 80dc1ac commit e23fbbc
Show file tree
Hide file tree
Showing 44 changed files with 22,969 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*~
.DS_Store
build
node_modules/
3 changes: 3 additions & 0 deletions melonjs-tutorial/boilerplate-master/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
.DS_Store
node_modules/
70 changes: 70 additions & 0 deletions melonjs-tutorial/boilerplate-master/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
dist: {
src: ['lib/melonJS-<%= pkg.version %>.js', 'lib/plugins/*.js', 'js/game.js', 'js/resources.js','js/**/*.js'],
dest: 'build/js/app.js'
}
},
copy: {
dist: {
files: [{
src: 'index.css',
dest: 'build/index.css'
},{
src: 'data/**/*',
dest: 'build/'
},
{
src: 'index.html',
dest: 'build/index.html'
}]
}
},
processhtml: {
dist: {
options: {
process: true,
data: {
title: 'My app',
message: 'This is production distribution'
}
},
files: {
'build/index.html': ['index.html']
}
}
},
uglify: {
options: {
report: 'min',
preserveComments: 'some'
},
dist: {
files: {
'build/js/app.min.js': [
'build/js/app.js'
]
}
}
},
connect: {
server: {
options: {
port: 8000,
keepalive: true
}
}
},
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-processhtml');
grunt.loadNpmTasks('grunt-contrib-connect');

grunt.registerTask('default', ['concat', 'copy']);
grunt.registerTask('full', ['concat', 'copy', 'processhtml']);
}
19 changes: 19 additions & 0 deletions melonjs-tutorial/boilerplate-master/MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) <2011 - 2013> by <Olivier Biot>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions melonjs-tutorial/boilerplate-master/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
melonJS boilerplate
-------------------------------------------------------------------------------

features :
- video autoscaling
- mobile optimized HTML/CSS
- swiping disabled on iOS devices
- debug Panel (if #debug)
- default icons
- distribution build

## To run distribution

To build, be sure you have [node](http://nodejs.org) installed. Clone the project:

git clone https://github.com/melonjs/boilerplate.git

Then in the cloned directory, simply run:

npm install

To build:

grunt


Running the game:

grunt connect

And you will have the boilerplate example running on http://localhost:8000


Note that you may have to edit the file `Gruntfile.js` if you need to better dictate the order your files load in. Note how by default the game.js and resources.js are specified in a specific order.

-------------------------------------------------------------------------------
Copyright (C) 2011 - 2014 Olivier Biot, Jason Oster, Aaron McLeod
melonJS is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php)
2 changes: 2 additions & 0 deletions melonjs-tutorial/boilerplate-master/data/bgm/.placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs will be placed here when built

Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e23fbbc

Please sign in to comment.