refactor(@vant/cli): migrate to ESM package

This commit is contained in:
chenjiahan
2021-10-28 20:09:00 +08:00
committed by neverland
parent eec2ac4c0f
commit 1b45f38133
50 changed files with 255 additions and 196 deletions
+6 -4
View File
@@ -1,10 +1,12 @@
import { join } from 'path';
import { ROOT } from '../common/constant';
import { ora, slimPath } from '../common/logger';
import { createWriteStream, readFileSync } from 'fs-extra';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import { ROOT } from '../common/constant.js';
import { ora, slimPath } from '../common/logger.js';
import { createWriteStream, readFileSync } from 'fs';
import conventionalChangelog from 'conventional-changelog';
const DIST_FILE = join(ROOT, './changelog.generated.md');
const __dirname = dirname(fileURLToPath(import.meta.url));
const MAIN_TEMPLATE = join(__dirname, '../../template/changelog-main.hbs');
const HEADER_TEMPLATE = join(__dirname, '../../template/changelog-header.hbs');
const COMMIT_TEMPLATE = join(__dirname, '../../template/changelog-commit.hbs');