Skip to content

Commit 72f6ac5

Browse files
Matthew KaneyMatthew Kaney
authored andcommitted
Merge remote-tracking branch 'processing/master'
2 parents 5fedd47 + 9159a9f commit 72f6ac5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+790
-300
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ lib/addons/p5.dom.min.js
88
docs/reference/*
99
docs/yuidoc-p5-theme/assets/js/reference.js*
1010
!*.gitkeep
11-
examples/3d/tutorial
11+
examples/3d/
1212
.idea

Gruntfile.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,13 @@ module.exports = function(grunt) {
332332
tags: ['master']
333333
}
334334
}
335+
},
336+
minjson: {
337+
compile: {
338+
files: {
339+
'./docs/reference/data.min.json': './docs/reference/data.json'
340+
}
341+
}
335342
}
336343
});
337344

@@ -352,15 +359,15 @@ module.exports = function(grunt) {
352359
grunt.loadNpmTasks('grunt-release-it');
353360
grunt.loadNpmTasks('grunt-saucelabs');
354361
grunt.loadNpmTasks('grunt-mocha-test');
362+
grunt.loadNpmTasks('grunt-minjson');
355363

356364
// Create the multitasks.
357365
// TODO: "requirejs" is in here to run the "yuidoc_themes" subtask. Is this needed?
358366
grunt.registerTask('build', ['browserify', 'uglify', 'requirejs']);
359367
grunt.registerTask('test', ['jshint', 'jscs', 'build', 'yuidoc:dev', 'connect', 'mocha', 'mochaTest']);
360368
grunt.registerTask('test:nobuild', ['jshint:test', 'jscs:test', 'connect', 'mocha']);
361-
grunt.registerTask('yui', ['yuidoc:prod']);
362-
grunt.registerTask('yui:dev', ['yuidoc:dev']);
363-
grunt.registerTask('yui', ['yuidoc:prod']);
369+
grunt.registerTask('yui', ['yuidoc:prod', 'minjson']);
370+
grunt.registerTask('yui:dev', ['yuidoc:dev', 'minjson']);
364371
grunt.registerTask('yui:test', ['yuidoc:dev', 'connect', 'mocha:yui']);
365372
grunt.registerTask('default', ['test']);
366373
grunt.registerTask('saucetest', ['connect', 'saucelabs-mocha']);

docs/yuidoc-p5-theme-src/scripts/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ var require = {
2828
'menuView': 'views/menuView',
2929
'libraryView': 'views/libraryView'
3030
}
31-
};
31+
};

docs/yuidoc-p5-theme-src/scripts/main.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,18 @@ define('App', function() {
88

99
/**
1010
* Load json API data and start the router.
11-
* @param {module} _
12-
* @param {module} Backbone
1311
* @param {module} App
1412
* @param {module} router
1513
*/
1614
require([
17-
'underscore',
18-
'backbone',
1915
'App',
20-
'./documented-method'], function(_, Backbone, App, DocumentedMethod) {
21-
16+
'./documented-method'], function(App, DocumentedMethod) {
17+
2218
// Set collections
2319
App.collections = ['allItems', 'classes', 'events', 'methods', 'properties', 'p5.sound', 'p5.dom'];
2420

2521
// Get json API data
26-
$.getJSON("data.json", function(data) {
22+
$.getJSON('data.min.json', function(data) {
2723
App.data = data;
2824
App.classes = [];
2925
App.methods = [];
@@ -74,7 +70,7 @@ require([
7470
} else if (el.itemtype === "event") {
7571
App.events.push(el);
7672
App.allItems.push(el);
77-
}
73+
}
7874

7975
// libraries
8076
if (el.module === "p5.sound") {
@@ -88,11 +84,11 @@ require([
8884
}
8985
}
9086
});
91-
87+
9288
_.each(App.classes, function(c, idx) {
9389
c.items = _.filter(App.allItems, function(it){ return it.class === c.name; });
9490
});
9591

9692
require(['router']);
9793
});
98-
});
94+
});

docs/yuidoc-p5-theme-src/scripts/router.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
define([
2-
'underscore',
3-
'backbone',
42
'App'
5-
], function(_, Backbone, App) {
3+
], function(App) {
64

75
'use strict'; //
86

docs/yuidoc-p5-theme-src/scripts/tpl/menu.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<p>
2+
<small>
3+
Can't find what you're looking for? You may want to check out
4+
<a href="#/libraries/p5.dom">p5.dom</a> or
5+
<a href="#/libraries/p5.sound">p5.sound</a>.
6+
</small>
7+
</p>
18

29
<% var i=0; %>
310
<% var max=Math.floor(groups.length/4); %>

docs/yuidoc-p5-theme-src/scripts/views/itemView.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
define([
2-
'underscore',
3-
'backbone',
42
'App',
53
// Templates
64
'text!tpl/item.html',
75
'text!tpl/class.html',
86
'text!tpl/itemEnd.html',
97
// Tools
108
'prettify'
11-
], function (_, Backbone, App, itemTpl, classTpl, endTpl) {
9+
], function (App, itemTpl, classTpl, endTpl) {
1210

1311
'use strict';
1412

@@ -34,7 +32,7 @@ define([
3432
if (isMethod || isConstructor) {
3533
syntax += '(';
3634
if (cleanItem.params) {
37-
for (var i=0; i<cleanItem.params.length; i++) {
35+
for (var i=0; i<cleanItem.params.length; i++) {
3836
var p = cleanItem.params[i];
3937
if (p.optional) syntax += '[';
4038
syntax += p.name;
@@ -172,4 +170,4 @@ define([
172170

173171
return itemView;
174172

175-
});
173+
});

docs/yuidoc-p5-theme-src/scripts/views/libraryView.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
define([
2-
'underscore',
3-
'backbone',
42
'App',
53
// Templates
64
'text!tpl/library.html'
7-
], function (_, Backbone, App, libraryTpl) {
5+
], function (App, libraryTpl) {
86

97
var libraryView = Backbone.View.extend({
108
el: '#list',
@@ -108,4 +106,4 @@ define([
108106

109107
return libraryView;
110108

111-
});
109+
});

docs/yuidoc-p5-theme-src/scripts/views/listView.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
define([
2-
'underscore',
3-
'backbone',
42
'App',
53
// Templates
64
'text!tpl/list.html'
7-
], function (_, Backbone, App, listTpl) {
5+
], function (App, listTpl) {
86
var striptags = function(html) {
97
var div = document.createElement('div');
108
div.innerHTML = html;

docs/yuidoc-p5-theme-src/scripts/views/menuView.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
define([
2-
'underscore',
3-
'backbone',
42
'App',
53
'text!tpl/menu.html'
6-
], function(_, Backbone, App, menuTpl) {
4+
], function(App, menuTpl) {
75

86
var menuView = Backbone.View.extend({
97
el: '#collection-list-nav',
@@ -20,7 +18,7 @@ define([
2018
* @returns {object} This view.
2119
*/
2220
render: function() {
23-
21+
2422
var groups = [];
2523
_.each(App.modules, function (item, i) {
2624
if (!item.is_submodule) {
@@ -64,4 +62,4 @@ define([
6462

6563
return menuView;
6664

67-
});
65+
});

0 commit comments

Comments
 (0)