Remove needless type annotations

This commit is contained in:
syuilo 2017-01-18 14:32:03 +09:00
parent f0e7a3f976
commit ac2e820e7e

View file

@ -71,14 +71,14 @@ gulp.task('build:ts', () =>
);
gulp.task('build:about:docs', () => {
function getLicenseHtml(path: string): string {
function getLicenseHtml(path: string) {
return escapeHtml(fs.readFileSync(path, 'utf-8'))
.replace(/\r\n/g, '\n')
.replace(/(.)\n(.)/g, '$1 $2')
.replace(/(^|\n)(.*?)($|\n)/g, '<p>$2</p>');
}
function getLicenseSectionHtml(path: string): string {
function getLicenseSectionHtml(path: string) {
try {
const pkg = JSON.parse(fs.readFileSync(Path.parse(path).dir + '/package.json', 'utf-8'));
const licenseHtml = getLicenseHtml(path);