mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 15:13:09 +02:00
Refactor
This commit is contained in:
parent
3d321d4e69
commit
d42990f0b3
1 changed files with 17 additions and 17 deletions
|
@ -70,6 +70,7 @@ gulp.task('build:ts', () =>
|
||||||
.pipe(gulp.dest('./built/'))
|
.pipe(gulp.dest('./built/'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
gulp.task('build:about:docs', () => {
|
||||||
function getLicenseHtml(path: string): string {
|
function getLicenseHtml(path: string): string {
|
||||||
return escapeHtml(fs.readFileSync(path, 'utf-8'))
|
return escapeHtml(fs.readFileSync(path, 'utf-8'))
|
||||||
.replace(/\r\n/g, '\n')
|
.replace(/\r\n/g, '\n')
|
||||||
|
@ -87,7 +88,6 @@ function getLicenseSectionHtml(path: string): string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task('build:about:docs', () => {
|
|
||||||
const licenses = glob.sync('./node_modules/**/LICENSE*');
|
const licenses = glob.sync('./node_modules/**/LICENSE*');
|
||||||
const licenseHtml = getLicenseHtml('./LICENSE');
|
const licenseHtml = getLicenseHtml('./LICENSE');
|
||||||
const thirdpartyLicensesHtml = licenses.map(license => getLicenseSectionHtml(license)).join('');
|
const thirdpartyLicensesHtml = licenses.map(license => getLicenseSectionHtml(license)).join('');
|
||||||
|
|
Loading…
Reference in a new issue