ant-design/scripts/generate-version.js
二货爱吃白萝卜 222811d582
chore: add gitignore (#42101)
* chore: add gitignore

* chore: clean all

* chore: clean all

* chore: clean all

* chore: keep style

* chore: modify script

* chore: fix tsc
2023-05-04 10:14:01 +08:00

13 lines
315 B
JavaScript

const fs = require('fs-extra');
const path = require('path');
const { version } = require('../package.json');
fs.ensureDirSync(path.join(__dirname, '..', 'components', 'version'));
fs.writeFileSync(
path.join(__dirname, '..', 'components', 'version', 'index.ts'),
`export default '${version}'`,
'utf8',
);