Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'dev' and built 0.7.1
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/platypus.combined.js
#	lib/platypus.min.js
  • Loading branch information
probityrules committed Feb 9, 2016
2 parents 8531df2 + 8b6285d commit 0d7baba
Show file tree
Hide file tree
Showing 78 changed files with 5,453 additions and 2,868 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Platypus",
"version": "0.7.0",
"version": "0.7.1",
"homepage": "https://github.com/PBS-KIDS/Platypus",
"authors": [
"probityrules",
Expand Down
276 changes: 137 additions & 139 deletions build/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,144 +1,142 @@
var path = require('path');
var _ = require('lodash');
var path = require('path'),
_ = require('lodash');

module.exports = function (grunt) {
grunt.initConfig(
{
pkg: grunt.file.readJSON('package.json'),

// Default values
version: 'NEXT',
name: 'platypus',

// Setup doc names / paths.
docsName: '<%= pkg.name %>_docs-<%= version %>',
docsZip: "<%= docsName %>.zip",

// Setup Uglify for JS minification.
uglify: {
options: {
banner: grunt.file.read('LICENSE'),
preserveComments: "some",
compress: {
global_defs: {
"DEBUG": false
}
}
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>.min.js': getConfigValue('platypus_source')
}
}
},

concat: {
options: {
separator: '',
process: function(src, filepath) {
// Remove a few things from each file, they will be added back at the end.

// Strip the license header.
var file = src.replace(/^(\/\*\s)[\s\S]+?\*\//, "")

// Strip namespace
// file = file.replace(/(this.createjs)\s=\s\1.*/, "");

// Strip namespace label
file = file.replace(/\/\/\s*namespace:/, "");

// Strip @module
file = file.replace(/\/\*\*[\s\S]+?@module[\s\S]+?\*\//, "");

// Clean up white space
file = file.replace(/^\s*/, "");
file = file.replace(/\s*$/, "");

// Append on the class name
file =
"\n\n//##############################################################################\n"+
"// " + path.basename(filepath) + "\n" +
"//##############################################################################\n\n"+
file;

return file;
}
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>.combined.js': combineSource(
[
{cwd: '', config:'config.json', source:'platypus_source'}
]
)
}
}
},

// Build docs using yuidoc
yuidoc: {
compile: {
name: '<%= pkg.name %>',
version: '<%= version %>',
description: '<%= pkg.description %>',
url: '<%= pkg.url %>',
logo: '<%= pkg.logo %>',
options: {
paths: ['./'],
outdir: '<%= docsFolder %>',
linkNatives: true,
attributesEmit: true,
selleck: true,
helpers: ["../build/path.js"],
themedir: "../build/platypusTheme/"
}
}
},

compress: {
build: {
options: {
mode:'zip',
archive:'output/<%= docsZip %>'
},
files: [
{expand:true, src:'**', cwd:'<%= docsFolder %>'}
]
}
},

copy: {
docsZip: {
files: [
{expand: true, cwd:'output/', src:'<%= docsZip %>', dest:'../docs/'}
]
},
docsSite: {
files: [
{expand:true, cwd:'<%= docsFolder %>', src:'**', dest:getConfigValue('docs_out_path')}
]
},
src: {
files: [
{expand: true, cwd:'./output/', src: '*.js', dest: '../lib/'}
]
}
},

updateversion: {
platypus: {
file: '../src/platypus.js',
version: '<%= version %>'
}
},

clearversion: {
platypus: {
file: '../src/platypus.js'
}
}
}
);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

// Default values
version: 'NEXT',
name: 'platypus',

// Setup doc names / paths.
docsName: '<%= pkg.name %>_docs-<%= version %>',
docsZip: "<%= docsName %>.zip",

// Setup Uglify for JS minification.
uglify: {
options: {
banner: grunt.file.read('LICENSE'),
preserveComments: "some",
compress: {
global_defs: {
"DEBUG": false
}
}
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>.min.js': getConfigValue('platypus_source')
}
}
},

