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",
|
"license": "GPL-3.0-or-later",
|
||||||
"bin": "./dist/index.js",
|
"bin": "./dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "rollup -c",
|
"build": "tsc",
|
||||||
"lint": "eslint --fix src/**/*.ts",
|
"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:alpine": "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:linux": "pkg -t node18-linux-x64 -C brotli -o dist/wahpkg dist/index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^5.2.0",
|
"chalk": "^5.2.0",
|
||||||
|
@ -22,9 +22,6 @@
|
||||||
"type-fest": "^3.5.1"
|
"type-fest": "^3.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"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",
|
"@rushstack/eslint-patch": "^1.2.0",
|
||||||
"@types/fs-extra": "^11.0.1",
|
"@types/fs-extra": "^11.0.1",
|
||||||
"@types/proper-lockfile": "^4.1.2",
|
"@types/proper-lockfile": "^4.1.2",
|
||||||
|
@ -34,8 +31,6 @@
|
||||||
"@yarnpkg/sdks": "3.0.0-rc.35",
|
"@yarnpkg/sdks": "3.0.0-rc.35",
|
||||||
"eslint": "^8.31.0",
|
"eslint": "^8.31.0",
|
||||||
"pkg": "^5.8.0",
|
"pkg": "^5.8.0",
|
||||||
"rollup": "^3.10.0",
|
|
||||||
"rollup-plugin-typescript2": "^0.34.1",
|
|
||||||
"typescript": "^4.9.4"
|
"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": {
|
"compilerOptions": {
|
||||||
"module": "ESNext",
|
"module": "ES2022",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"lib": [
|
"lib": [
|
||||||
"ES2022",
|
"ES2022",
|
||||||
"dom"
|
"dom"
|
||||||
],
|
],
|
||||||
"target": "ESNext",
|
"target": "ES2022",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true
|
"esModuleInterop": true,
|
||||||
}
|
"outDir": "dist"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue