mirror of
https://github.com/molstar/molstar.git
synced 2026-06-04 13:30:24 +08:00
* production build using esbuild * build browser tests with esbuild * use tsc-alias * remove webpack * changelog * update eslint to v9 * pr feedback * update build * include src map by default
16 lines
586 B
JavaScript
16 lines
586 B
JavaScript
/**
|
|
* Copyright (c) 2025 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
*
|
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
*/
|
|
|
|
import * as fs from 'fs';
|
|
|
|
const VERSION = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version;
|
|
const TIMESTAMP = Date.now();
|
|
const file = `export var PLUGIN_VERSION = '${VERSION}';\nexport var PLUGIN_VERSION_DATE = new Date(${TIMESTAMP})`;
|
|
const files = ['./lib/mol-plugin/version.js', './lib/commonjs/mol-plugin/version.js'];
|
|
for (const f of files) {
|
|
if (!fs.existsSync(f)) continue;
|
|
fs.writeFileSync(f, file);
|
|
} |