mirror of
https://github.com/youzan/vant.git
synced 2025-10-15 23:55:08 +00:00
fix(@vant/cli): release plugin not work
This commit is contained in:
14
packages/vant-cli/cjs/vant-cli-release-plugin.cjs
Normal file
14
packages/vant-cli/cjs/vant-cli-release-plugin.cjs
Normal file
@@ -0,0 +1,14 @@
|
||||
const releaseIt = require('release-it');
|
||||
const { execSync } = require('child_process');
|
||||
|
||||
class VantCliReleasePlugin extends releaseIt.Plugin {
|
||||
async beforeRelease() {
|
||||
// log an empty line
|
||||
console.log('');
|
||||
|
||||
execSync('vant-cli build', { stdio: 'inherit' });
|
||||
execSync('vant-cli changelog', { stdio: 'inherit' });
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VantCliReleasePlugin;
|
@@ -4,7 +4,7 @@ import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const PLUGIN_PATH = join(__dirname, '../compiler/vant-cli-release-plugin.js');
|
||||
const PLUGIN_PATH = join(__dirname, '../../cjs/vant-cli-release-plugin.cjs');
|
||||
|
||||
export async function release(command: { tag?: string }) {
|
||||
await releaseIt({
|
||||
|
@@ -1,15 +0,0 @@
|
||||
import releaseIt from 'release-it';
|
||||
import { build } from '../commands/build.js';
|
||||
import { changelog } from '../commands/changelog.js';
|
||||
|
||||
class VantCliReleasePlugin extends releaseIt.Plugin {
|
||||
async beforeRelease() {
|
||||
// log an empty line
|
||||
console.log('');
|
||||
|
||||
await build();
|
||||
await changelog();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VantCliReleasePlugin;
|
Reference in New Issue
Block a user