Skip to content

Commit 2c70fde

Browse files
committed
chore: get pbconfig generic info from a common file
1 parent 3732c81 commit 2c70fde

File tree

3 files changed

+55
-64
lines changed

3 files changed

+55
-64
lines changed

src/MangaWorld/pbconfig.ts

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,12 @@
1-
import {
2-
ContentRating,
3-
SourceIntents,
4-
type ExtensionInfo,
5-
} from "@paperback/types";
1+
import { ContentRating } from "@paperback/types";
2+
import { basePbConfig } from "../generic/basePbConfig";
63

7-
export default {
8-
name: "MangaWorld",
9-
description: "Extension that pulls manga from MangaWorld.",
10-
version: "1.0.0-alpha.1",
11-
icon: "icon.png",
12-
language: "it",
13-
contentRating: ContentRating.EVERYONE,
14-
capabilities: [
15-
SourceIntents.CHAPTER_PROVIDING,
16-
SourceIntents.DISCOVER_SECIONS_PROVIDING,
17-
SourceIntents.SEARCH_RESULTS_PROVIDING,
18-
SourceIntents.SETTINGS_FORM_PROVIDING,
19-
],
20-
badges: [
21-
{
22-
label: "Italian",
23-
textColor: "#ffffff",
24-
backgroundColor: "#9ad3c7",
25-
},
26-
],
27-
developers: [
28-
{
29-
name: "Catta1997",
30-
website: "https://github.com/Catta1997",
31-
},
32-
],
33-
} satisfies ExtensionInfo;
4+
const pbConfig = basePbConfig;
5+
6+
pbConfig.name = "MangaWorld";
7+
pbConfig.description = "Extension that pulls manga from MangaWorld.";
8+
pbConfig.language = "it";
9+
pbConfig.icon = "icon.png";
10+
pbConfig.contentRating = ContentRating.EVERYONE;
11+
12+
export default pbConfig;

src/MangaWorldAdult/pbconfig.ts

Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,12 @@
1-
import {
2-
ContentRating,
3-
SourceIntents,
4-
type ExtensionInfo,
5-
} from "@paperback/types";
1+
import { ContentRating } from "@paperback/types";
2+
import { basePbConfig } from "../generic/basePbConfig";
63

7-
export default {
8-
name: "MangaWorldAdult",
9-
description: "Extension that pulls manga from MangaWorldAdult.",
10-
version: "1.0.0-alpha.1",
11-
icon: "icon.png",
12-
language: "it",
13-
contentRating: ContentRating.ADULT,
14-
capabilities: [
15-
SourceIntents.CHAPTER_PROVIDING,
16-
SourceIntents.DISCOVER_SECIONS_PROVIDING,
17-
SourceIntents.SEARCH_RESULTS_PROVIDING,
18-
SourceIntents.SETTINGS_FORM_PROVIDING,
19-
],
20-
badges: [
21-
{
22-
label: "Italian",
23-
textColor: "#ffffff",
24-
backgroundColor: "#9ad3c7",
25-
},
26-
],
27-
developers: [
28-
{
29-
name: "Catta1997",
30-
website: "https://github.com/Catta1997",
31-
},
32-
],
33-
} satisfies ExtensionInfo;
4+
const pbConfig = basePbConfig;
5+
6+
pbConfig.name = "MangaWorldAdult";
7+
pbConfig.description = "Extension that pulls manga from MangaWorldAdult.";
8+
pbConfig.language = "it";
9+
pbConfig.icon = "icon.png";
10+
pbConfig.contentRating = ContentRating.ADULT;
11+
12+
export default pbConfig;

src/generic/basePbConfig.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import {
2+
ContentRating,
3+
SourceIntents,
4+
type ExtensionInfo,
5+
} from "@paperback/types";
6+
7+
export const basePbConfig = {
8+
name: "",
9+
description: "",
10+
version: "1.0.0-alpha.1",
11+
icon: "",
12+
language: "",
13+
capabilities: [
14+
SourceIntents.CHAPTER_PROVIDING,
15+
SourceIntents.DISCOVER_SECIONS_PROVIDING,
16+
SourceIntents.SEARCH_RESULTS_PROVIDING,
17+
SourceIntents.SETTINGS_FORM_PROVIDING,
18+
],
19+
badges: [
20+
{
21+
label: "Italian 🇮🇹",
22+
textColor: "#ffffff",
23+
backgroundColor: "#28eac2",
24+
},
25+
],
26+
developers: [
27+
{
28+
name: "Catta1997",
29+
website: "https://github.com/Catta1997",
30+
},
31+
],
32+
contentRating: "SAFE" as ContentRating,
33+
} satisfies ExtensionInfo;

0 commit comments

Comments
 (0)