Skip to content

Commit

Permalink
Merge branch 'testing' into release
Browse files Browse the repository at this point in the history
Release 0.7.1

Conflicts:
	dist/crafty-min.js
	dist/crafty.js
  • Loading branch information
starwed committed Feb 27, 2016
2 parents 5c34e40 + 6e69aee commit 3ab90bc
Show file tree
Hide file tree
Showing 11 changed files with 14,420 additions and 11,430 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,5 +1,4 @@
/crafty.js
/crafty-min.js
build/api/*
build/api.json
build/parseNodes.js
Expand Down
53 changes: 36 additions & 17 deletions Gruntfile.js
@@ -1,16 +1,13 @@
require("coffee-script");
var fs = require('fs');
var open = require("open");

module.exports = function (grunt) {
var pkg = grunt.file.readJSON('package.json');
var version = pkg.version;
var banner = '/**\n' +
' * <%= pkg.name %> <%= pkg.version %>\n' +
' * <%= pkg.author.url %>\n *\n' +
' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>\n' +
' * Dual licensed under the MIT or GPL licenses.\n' +
' */\n\n';
var banner = '/**\n' +
' * <%= pkg.name %> <%= pkg.version %>\n' +
' * <%= pkg.author.url %>\n *\n' +
' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author.name %>\n' +
' * Dual licensed under the MIT or GPL licenses.\n' +
' */\n\n';

var docGen = function() {
var outputFile = "./build/api.json";
Expand Down Expand Up @@ -43,6 +40,15 @@ module.exports = function (grunt) {

usebanner: {
dist: {
options: {
position: 'top',
banner: banner
},
files: {
src: ['dist/crafty.js']
}
},
debug: {
options: {
position: 'top',
banner: banner
Expand All @@ -56,7 +62,7 @@ module.exports = function (grunt) {
browserify: {
dist: {
files: {
'crafty.js': ['src/crafty.js']
'dist/crafty.js': ['src/crafty.js']
},
options: {
transform: ['brfs']
Expand All @@ -75,7 +81,7 @@ module.exports = function (grunt) {


watch: {
files: ['src/*.js'],
files: ['src/*.js', 'src/**/*.js'],
tasks: ['build:dev']
},

Expand All @@ -84,8 +90,8 @@ module.exports = function (grunt) {
banner: banner
},
build: {
src: 'crafty.js',
dest: 'crafty-min.js'
src: 'dist/crafty.js',
dest: 'dist/crafty-min.js'
}
},

Expand Down Expand Up @@ -176,15 +182,28 @@ module.exports = function (grunt) {



grunt.registerTask('version', 'Takes the version into src/version.js', function() {
fs.writeFileSync('src/version.js', 'module.exports = "' + version + '";');
grunt.registerTask('version', 'Propagates version changes', function() {
var pkg = grunt.config.get('pkg');
var version = grunt.option('crafty_version');
if (!version) {
grunt.warn("No command-line argument 'crafty_version' specified. Rerun the task with '--crafty_version=X.X.X'.");
version = pkg.version;
}
if (version === pkg.version) {
grunt.warn("Command-line argument 'crafty_version' is same as previous release version.");
}
pkg.version = version;
grunt.config.set('pkg', pkg);

grunt.file.write('package.json', JSON.stringify(pkg, null, 2));
grunt.file.write('src/core/version.js', 'module.exports = "' + version + '";');
});

// Build development
grunt.registerTask('build:dev', ['browserify:debug', 'usebanner']);
grunt.registerTask('build:dev', ['browserify:debug', 'usebanner:debug']);

// Build release
grunt.registerTask('build:release', ['browserify:dist', 'usebanner']);
grunt.registerTask('build:release', ['browserify:dist', 'usebanner:dist']);

// Building the documentation
grunt.registerTask('api', "Generate api documentation", docGen);
Expand Down
23 changes: 14 additions & 9 deletions bower.json
@@ -1,15 +1,20 @@
{
"name": "crafty",
"description": "Crafty is a modern component and event based framework for developing games in JavaScript that targets DOM, Canvas and WebGL.",
"keywords": [
"framework",
"javascript",
"game",
"engine"
],
"license": ["GPL", "MIT"],
"main": "dist/crafty.js",
"license": "MIT",
"ignore": [
"**/.*",
"build",
"playgrounds",
"test",
"*.md",
"changelog.txt",
"Gruntfile.js",
"package.json"
"**",
"!bower.json",
"!README.md",
"!dist",
"!dist/crafty.js",
"!dist/crafty-min.js"
]
}
13 changes: 7 additions & 6 deletions dist/crafty-min.js

Large diffs are not rendered by default.

0 comments on commit 3ab90bc

Please sign in to comment.