mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
JSDocs: Clean up directory settings.
This commit is contained in:
parent
ad087738cd
commit
cb82bf3ff1
1 changed files with 9 additions and 6 deletions
|
@ -8,18 +8,21 @@ function publish(symbolSet) {
|
||||||
var renderMode = JSDOC.opt.D.renderMode;
|
var renderMode = JSDOC.opt.D.renderMode;
|
||||||
var templatedocs = renderMode == 'templatedocs';
|
var templatedocs = renderMode == 'templatedocs';
|
||||||
var extension = templatedocs ? '.jstl' : '.html';
|
var extension = templatedocs ? '.jstl' : '.html';
|
||||||
|
var templateDir = JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/';
|
||||||
|
var outDir = JSDOC.opt.d || SYS.pwd + '../out/jsdoc/';
|
||||||
|
|
||||||
publish.conf = { // trailing slash expected for dirs
|
publish.conf = { // trailing slash expected for dirs
|
||||||
outDir: JSDOC.opt.d || SYS.pwd + '../out/jsdoc/',
|
|
||||||
templateDir: JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/',
|
|
||||||
staticDir: (JSDOC.opt.t || SYS.pwd + '../templates/jsdoc/') + 'static/',
|
|
||||||
symbolsDir: renderMode == 'docs' ? 'packages/' : 'paper/',
|
symbolsDir: renderMode == 'docs' ? 'packages/' : 'paper/',
|
||||||
// Use no extensions in links for templatedocs
|
// Use no extensions in links for templatedocs
|
||||||
ext: templatedocs ? '' : extension,
|
ext: templatedocs ? '' : extension,
|
||||||
|
outDir: outDir,
|
||||||
|
templateDir: templateDir,
|
||||||
|
staticDir: templateDir + 'static/',
|
||||||
|
classesDir: outDir + 'classes/',
|
||||||
srcDir: 'symbols/src/',
|
srcDir: 'symbols/src/',
|
||||||
renderMode: renderMode,
|
renderMode: renderMode,
|
||||||
globalName: 'Global Scope'
|
globalName: 'Global Scope'
|
||||||
};
|
};
|
||||||
publish.conf.packagesDir = publish.conf.outDir + publish.conf.symbolsDir;
|
|
||||||
|
|
||||||
if (renderMode == 'docs') {
|
if (renderMode == 'docs') {
|
||||||
// Copy over the static files
|
// Copy over the static files
|
||||||
|
@ -29,7 +32,7 @@ function publish(symbolSet) {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Utils.deleteFiles(new File(publish.conf.outDir));
|
Utils.deleteFiles(new File(publish.conf.outDir));
|
||||||
new java.io.File(publish.conf.outDir + 'paper/').mkdirs();
|
new java.io.File(publish.conf.classesDir).mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
// used to allow Link to check the details of things being linked to
|
// used to allow Link to check the details of things being linked to
|
||||||
|
@ -85,7 +88,7 @@ function publish(symbolSet) {
|
||||||
title: symbol.alias
|
title: symbol.alias
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
IO.saveFile(publish.conf.packagesDir, name, html);
|
IO.saveFile(publish.conf.classesDir, name, html);
|
||||||
}
|
}
|
||||||
if (templatedocs) {
|
if (templatedocs) {
|
||||||
IO.saveFile(publish.conf.outDir, 'packages.js', Render.indexjs());
|
IO.saveFile(publish.conf.outDir, 'packages.js', Render.indexjs());
|
||||||
|
|
Loading…
Reference in a new issue