Skip to content

Commit

Permalink
feat(build): remove commonjs build from published package (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak authored Jan 6, 2024
1 parent 92262ae commit fac62a2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 26 deletions.
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@
"author": "Wowser Contributors",
"repository": "github:wowserhq/scene",
"license": "MIT",
"main": "./dist/cjs/index.js",
"type": "module",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"exports": {
"require": "./dist/cjs/index.js",
"import": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts"
},
"files": [
"dist"
],
"scripts": {
"build": "npm run clean && npm run test && npm run build:cjs && npm run build:esm && npm run build:types && npm run build:package",
"build:cjs": "tsc --module commonjs --moduleResolution node --outDir ./dist/cjs",
"build:esm": "tsc --module es2022 --outDir ./dist/esm",
"build:types": "tsc --module es2022 --emitDeclarationOnly --declaration --declarationDir ./dist/types",
"build:package": "node ./script/build-package.js",
"clean": "node ./script/clean.js",
"build": "npm run clean && npm run test && npm run build:esm && npm run build:types",
"build:esm": "tsc --outDir ./dist/esm",
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir ./dist/types",
"clean": "node ./script/clean.mjs",
"format": "prettier ./src/**/* --write",
"lint": "eslint --ignore-path .gitignore",
"lint:commit": "commitlint --edit",
Expand Down
12 changes: 0 additions & 12 deletions script/build-package.js

This file was deleted.

3 changes: 0 additions & 3 deletions script/clean.js

This file was deleted.

3 changes: 3 additions & 0 deletions script/clean.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import fs from 'fs-extra';

fs.removeSync('./dist');
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"include": ["./src/lib/**/*"],
"compilerOptions": {
"target": "es2022",
"allowJs": true,
"module": "node16",
"skipLibCheck": true,
"sourceMap": true,
"esModuleInterop": true,
"moduleResolution": "node"
"esModuleInterop": true
}
}

0 comments on commit fac62a2

Please sign in to comment.