remove legacy rollup file

This commit is contained in:
Florian Dold 2023-02-21 21:42:01 +01:00
parent eff3617092
commit 71707e5d45
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -1,58 +0,0 @@
// rollup.config.js
import commonjs from "@rollup/plugin-commonjs";
import nodeResolve from "@rollup/plugin-node-resolve";
import json from "@rollup/plugin-json";
import builtins from "builtin-modules";
import pkg from "./package.json";
import sourcemaps from "rollup-plugin-sourcemaps";
import path from "path";
import replace from "@rollup/plugin-replace";
import child_process from 'child_process';
const printedVersion = `${pkg.version}-${getGitRevision()}`
export default {
input: "lib/index.js",
output: {
file: pkg.main,
format: "es",
sourcemap: true,
sourcemapPathTransform: (relativeSourcePath, sourcemapPath) => {
// Transform to source map paths to virtual path. Otherwise,
// error messages would contain paths that look like they should exist (relative to
// the bundle) but don't.
const res = path.normalize(
path.join("/_walletsrc/packages/taler-wallet-cli/src/", relativeSourcePath),
);
return res;
},
},
external: builtins,
plugins: [
replace({
__VERSION__: `"${printedVersion}"`,
preventAssignment: true,
}),
nodeResolve({
preferBuiltins: true,
exportConditions: ["node"],
}),
sourcemaps(),
commonjs({
sourceMap: true,
transformMixedEsModules: true,
}),
json(),
],
};
function getGitRevision() {
return child_process.execSync(`git rev-parse --short HEAD`, {
encoding: 'utf-8',
windowsHide: true,
}).trim();
}