Skip to content
This repository was archived by the owner on Sep 24, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/scripts/update-readme-table.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'

const packageJsonPath = path.join(__dirname, '../../packages/nuxt-ui-vue/package.json') // Adjust the path based on your project structure
const readmePath = path.join(__dirname, '../../README.md')

// Read the package.json file
fs.readFile(packageJsonPath, 'utf8', (err, packageJsonData) => {
if (err) {
console.error(err)
process.exit(1)
}

const packageJson = JSON.parse(packageJsonData)
const newNuxtUIVueVersion = packageJson.version

// Read the README file
fs.readFile(readmePath, 'utf8', (readmeErr, data) => {
if (readmeErr) {
console.error(readmeErr)
process.exit(1)
}

// Regular expression to match the table row with nuxt-ui-vue version
const regex = /\| nuxt-ui\s+\| nuxt-ui-vue\s+\|\s+\| [^|]*\s+\| [^|]*\s+\|/

// Create the replacement table row with updated nuxt-ui-vue version
const newTableRow = `| nuxt-ui | nuxt-ui-vue |\n|------------------|------------------|\n| v2.7.0 | v${newNuxtUIVueVersion} |`

// Replace the old table row with the new one
const updatedData = data.replace(regex, newTableRow)

// Write the updated content back to the README file
fs.writeFile(readmePath, updatedData, 'utf8', (writeErr) => {
if (writeErr) {
console.error(writeErr)
process.exit(1)
}

// eslint-disable-next-line no-console
console.log('README table updated successfully.')
})
})
})
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
<h1 align="center">Nuxt-UI-Vue</h1>
</p>

## Current Versions

With each release of `nuxt-ui-vue`, a parallel update will be applied to `nuxt-ui-vue`, ensuring that the library is up to date and providing you, as the developer, with a seamless experience.

Below are the current versions of both libraries:

| nuxt-ui | nuxt-ui-vue |
|------------------|------------------|
| v2.7.0 | v0.0.7 |

## Features

- 🦾 **TypeScript Support** - Built with TypeScript in mind and from the ground up.
Expand Down