https://github.com/benbinbin/bloginote-copy-files-module
copy files to public folder for Nuxt 3 (extract the module from Bloginote which is a Nuxt Content 2 template)
https://github.com/benbinbin/bloginote-copy-files-module
Last synced: 4 months ago
JSON representation
copy files to public folder for Nuxt 3 (extract the module from Bloginote which is a Nuxt Content 2 template)
- Host: GitHub
- URL: https://github.com/benbinbin/bloginote-copy-files-module
- Owner: Benbinbin
- License: mit
- Created: 2023-08-30T13:33:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T15:32:28.000Z (over 1 year ago)
- Last Synced: 2025-11-23T21:03:40.902Z (7 months ago)
- Language: TypeScript
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bloginote-copy-files-module
copy files to public folder for Nuxt 3 (extract the module from [Bloginote](https://github.com/Benbinbin/BlogiNote) which is a Nuxt Content 2 template)
## Quick Setup
1. Add `bloginote-copy-files-module` dependency to your project
```bash
# Using pnpm
pnpm add -D bloginote-copy-files-module
# Using yarn
yarn add --dev bloginote-copy-files-module
# Using npm
npm install --save-dev bloginote-copy-files-module
```
2. Add `bloginote-copy-files-module` to the `modules` section of `nuxt.config.ts`
```ts
export default defineNuxtConfig({
modules: [
'bloginote-copy-files-module'
]
})
```
3. Setting some options for this Module
```ts
export default defineNuxtConfig({
modules: [
'bloginote-copy-files-module'
],
// set the following (optional) properties for the module
bloginoteCopyFiles: {
// the array contain the folder to clean before copy the files
// the default value is empty array []
cleanFolders: ['public/article'];
// set the source folder to copy (it will copy all the files inside this folder to the destination folder)
// the default value is 'content'
sourceFolder: 'content';
// set the destination folder
// the default value is 'public'
destFolder: 'public';
// set the ignore types of file, they won't be copied
// the default value is ['.md', '.json', '.csv']
ignoreTypes: ['.md', '.json', '.csv'];
}
})
```
or using the inline syntax
```ts
export default defineNuxtConfig({
modules: [
['bloginote-copy-files-module', { cleanFolders: ['public/article'] }]
]
})
```
That's it! You can now use bloginote-copy-files-module in your Nuxt app ✨
## Development
```bash
# Install dependencies
npm install
# Generate type stubs
npm run dev:prepare
# Develop with the playground
npm run dev
# Build the playground
npm run dev:build
# Run ESLint
npm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
```