Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Re-export module as MJS #70

Merged
merged 3 commits into from
Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import R6APIModule from './dist/index.js';

const { default: R6API, fetch, typings, constants, utils } = R6APIModule;

export default R6API;
export { fetch, typings, constants, utils };
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
"description": "Node.js wrapper around Rainbow Six: Siege API.",
"author": "Daniel Sandberg",
"license": "MIT",
"main": "dist/index.js",
"types": "dist",
"main": "./dist/index.js",
"types": "./dist",
"module": "./index.mjs",
"exports": {
"import": "./index.mjs",
"require": "./dist/index.js"
},
"scripts": {
"build": "tsc",
"example": "yarn build && ts-node --project scripts/tsconfig.json scripts/example",
Expand Down Expand Up @@ -38,6 +43,7 @@
},
"files": [
"dist",
"index.mjs",
"docs",
"examples"
],
Expand Down