Skip to content

Commit f800267

Browse files
build(package): remove and replace esm with cjs
1 parent 9a0fcc0 commit f800267

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jspm_packages
4343
# Build files
4444
cjs/
4545
docs/
46-
esm/
4746

4847
# Vim swap files
4948
*.swp

package.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
"description": "JSON Schema generator.",
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "cjs/index.js",
7-
"module": "esm/index.js",
8-
"exports": {
9-
"import": "./esm/index.js",
10-
"require": "./cjs/index.js"
11-
},
127
"scripts": {
13-
"build": "npm run build:cjs && npm run build:esm",
14-
"build:cjs": "tsc",
15-
"build:esm": "tsc --module nodenext --outDir esm",
8+
"build": "tsc",
169
"build:watch": "tsc --watch",
17-
"clean": "rm -rf cjs coverage docs esm",
10+
"clean": "rm -rf cjs coverage docs",
1811
"docs": "typedoc",
1912
"docs:watch": "npm run docs -- --watch",
2013
"lint": "eslint .",
@@ -24,7 +17,7 @@
2417
"prepublishOnly": "npm run lint && npm run lint:tsc && npm run test:ci && npm run test:esm && npm run clean && npm run build",
2518
"test": "jest",
2619
"test:ci": "CI=true jest --ci --colors --coverage",
27-
"test:esm": "npm run build:esm && node --test src",
20+
"test:esm": "npm run build && node --test src",
2821
"test:watch": "jest --watch"
2922
},
3023
"repository": {
@@ -70,8 +63,7 @@
7063
"typescript": "5.7.3"
7164
},
7265
"files": [
73-
"cjs/",
74-
"esm/"
66+
"cjs/"
7567
],
7668
"license": "MIT"
7769
}

src/index.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, it } from 'node:test';
22

33
import assert from 'assert';
44

5-
import { generateSchema } from '../esm/index.js';
5+
import { generateSchema } from '../cjs/index.js';
66

77
describe('generateSchema', () => {
88
it('exports function', () => {

0 commit comments

Comments
 (0)