Fix paths for twemoji and font-awesome

This commit is contained in:
Norm 2022-08-26 00:31:17 -04:00
parent b230dc98a9
commit 33146ffa5e
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE
2 changed files with 4 additions and 4 deletions

View file

@ -16,11 +16,11 @@ gulp.task('copy:backend:views', () =>
);
gulp.task('copy:client:fonts', () =>
gulp.src('./packages/client/node_modules/three/examples/fonts/**/*').pipe(gulp.dest('./built/_client_dist_/fonts/'))
gulp.src('./node_modules/three/examples/fonts/**/*').pipe(gulp.dest('./built/_client_dist_/fonts/'))
);
gulp.task('copy:client:fontawesome', () =>
gulp.src('./packages/client/node_modules/@fortawesome/fontawesome-free/**/*').pipe(gulp.dest('./built/_client_dist_/fontawesome/'))
gulp.src('./node_modules/@fortawesome/fontawesome-free/**/*').pipe(gulp.dest('./built/_client_dist_/fontawesome/'))
);
gulp.task('copy:client:locales', cb => {

View file

@ -136,7 +136,7 @@ router.get('/twemoji/(.*)', async ctx => {
ctx.set('Content-Security-Policy', 'default-src \'none\'; style-src \'unsafe-inline\'');
await send(ctx as any, path, {
root: `${_dirname}/../../../node_modules/@discordapp/twemoji/dist/svg/`,
root: `${_dirname}/../../../../../node_modules/@discordapp/twemoji/dist/svg/`,
maxage: 30 * DAY,
});
});
@ -150,7 +150,7 @@ router.get('/twemoji-badge/(.*)', async ctx => {
}
const mask = await sharp(
`${_dirname}/../../../node_modules/@discordapp/twemoji/dist/svg/${path.replace('.png', '')}.svg`,
`${_dirname}/../../../../../node_modules/@discordapp/twemoji/dist/svg/${path.replace('.png', '')}.svg`,
{ density: 1000 },
)
.resize(488, 488)