mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Parser now includes Matter defs and AlphaSingle component
This commit is contained in:
parent
51aa5d019d
commit
9ad53daf72
3 changed files with 12 additions and 14 deletions
|
@ -24,15 +24,10 @@ class Parser {
|
|||
}
|
||||
emit() {
|
||||
let ignored = [];
|
||||
let result = this.topLevel.reduce((out, obj) => {
|
||||
// TODO: remove once stable
|
||||
// if (<string>obj.kind === 'property') {
|
||||
// ignored.push((<any>obj).name);
|
||||
// return out;
|
||||
// }
|
||||
//////////////////////////
|
||||
let result = '/// <reference types="./matter" />\n\n';
|
||||
result = result.concat(this.topLevel.reduce((out, obj) => {
|
||||
return out + dom.emit(obj);
|
||||
}, '');
|
||||
}, ''));
|
||||
if (ignored.length > 0) {
|
||||
console.log('ignored top level properties:');
|
||||
console.log(ignored);
|
||||
|
@ -45,6 +40,7 @@ class Parser {
|
|||
// TODO: Custom temporary rules
|
||||
switch (doclet.longname) {
|
||||
case 'Phaser.GameObjects.Components.Alpha':
|
||||
case 'Phaser.GameObjects.Components.AlphaSingle':
|
||||
case 'Phaser.GameObjects.Components.Animation':
|
||||
case 'Phaser.GameObjects.Components.BlendMode':
|
||||
case 'Phaser.GameObjects.Components.ComputedSize':
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -37,12 +37,13 @@ export class Parser {
|
|||
|
||||
emit() {
|
||||
|
||||
const matter = '/// <reference types="matter" />';
|
||||
|
||||
let ignored = [];
|
||||
let result = this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => {
|
||||
return matter + '\n\n' + out + dom.emit(obj);
|
||||
}, '');
|
||||
|
||||
let result = '/// <reference types="./matter" />\n\n';
|
||||
|
||||
result = result.concat(this.topLevel.reduce((out: string, obj: dom.TopLevelDeclaration) => {
|
||||
return out + dom.emit(obj);
|
||||
}, ''));
|
||||
|
||||
if (ignored.length > 0)
|
||||
{
|
||||
|
@ -62,6 +63,7 @@ export class Parser {
|
|||
switch (doclet.longname)
|
||||
{
|
||||
case 'Phaser.GameObjects.Components.Alpha':
|
||||
case 'Phaser.GameObjects.Components.AlphaSingle':
|
||||
case 'Phaser.GameObjects.Components.Animation':
|
||||
case 'Phaser.GameObjects.Components.BlendMode':
|
||||
case 'Phaser.GameObjects.Components.ComputedSize':
|
||||
|
|
Loading…
Reference in a new issue