remove need for rollup
This commit is contained in:
parent
0121666f8c
commit
e50b5c2e78
3 changed files with 11 additions and 51 deletions
11
package.json
11
package.json
|
@ -7,10 +7,10 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"bin": "./dist/index.js",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"build": "tsc",
|
||||
"lint": "eslint --fix src/**/*.ts",
|
||||
"package:alpine": "rollup -c --environment PRODUCTION && pkg -t node18-alpine-x64 -C brotli -o dist/wahpkg dist/index.js",
|
||||
"package:linux": "rollup -c --environment PRODUCTION && pkg -t node18-linux-x64 -C brotli -o dist/wahpkg dist/index.js"
|
||||
"package:alpine": "pkg -t node18-alpine-x64 -C brotli -o dist/wahpkg dist/index.js",
|
||||
"package:linux": "pkg -t node18-linux-x64 -C brotli -o dist/wahpkg dist/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^5.2.0",
|
||||
|
@ -22,9 +22,6 @@
|
|||
"type-fest": "^3.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^24.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-terser": "^0.3.0",
|
||||
"@rushstack/eslint-patch": "^1.2.0",
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/proper-lockfile": "^4.1.2",
|
||||
|
@ -34,8 +31,6 @@
|
|||
"@yarnpkg/sdks": "3.0.0-rc.35",
|
||||
"eslint": "^8.31.0",
|
||||
"pkg": "^5.8.0",
|
||||
"rollup": "^3.10.0",
|
||||
"rollup-plugin-typescript2": "^0.34.1",
|
||||
"typescript": "^4.9.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import process from 'node:process';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
|
||||
let rollup = {};
|
||||
|
||||
if (process.env.PRODUCTION) {
|
||||
rollup = {
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
dir: 'dist',
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [
|
||||
commonjs(),
|
||||
nodeResolve({ exportConditions: ['node'] }),
|
||||
typescript(),
|
||||
terser(),
|
||||
],
|
||||
};
|
||||
} else {
|
||||
rollup = {
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
dir: 'dist',
|
||||
format: 'esm',
|
||||
},
|
||||
plugins: [
|
||||
commonjs(),
|
||||
nodeResolve({ exportConditions: ['node'] }),
|
||||
typescript(),
|
||||
],
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export default rollup;
|
|
@ -1,13 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "NodeNext",
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"dom"
|
||||
],
|
||||
"target": "ESNext",
|
||||
"target": "ES2022",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true
|
||||
}
|
||||
"esModuleInterop": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
||||
|
|
Reference in a new issue