Skip to content

Commit

Permalink
Switched to using hooks to copy ving.json to the build directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Aug 7, 2024
1 parent 98d1cb5 commit 808893a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
10 changes: 8 additions & 2 deletions nuxt.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
import ving from './ving.json';
//import VingTheme from './themes/ving-theme.mjs';
import Aura from '@primevue/themes/aura';
import { cpSync } from 'node:fs';
import path from 'node:path';

ving.site.url = process.env.VING_SITE_URL;

Expand Down Expand Up @@ -75,4 +75,10 @@ export default defineNuxtConfig({
runtimeConfig: {
public: ving,
},
hooks: {
'nitro:build:public-assets': (nitro) => {
const targetPath = path.join(nitro.options.output.dir, 'ving.json');
cpSync('./ving.json', targetPath, { recursive: true });
}
}
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"#ving/*": "./ving/*"
},
"scripts": {
"build": "nuxt build && cp ./ving.json .output/",
"build": "nuxt build",
"dev": "nuxt dev --host",
"generate": "nuxt generate",
"preview": "nuxt preview",
Expand Down
7 changes: 5 additions & 2 deletions ving/docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ outline: deep

## August 2024

### 2024-08-07
* Switched to using hooks to copy ving.json to the build directory.

### 2024-08-05
* Added redis to Pulumi prod.
* Added redis to Pulumi prod.

### 2024-08-02
* Added Pulumi prod.
* Pulumi prod creates a VPC.
* Pulumi prod creates a a database cluster.
* Pulumi prod creates a database cluster.

## July 2024

Expand Down

0 comments on commit 808893a

Please sign in to comment.