ant-design/scripts/generate-version.ts
lijianan c9bac13bc8
chore: Migrate CJS to ESM ()
* add devDependencies

* rerun ci

* rerun ci

* update

* update

* fix

* chore: update

* fix

* fix

---------

Co-authored-by: MadCcc <1075746765@qq.com>
2023-04-28 14:32:23 +08:00

12 lines
260 B
TypeScript

import fs from 'fs';
import path from 'path';
import localPackage from '../package.json';
const { version } = localPackage;
fs.writeFileSync(
path.join(__dirname, '..', 'components', 'version', 'version.ts'),
`export default '${version}';`,
'utf8',
);