mirror of
https://github.com/MercuryWorkshop/bare-mux.git
synced 2025-05-15 07:10:00 -04:00
report the proper bare-mux version
This commit is contained in:
parent
769701d34c
commit
7ba90cb0cb
3 changed files with 15 additions and 3 deletions
|
@ -1,7 +1,12 @@
|
|||
import inject from '@rollup/plugin-inject';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
|
||||
const pkg = JSON.parse(await readFile('package.json'));
|
||||
process.env.BARE_MUX_VERSION = pkg.version;
|
||||
|
||||
/**
|
||||
* @typedef {import('rollup').OutputOptions} OutputOptions
|
||||
* @typedef {import('rollup').RollupOptions} RollupOptions
|
||||
|
@ -22,6 +27,11 @@ const commonPlugins = () => [
|
|||
)
|
||||
)
|
||||
),
|
||||
replace({
|
||||
'process.env.BARE_MUX_VERSION': JSON.stringify(
|
||||
process.env.BARE_MUX_VERSION
|
||||
),
|
||||
}),
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue