@preval sourceCode

This commit is contained in:
Alex Gleason
2021-03-30 12:43:45 -05:00
parent dfa1443832
commit f97bba2308
2 changed files with 12 additions and 10 deletions

11
app/soapbox/utils/code.js Normal file
View File

@ -0,0 +1,11 @@
// @preval
const pkg = require('../../../package.json');
const shortRepoName = url => new URL(url).pathname.substring(1);
module.exports = {
name: pkg.name,
url: pkg.repository.url,
repository: shortRepoName(pkg.repository.url),
version: pkg.version,
};