|
3 | 3 | "version": "14.0.0",
|
4 | 4 | "description": "Format whitespace in a SQL query to make it more readable",
|
5 | 5 | "license": "MIT",
|
6 |
| - "main": "dist/sql-formatter.min.cjs", |
| 6 | + "main": "dist/index.cjs", |
| 7 | + "module": "dist/index.js", |
7 | 8 | "unpkg": "dist/sql-formatter.min.js",
|
8 |
| - "module": "lib/index.js", |
9 |
| - "types": "lib/src/index.d.ts", |
10 | 9 | "exports": {
|
11 | 10 | "./package.json": "./package.json",
|
12 | 11 | ".": {
|
13 |
| - "types": "./lib/src/index.d.ts", |
14 |
| - "import": "./lib/index.js", |
15 |
| - "require": "./dist/sql-formatter.min.cjs" |
| 12 | + "import": "./dist/index.js", |
| 13 | + "require": "./dist/index.cjs" |
16 | 14 | }
|
17 | 15 | },
|
18 | 16 | "bin": {
|
|
64 | 62 | "prepare": "yarn clean && yarn grammar && yarn fix && yarn check && yarn build",
|
65 | 63 | "pre-commit": "npm-run-all --parallel ts:changes lint:changes",
|
66 | 64 | "grammar": "nearleyc src/parser/grammar.ne -o src/parser/grammar.ts",
|
67 |
| - "build:babel": "babel src --out-dir lib --extensions .ts --source-maps", |
68 |
| - "build:types": "tsc --emitDeclarationOnly --isolatedModules", |
69 |
| - "build:minified": "webpack --config webpack.prod.js && cp dist/sql-formatter.min.cjs dist/sql-formatter.min.js", |
70 |
| - "build": "yarn grammar && npm-run-all --parallel build:babel build:types build:minified", |
| 65 | + "build:tsup": "tsup src/index.ts --format cjs,esm --sourcemap --dts", |
| 66 | + "build:webpack": "webpack --config webpack.prod.js && cp dist/sql-formatter.min.cjs dist/sql-formatter.min.js", |
| 67 | + "build": "yarn grammar && npm-run-all --parallel build:tsup build:webpack", |
71 | 68 | "release": "release-it"
|
72 | 69 | },
|
73 | 70 | "repository": {
|
|
113 | 110 | "rimraf": "^3.0.2",
|
114 | 111 | "ts-jest": "^28.0.5",
|
115 | 112 | "ts-loader": "^9.3.1",
|
| 113 | + "tsup": "^8.0.1", |
116 | 114 | "typescript": "^4.7.4",
|
117 | 115 | "webpack": "^5.74.0",
|
118 | 116 | "webpack-cli": "^4.9.1",
|
|
0 commit comments