Skip to content

Commit 1bea8eb

Browse files
committed
feat(command/build): copy static dir on build
1 parent 966cc2b commit 1bea8eb

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
| Statements | Branches | Functions | Lines |
88
| --------------------------- | ----------------------- | ------------------------- | ----------------- |
9-
| ![Statements](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) |
9+
| ![Statements](https://img.shields.io/badge/Coverage-99.11%25-brightgreen.svg) | ![Branches](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Functions](https://img.shields.io/badge/Coverage-100%25-brightgreen.svg) | ![Lines](https://img.shields.io/badge/Coverage-99.1%25-brightgreen.svg) |
1010

1111
This package allows to develop a nuxt SPA as frontend for a laravel backend.
1212
The implementation is based on [laravel-nuxt-js](https://github.com/skyrpex/laravel-nuxt-js) by [skyrpex](https://github.com/skyrpex).

dist/subcommands/build.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/subcommands/build.ts

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ const config: NuxtLaravelCommandConfig = {
123123
fs.mkdirpSync(dir)
124124
}
125125

126+
const staticDir = path.join(options.srcDir, 'static')
127+
128+
if (fs.existsSync(staticDir)) {
129+
fs.copySync(path.resolve(options.srcDir, 'static'), destination)
130+
}
131+
126132
fs.moveSync(
127133
path.resolve(
128134
path.resolve(options.rootDir!, options.generate!.dir) +

0 commit comments

Comments
 (0)