Skip to content

Commit

Permalink
chore: UPDATE docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
amirkian007 committed Mar 15, 2024
1 parent be35baa commit 97d53ec
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/public/ex.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/full-event-calendar/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=League+Spartan:wght@100;500&display=swap" rel="stylesheet" />
<title>Vite + Vue + TS</title>
<script type="module" crossorigin src="/assets/index-qqP-u2Y5.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-lSDucBbo.css" />
<title>full event calendar demo</title>
<script type="module" crossorigin src="/full-event-calendar/assets/index-qqP-u2Y5.js"></script>
<link rel="stylesheet" crossorigin href="/full-event-calendar/assets/index-lSDucBbo.css" />
</head>
<style>
body * {
Expand Down
1 change: 1 addition & 0 deletions docs/public/vite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions scripts/build-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import process from 'process'
// Paths
const sourceFolder = path.join(process.cwd(), 'packages', 'vue3', 'dist') // replace with your source folder path
const destinationFolder = path.join(process.cwd(), 'docs', '.vitepress', 'dist') // replace with your destination folder path
const destinationFolderDev = path.join(process.cwd(), 'docs', 'public') // replace with your destination folder path

// Copy the folder from source to destination
fs.copy(sourceFolder, destinationFolder)
Expand All @@ -23,3 +24,20 @@ fs.copy(sourceFolder, destinationFolder)
.catch((err) => {
console.error('Error copying folder:', err)
})
fs.copy(sourceFolder, destinationFolderDev)
.then(() => {
console.log('Folder copied successfully!')
// Rename index.html to ex.html
const oldPath = `${destinationFolderDev}/index.html`
const newPath = `${destinationFolderDev}/ex.html`
fs.rename(oldPath, newPath)
.then(() => {
console.log('File renamed successfully!')
})
.catch((err) => {
console.error('Error renaming file:', err)
})
})
.catch((err) => {
console.error('Error copying folder:', err)
})

0 comments on commit 97d53ec

Please sign in to comment.