@compodoc/compodoc
Advanced tools
Comparing version 1.0.0-beta.4 to 1.0.0-beta.5
@@ -0,1 +1,10 @@ | ||
<a name="1.0.0-beta.5"></a> | ||
# [1.0.0-beta.5](https://github.com/compodoc/compodoc/compare/1.0.0-beta.4...1.0.0-beta.5) (2017-04-22) | ||
### Bug Fixes | ||
* **modules:** module graph controls JS error with file:// ([6d4be23](https://github.com/compodoc/compodoc/commit/6d4be23)), closes [#153](https://github.com/compodoc/compodoc/issues/153) [#159](https://github.com/compodoc/compodoc/issues/159) | ||
* **component:** custom treatment of the metadata field `template` ([1bbda74](https://github.com/compodoc/compodoc/commit/1bbda74)), closes [#137](https://github.com/compodoc/compodoc/issues/137) | ||
* **component:** loading template from another component fails ([1bbda74](https://github.com/compodoc/compodoc/commit/1bbda74)), closes [#147](https://github.com/compodoc/compodoc/issues/147) | ||
<a name="1.0.0-beta.4"></a> | ||
@@ -2,0 +11,0 @@ # [1.0.0-beta.4](https://github.com/compodoc/compodoc/compare/1.0.0-beta.3...1.0.0-beta.4) (2017-04-20) |
{ | ||
"name": "@compodoc/compodoc", | ||
"version": "1.0.0-beta.4", | ||
"version": "1.0.0-beta.5", | ||
"description": "The missing documentation tool for your Angular application", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -226,3 +226,3 @@ import * as ts from 'typescript'; | ||
.then(res => { | ||
this.processPages(); | ||
this.processGraphs(); | ||
}) | ||
@@ -282,3 +282,3 @@ .catch(errorMessage => { | ||
.then(res => { | ||
this.processPages(); | ||
this.processGraphs(); | ||
}) | ||
@@ -1043,2 +1043,12 @@ .catch(errorMessage => { | ||
logger.info('Copy main resources'); | ||
const onComplete = () => { | ||
let finalTime = (new Date() - startTime) / 1000; | ||
logger.info('Documentation generated in ' + this.configuration.mainData.output + ' in ' + finalTime + ' seconds using ' + this.configuration.mainData.theme + ' theme'); | ||
if (this.configuration.mainData.serve) { | ||
logger.info(`Serving documentation from ${this.configuration.mainData.output} at http://127.0.0.1:${this.configuration.mainData.port}`); | ||
this.runWebServer(this.configuration.mainData.output); | ||
} | ||
}; | ||
fs.copy(path.resolve(__dirname + '/../src/resources/'), path.resolve(process.cwd() + path.sep + this.configuration.mainData.output), (err) => { | ||
@@ -1055,3 +1065,3 @@ if(err) { | ||
logger.info('External styling theme copy succeeded'); | ||
this.processGraphs(); | ||
onComplete(); | ||
} | ||
@@ -1061,3 +1071,3 @@ }); | ||
else { | ||
this.processGraphs(); | ||
onComplete(); | ||
} | ||
@@ -1070,15 +1080,6 @@ } | ||
const onComplete = () => { | ||
let finalTime = (new Date() - startTime) / 1000; | ||
logger.info('Documentation generated in ' + this.configuration.mainData.output + ' in ' + finalTime + ' seconds using ' + this.configuration.mainData.theme + ' theme'); | ||
if (this.configuration.mainData.serve) { | ||
logger.info(`Serving documentation from ${this.configuration.mainData.output} at http://127.0.0.1:${this.configuration.mainData.port}`); | ||
this.runWebServer(this.configuration.mainData.output); | ||
} | ||
}; | ||
if (this.configuration.mainData.disableGraph) { | ||
logger.info('Graph generation disabled'); | ||
onComplete(); | ||
this.processPages(); | ||
@@ -1100,4 +1101,9 @@ } else { | ||
$ngdengine.renderGraph(modules[i].file, finalPath, 'f', modules[i].name).then(() => { | ||
i++; | ||
loop(); | ||
$ngdengine.readGraph(path.resolve(finalPath + path.sep + 'dependencies.svg'), modules[i].name).then((data) => { | ||
modules[i].graph = <string>data; | ||
i++; | ||
loop(); | ||
}, (err) => { | ||
logger.error('Error during graph read: ', err); | ||
}); | ||
}, (errorMessage) => { | ||
@@ -1107,3 +1113,3 @@ logger.error(errorMessage); | ||
} else { | ||
onComplete(); | ||
this.processPages(); | ||
} | ||
@@ -1117,3 +1123,8 @@ }; | ||
$ngdengine.renderGraph(this.configuration.mainData.tsconfig, path.resolve(finalMainGraphPath), 'p').then(() => { | ||
loop(); | ||
$ngdengine.readGraph(path.resolve(finalMainGraphPath + path.sep + 'dependencies.svg'), 'Main graph').then((data) => { | ||
this.configuration.mainData.mainGraph = <string>data; | ||
loop(); | ||
}, (err) => { | ||
logger.error('Error during graph read: ', err); | ||
}); | ||
}, (err) => { | ||
@@ -1120,0 +1131,0 @@ logger.error('Error during graph generation: ', err); |
@@ -55,2 +55,3 @@ import { COMPODOC_DEFAULTS } from '../utils/defaults'; | ||
watch: boolean; | ||
mainGraph: string; | ||
} | ||
@@ -57,0 +58,0 @@ |
import * as path from 'path'; | ||
import * as fs from 'fs-extra'; | ||
import * as Shelljs from 'shelljs'; | ||
@@ -14,6 +15,4 @@ import * as _ from 'lodash'; | ||
export class NgdEngine { | ||
constructor() { | ||
} | ||
renderGraph(filepath: String, outputpath: String, type: String, name?: string) { | ||
constructor() {} | ||
renderGraph(filepath: string, outputpath: string, type: string, name?: string) { | ||
return new Promise(function(resolve, reject) { | ||
@@ -45,2 +44,13 @@ ngdCr.logger.silent = false; | ||
} | ||
readGraph(filepath: string, name: string) { | ||
return new Promise(function(resolve, reject) { | ||
fs.readFile(path.resolve(filepath), 'utf8', (err, data) => { | ||
if (err) { | ||
reject('Error during graph read ' + name); | ||
} else { | ||
resolve(data); | ||
} | ||
}); | ||
}); | ||
} | ||
}; |
@@ -139,3 +139,3 @@ import * as fs from 'fs-extra'; | ||
console.log(__dirname); | ||
console.log(fs.readFileSync(path.join(__dirname, '../src/resources/banner')).toString()); | ||
console.log(fs.readFileSync(path.join(__dirname, '../src/resources/images/banner')).toString()); | ||
console.log(pkg.version); | ||
@@ -142,0 +142,0 @@ console.log(''); |
document.addEventListener('DOMContentLoaded', function() { | ||
document.getElementById('demo-svg').addEventListener('load', function() { | ||
panZoom = svgPanZoom('#demo-svg', { | ||
zoomEnabled: true, | ||
minZoom: 1, | ||
maxZoom: 5 | ||
}); | ||
panZoom = svgPanZoom(document.getElementById('module-graph-svg').querySelector('svg'), { | ||
zoomEnabled: true, | ||
minZoom: 1, | ||
maxZoom: 5 | ||
}); | ||
document.getElementById('zoom-in').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.zoomIn(); | ||
}); | ||
document.getElementById('zoom-in').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.zoomIn(); | ||
}); | ||
document.getElementById('zoom-out').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.zoomOut(); | ||
}); | ||
document.getElementById('zoom-out').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.zoomOut(); | ||
}); | ||
document.getElementById('reset').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.resetZoom(); | ||
panZoom.resetPan(); | ||
}); | ||
document.getElementById('reset').addEventListener('click', function(ev) { | ||
ev.preventDefault(); | ||
panZoom.resetZoom(); | ||
panZoom.resetPan(); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4454105
30164