Merge branch 'main' into fix/editlink

pull/697/head
Percy Ma 3 years ago committed by GitHub
commit 73c24bc06b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,3 +1,7 @@
# [1.0.0-alpha.1](https://github.com/vuejs/vitepress/compare/v0.22.4...v1.0.0-alpha.1) (2022-06-01)
Complete rewrite on default theme, with bunch of features added. Please refer to the docs for the new feature and changes.
## [0.22.4](https://github.com/vuejs/vitepress/compare/v0.22.3...v0.22.4) (2022-05-06)
### Bug Fixes

@ -16,9 +16,7 @@ export default defineConfig({
},
editLink: {
domain: 'gitlab.com',
repo: 'vuejs/vitepress',
branch: 'main',
dir: 'docs',
text: 'Edit this page on GitHub'
},

@ -15,12 +15,12 @@ The essential file for configuring a VitePress site is `.vitepress/config.js`, w
```js
export default {
title: 'Hello VitePress',
title: 'VitePress',
description: 'Just playing around.'
}
```
In the above example, the site will have the title of `VitePress`, and `Just playing around` as description meta tag.
In the above example, the site will have the title of `VitePress`, and `Just playing around.` as the description meta tag.
Learn everything about VitePress features at [Theme: Introduction](./theme-introduction) to find how to configure specific features with in this config file.

@ -1,6 +1,6 @@
{
"name": "vitepress",
"version": "1.0.0-draft.8",
"version": "1.0.0-alpha.1",
"description": "Vite & Vue powered static site generator",
"type": "module",
"packageManager": "pnpm@7.1.7",

@ -1,15 +1,20 @@
import { readFileSync, writeFileSync } from 'fs'
import { resolve } from 'path'
import { fileURLToPath } from 'url'
import c from 'picocolors'
import { inc as _inc, valid } from 'semver'
import prompts from 'prompts'
import { execa } from 'execa'
import { version as currentVersion } from '../package.json'
import { fileURLToPath } from 'url'
import semver from 'semver'
import pkg from '../package.json' assert { type: 'json' }
const { version: currentVersion } = pkg
const { inc: _inc, valid } = semver
const versionIncrements = ['patch', 'minor', 'major']
const dir = dirname(fileURLToPath(import.meta.url))
const tags = ['latest', 'next']
const dir = fileURLToPath(new URL('.', import.meta.url))
const inc = (i) => _inc(currentVersion, i)
const run = (bin, args, opts = {}) =>
execa(bin, args, { stdio: 'inherit', ...opts })
@ -18,34 +23,45 @@ const step = (msg) => console.log(c.cyan(msg))
async function main() {
let targetVersion
const versions = versionIncrements
.map((i) => `${i} (${inc(i)})`)
.concat(['custom'])
const { release } = await prompts({
type: 'select',
name: 'release',
message: 'Select release type',
choices: versionIncrements.map((i) => `${i} (${inc(i)})`).concat(['custom'])
choices: versions
})
if (release === 'custom') {
console.log(release, release === 3)
if (release === 3) {
targetVersion = (
await prompts({
type: 'input',
type: 'text',
name: 'version',
message: 'Input custom version',
initial: currentVersion
})
).version
} else {
targetVersion = release.match(/\((.*)\)/)[1]
targetVersion = versions[release].match(/\((.*)\)/)[1]
}
if (!valid(targetVersion)) {
throw new Error(`Invalid target version: ${targetVersion}`)
}
const { tag } = await prompts({
type: 'select',
name: 'tag',
message: 'Select tag type',
choices: tags
})
const { yes: tagOk } = await prompts({
type: 'confirm',
name: 'yes',
message: `Releasing v${targetVersion}. Confirm?`
message: `Releasing v${targetVersion} on ${tags[tag]}. Confirm?`
})
if (!tagOk) {
@ -83,7 +99,13 @@ async function main() {
// Publish the package.
step('\nPublishing the package...')
await run('pnpm', ['publish', '--ignore-scripts', '--no-git-checks'])
await run('pnpm', [
'publish',
'--tag',
tags[tag],
'--ignore-scripts',
'--no-git-checks'
])
// Push to GitHub.
step('\nPushing to GitHub...')

Loading…
Cancel
Save