Skip to content

Commit

Permalink
cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed May 27, 2024
1 parent c39cb48 commit 02afdc8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 59 deletions.
3 changes: 2 additions & 1 deletion bin/ts-json-schema-generator.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/usr/bin/env node
import("../dist/ts-json-schema-generator.js");

require("../dist/ts-json-schema-generator.js");
81 changes: 37 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@
"name": "ts-json-schema-generator",
"version": "2.0.0",
"description": "Generate JSON schema from your Typescript sources",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"bin": {
"ts-json-schema-generator": "./bin/ts-json-schema-generator.js"
},
"files": [
"dist",
"cjs",
"src",
"factory",
"index.*",
"ts-json-schema-generator.*"
"keywords": [
"ts",
"typescript",
"json",
"schema",
"jsonschema"
],
"repository": {
"type": "git",
"url": "https://github.com/vega/ts-json-schema-generator.git"
},
"license": "MIT",
"author": {
"name": "Alexander Evtushenko",
"email": "aevtushenko@xiag.ch"
Expand All @@ -30,24 +28,32 @@
"email": "mooyoul@gmail.com"
}
],
"repository": {
"type": "git",
"url": "https://github.com/vega/ts-json-schema-generator.git"
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"ts-json-schema-generator": "./bin/ts-json-schema-generator.js"
},
"license": "MIT",
"keywords": [
"ts",
"typescript",
"json",
"schema",
"jsonschema"
"files": [
"dist",
"src",
"factory",
"index.*",
"ts-json-schema-generator.*"
],
"engines": {
"node": ">=18.0.0"
},
"exports": {
"import": "./dist/index.js",
"require": "./cjs/index.js"
"scripts": {
"build": "tsc",
"debug": "tsx --inspect-brk ts-json-schema-generator.ts",
"format": "eslint --fix",
"lint": "eslint",
"prepublishOnly": "yarn build",
"release": "yarn build && auto shipit",
"run": "tsx ts-json-schema-generator.ts",
"test": "jest test/ --verbose",
"test:coverage": "yarn jest test/ --collectCoverage=true",
"test:fast": "cross-env FAST_TEST=1 jest test/ --verbose",
"test:update": "cross-env UPDATE_SCHEMA=true yarn test:fast",
"watch": "tsc -w"
},
"dependencies": {
"@types/json-schema": "^7.0.15",
Expand Down Expand Up @@ -87,20 +93,7 @@
"vega": "^5.28.0",
"vega-lite": "^5.18.0"
},
"scripts": {
"prepublishOnly": "yarn build",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.json",
"watch": "tsc -w",
"lint": "eslint",
"format": "eslint --fix",
"test": "jest test/ --verbose",
"test:fast": "cross-env FAST_TEST=1 jest test/ --verbose",
"test:coverage": "yarn jest test/ --collectCoverage=true",
"test:update": "cross-env UPDATE_SCHEMA=true yarn test:fast",
"debug": "tsx --inspect-brk ts-json-schema-generator.ts",
"run": "tsx ts-json-schema-generator.ts",
"release": "yarn build && auto shipit"
"engines": {
"node": ">=18.0.0"
}
}
12 changes: 0 additions & 12 deletions tsconfig.cjs.json

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "Node16",
"module": "CommonJS",
"moduleResolution": "Node",
"esModuleInterop": true,
"isolatedModules": false,
"experimentalDecorators": true,
Expand Down

0 comments on commit 02afdc8

Please sign in to comment.