concat: {
options: {
separator: '',
process: function(src, filepath) {
// Remove a few things from each file, they will be added back at the end.

// Strip the license header.
var file = src.replace(/^(\/\*\s)[\s\S]+?\*\//, "")

// Strip namespace
// file = file.replace(/(this.createjs)\s=\s\1.*/, "");

// Strip namespace label
file = file.replace(/\/\/\s*namespace:/, "");

// Strip @module
file = file.replace(/\/\*\*[\s\S]+?@module[\s\S]+?\*\//, "");

// Clean up white space
file = file.replace(/^\s*/, "");
file = file.replace(/\s*$/, "");

// Append on the class name
file =
"\n\n//##############################################################################\n"+
"// " + path.basename(filepath) + "\n" +
"//##############################################################################\n\n"+
file;

return file;
}
},
build: {
files: {
'output/<%= pkg.name.toLowerCase() %>.combined.js': combineSource(
[
{cwd: '', config:'config.json', source:'platypus_source'}
]
)
}
}
},

// Build docs using yuidoc
yuidoc: {
compile: {
name: '<%= pkg.name %>',
version: '<%= version %>',
description: '<%= pkg.description %>',
url: '<%= pkg.url %>',
logo: '<%= pkg.logo %>',
options: {
paths: ['./'],
outdir: '<%= docsFolder %>',
linkNatives: true,
attributesEmit: true,
selleck: true,
helpers: ["../build/path.js"],
themedir: "../build/platypusTheme/"
}
}
},

compress: {
build: {
options: {
mode:'zip',
archive:'output/<%= docsZip %>'
},
files: [
{expand:true, src:'**', cwd:'<%= docsFolder %>'}
]
}
},

copy: {
docsZip: {
files: [
{expand: true, cwd:'output/', src:'<%= docsZip %>', dest:'../docs/'}
]
},
docsSite: {
files: [
{expand:true, cwd:'<%= docsFolder %>', src:'**', dest:getConfigValue('docs_out_path')}
]
},
src: {
files: [
{expand: true, cwd:'./output/', src: '*.js', dest: '../lib/'}
]
}
},

updateversion: {
platypus: {
file: '../src/platypus.js',
version: '<%= version %>'
}
},

clearversion: {
platypus: {
file: '../src/platypus.js'
}
}
});

function getBuildConfig() {
// Read the global settings file first.
Expand Down
7 changes: 5 additions & 2 deletions build/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"platypus_source": [
"../src/pako.js",
"../src/platypus.js",
"../src/mixins/Recycler.js",
"../src/mixins/Array.js",
"../src/mixins/String.js",
"../src/Data.js",
"../src/Component.js",
"../src/Messenger.js",
"../src/Entity.js",
Expand Down Expand Up @@ -84,8 +88,7 @@
"../src/components/TiledLoader.js",
"../src/components/Tween.js",
"../src/components/VoiceOver.js",
"../src/components/XHR.js",
"../src/mixins/Array.js"
"../src/components/XHR.js"
],

"docs_out_path":"./output/docs/"
Expand Down
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Platypus",
"version": "0.7.0",
"version": "0.7.1",
"description": "Platypus Docs",
"url": "https://github.com/PBS-KIDS/Platypus",
"logo": "assets/platypus-title.png",
Expand Down
Binary file removed docs/Platypus_docs-0.7.0.zip
Binary file not shown.
Binary file added docs/Platypus_docs-0.7.1.zip
Binary file not shown.
8 changes: 8 additions & 0 deletions example/ComponentExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@
instantiation. Use the "load" event shown below for anything
that should happen once all of the entity's components are
finished loading.
NOTE: Any events triggered in the constructor are delayed until the
entity has finished adding components (but immediately before
"load" is triggered). As such, be aware that event listeners
will get the message after the constructor is finished, and
any event content or owner properties that changes between
the trigger call and the end of components' constructor calls
will be reflected in the the event handler.
*********************************************************************/
},

Expand Down
Loading

0 comments on commit 0d7baba

Please sign in to comment.