Skip to content

Commit 03eb456

Browse files
author
zaid450
committed
fix: ESM export and export all related structures
1 parent 8eef561 commit 03eb456

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tests/
22
node_modules/
33
dist/
4+
esm/
45
*.config.js

esm/index.mjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1-
const {QuizizzClient} = require("../dist/index.js");
1+
const QuizizzJS = require("../dist/index.js");
22

3-
export { QuizizzClient };
3+
export const QuizizzJS;
4+
5+
export const {
6+
QuizizzClient,
7+
Question,
8+
User,
9+
Quiz,
10+
Structure,
11+
RequestError
12+
} = QuizizzJS

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require": "./dist/index.js"
2424
},
2525
"scripts": {
26-
"build": "tsc",
26+
"build": "tsc --project tsconfig.json",
2727
"test": "npm run build && npm run test",
2828
"lint": "npx eslint src/ --fix",
2929
"docs": "typedoc --options typedoc.json"

src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
import QuizizzClient from "./QuizizzClient";
2+
import Question from "./structures/Question";
3+
import Quiz from "./structures/Quiz";
4+
import RequestError from "./structures/RequestError";
5+
import Structure from "./structures/Structure";
6+
import User from "./structures/User";
27

3-
export { QuizizzClient };
8+
export { QuizizzClient, Question, User, Quiz, Structure, RequestError };

0 commit comments

Comments
 (0)