Skip to content

Commit 19bfd38

Browse files
committed
Complete "tsdocs" tasks to download plugins
Complete the tsdocs task to download automatically the phaser-plugins and scan their comments to add them in the phaser.comments.d.ts where the plugins classes are defined.
1 parent 547aa8d commit 19bfd38

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

Gruntfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// <binding />
12
module.exports = function (grunt) {
23

34
var loadConfig = require('load-grunt-config');
@@ -22,5 +23,5 @@ module.exports = function (grunt) {
2223

2324
grunt.registerTask('docs', [ 'clean:docs', 'pixidoc', 'builddoc', 'replace:docs', 'clean:out']);
2425

25-
grunt.registerTask('tsdocs', ['pixidoc', 'exportdocjson', 'buildtsdoc:pixi', 'buildtsdoc:phaser', 'replace:phasertsdefheader', 'clean:out']);
26+
grunt.registerTask('tsdocs', ['clean:out', 'pixidoc', 'gitclone:plugins', 'exportdocjson', 'buildtsdoc:pixi', 'buildtsdoc:phaser', 'replace:phasertsdefheader', 'clean:out']);
2627
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"yuidocjs": "^0.3.50",
4545
"jsdoc": "~3.3.0-alpha10",
4646
"grunt-jsdoc": "~0.5.7",
47-
"typescript-services": "~0.1.5"
47+
"typescript-services": "~0.1.5",
48+
"grunt-git": "^0.3.3"
4849
}
4950
}

tasks/jsdocexportjson-conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"./src/tilemap/",
2222
"./src/time/",
2323
"./src/tween/",
24-
"./src/utils/"
24+
"./src/utils/",
25+
"./out/plugins/"
2526
],
2627
"includePattern": ".+\\.js(doc)?$",
2728
"excludePattern": "(^|\\/|\\\\)_"

tasks/options/gitclone.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
plugins: {
3+
options: {
4+
repository: "https://github.com/photonstorm/phaser-plugins",
5+
branch: "master",
6+
directory: "out/plugins"
7+
}
8+
}
9+
};

0 commit comments

Comments
 (0)