Skip to content

Commit

Permalink
bundle ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibo committed Nov 20, 2022
1 parent 28ba94e commit 6fe63d1
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"esbuild": "^0.15.14",
"eslint": "^8.27.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.5",
Expand All @@ -23,6 +22,7 @@
"sanitize-html": "^2.7.3",
"smogon": "^2.0.20",
"subpkg": "^4.1.0",
"tsup": "^6.5.0",
"typescript": "^4.9.3",
"wrapr": "^0.0.2"
},
Expand Down
20 changes: 13 additions & 7 deletions pkmn/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "@pkmn/smogon",
"version": "0.0.23",
"main": "build/index.js",
"types": "build/index.d.ts",
"version": "0.1.0",
"description": "A rich client for processed and aggregated Smogon analysis and moveset information",
"homepage": "https://data.pkmn.cc/",
"repository": "github:pkmn/smogon",
"license": "MIT",
"sideEffects": false,
"main": "build/index.js",
"module": "build/index.mjs",
"types": "build/index.d.ts",
"publishConfig": {
"access": "public"
},
"files": [
"build",
"!build/*.test.*",
"index.ts"
"build"
],
"dependencies": {
"@pkmn/data": "^0.6.2"
Expand All @@ -25,11 +25,17 @@
"lint": "eslint --cache *.ts",
"fix": "eslint --fix *.ts",
"compile": "tsc -p .",
"build": "npm run compile",
"build": "npm run compile && tsup index.ts",
"test": "jest",
"pretest": "npm run build",
"posttest": "npm run lint"
},
"tsup": {
"outDir": "build",
"format": ["cjs", "esm"],
"sourcemap": true,
"dts": true
},
"jest": {
"testEnvironment": "node",
"testPathIgnorePatterns": [
Expand Down
1 change: 0 additions & 1 deletion pkmn/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "build",
"tsBuildInfoFile": ".tsbuildinfo",
},
"files": ["index.ts", "index.test.ts"]
Expand Down
21 changes: 13 additions & 8 deletions smogon/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
{
"name": "smogon",
"version": "2.0.20",
"main": "build/index.js",
"types": "build/index.d.ts",
"version": "2.1.0",
"description": "Low-level wrapper around Smogon's analyses and usage statistics",
"homepage": "https://smogon.com/",
"repository": "github:pkmn/smogon",
"license": "MIT",
"sideEffects": false,
"main": "build/index.mjs",
"module": "build/index.js",
"types": "build/index.d.ts",
"files": [
"build",
"!build/fixtures.json",
"!build/*.test.*",
"index.ts"
"build"
],
"scripts": {
"lint": "eslint --cache *.ts",
"fix": "eslint --fix *.ts",
"compile": "node compile-fixtures && tsc -p .",
"build": "npm run compile",
"build": "npm run compile && tsup index.ts",
"test": "jest",
"pretest": "npm run build",
"posttest": "npm run lint"
},
"tsup": {
"outDir": "build",
"format": ["cjs", "esm"],
"sourcemap": true,
"dts": true
},
"jest": {
"testEnvironment": "node",
"testPathIgnorePatterns": [
Expand Down
1 change: 0 additions & 1 deletion smogon/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "build",
"resolveJsonModule": true,
"tsBuildInfoFile": ".tsbuildinfo"
},
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"incremental": true,
"lib": ["es2016"],
"module": "commonjs",
"noEmitOnError": true,
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"sourceMap": true,
Expand Down

0 comments on commit 6fe63d1

Please sign in to comment.