allow importing @smogon/sprite-root to get root

This commit is contained in:
Christopher Monsanto
2020-09-15 02:55:10 -04:00
parent 080cbaff39
commit 194da704ad
7 changed files with 34 additions and 1 deletions

3
lib/root/index.ts Normal file
View File

@@ -0,0 +1,3 @@
import path = require('path');
export = path.resolve(__dirname, "../../../" /* extra path component is because we will be in dist/ */);

7
lib/root/package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"name": "@smogon/sprite-root",
"dependencies": {
"@types/node": "^14.10.1"
},
"main": "dist/index.js"
}

9
lib/root/tsconfig.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig-base",
"compilerOptions": {
"outDir": "dist",
// We need commonjs for __dirname
"module": "commonjs",
"esModuleInterop": false
}
}