nurev 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.forgejo/workflows/publish.yml +17 -0
- package/README.md +14 -0
- package/index.js +18 -5
- package/package.json +1 -1
- package/templates/pocketbase-bun/Makefile +10 -12
- package/templates/pocketbase-npm/Makefile +11 -13
- package/templates/pocketbase-pnpm/Makefile +11 -13
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
tags: ["v*"]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
publish:
|
|
7
|
+
runs-on: codeberg-tiny-lazy
|
|
8
|
+
container:
|
|
9
|
+
image: node:25-alpine
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v6
|
|
12
|
+
- name: publish version to npm
|
|
13
|
+
run: |
|
|
14
|
+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
|
|
15
|
+
npm publish --access public
|
|
16
|
+
env:
|
|
17
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/README.md
CHANGED
|
@@ -9,3 +9,17 @@ Template generator for [Nuxt](https://nuxt.com/) configured with “on-demand re
|
|
|
9
9
|
## Available backends
|
|
10
10
|
|
|
11
11
|
- [PocketBase](https://pocketbase.io/)
|
|
12
|
+
|
|
13
|
+
## How to use it?
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bunx nurev
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx nurev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm dlx nurev
|
|
25
|
+
```
|
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { default as prompts } from "prompts";
|
|
|
4
4
|
import { default as fs } from "fs-extra";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
6
|
import kleur from "kleur";
|
|
7
|
+
import { spawn } from "child_process";
|
|
7
8
|
|
|
8
9
|
console.log(`${kleur.bgGreen().bold("[Nurev]")}`);
|
|
9
10
|
console.log("Template generator 'on demanding revalidation' with Nuxt");
|
|
@@ -73,11 +74,23 @@ const questions = [
|
|
|
73
74
|
await fs.copy(templateBase, templateDest);
|
|
74
75
|
await fs.copy(templateBackend, templateDest);
|
|
75
76
|
await fs.copy(templatePackageManager, templateDest);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
77
|
+
|
|
78
|
+
const processInstall = spawn("/usr/bin/make", ["install"]);
|
|
79
|
+
|
|
80
|
+
processInstall.stdout.pipe(process.stdout);
|
|
81
|
+
processInstall.stderr.pipe(process.stderr);
|
|
82
|
+
|
|
83
|
+
processInstall.on("close", (_code) => {
|
|
84
|
+
console.log(
|
|
85
|
+
kleur
|
|
86
|
+
.bgGreen()
|
|
87
|
+
.bold(`Template ${response.backend}-${response.manager} ready`),
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
processInstall.on("error", (err) => {
|
|
92
|
+
console.error(`Error: `, err);
|
|
93
|
+
});
|
|
81
94
|
} catch (error) {
|
|
82
95
|
console.log(error);
|
|
83
96
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.PHONY: all backend-build backend-update backend-dev backend-run backend-
|
|
2
|
-
frontend-install frontend-dev frontend-build frontend-preview frontend-
|
|
3
|
-
setup build
|
|
1
|
+
.PHONY: all backend-build backend-update backend-dev backend-run backend-setup \
|
|
2
|
+
frontend-install frontend-dev frontend-build frontend-preview frontend-setup\
|
|
3
|
+
help setup build install
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# Default target
|
|
@@ -27,10 +27,6 @@ backend-run: backend-build
|
|
|
27
27
|
@echo "Running backend..."
|
|
28
28
|
cd backend && ./backend serve
|
|
29
29
|
|
|
30
|
-
backend-clean:
|
|
31
|
-
@echo "Cleaning backend..."
|
|
32
|
-
cd backend && rm -f backend
|
|
33
|
-
|
|
34
30
|
# Frontend targets
|
|
35
31
|
frontend-setup:
|
|
36
32
|
@echo "Preparing frontend..."
|
|
@@ -38,7 +34,7 @@ frontend-setup:
|
|
|
38
34
|
|
|
39
35
|
frontend-install:
|
|
40
36
|
@echo "Installing frontend dependencies..."
|
|
41
|
-
cd frontend && bun install
|
|
37
|
+
cd frontend && bun --bun install
|
|
42
38
|
|
|
43
39
|
frontend-dev: frontend-install
|
|
44
40
|
@echo "Starting frontend development server..."
|
|
@@ -52,10 +48,9 @@ frontend-preview: frontend-build
|
|
|
52
48
|
@echo "Previewing frontend production build..."
|
|
53
49
|
cd frontend && bun --bun run preview
|
|
54
50
|
|
|
55
|
-
frontend-
|
|
56
|
-
@echo "
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
install: backend-update frontend-install
|
|
52
|
+
@echo "Dependencies installed"
|
|
53
|
+
|
|
59
54
|
setup: backend-setup frontend-setup
|
|
60
55
|
@echo "Setup ready"
|
|
61
56
|
|
|
@@ -68,10 +63,13 @@ help:
|
|
|
68
63
|
@echo " make backend-build - Build the backend only"
|
|
69
64
|
@echo " make backend-dev - Run the backend development only"
|
|
70
65
|
@echo " make backend-run - Run the backend only"
|
|
66
|
+
@echo " make backend-update - Update backend dependencies"
|
|
71
67
|
@echo " make frontend-setup - Create a symbolic link for frontend"
|
|
68
|
+
@echo " make frontend-install - Install frontend dependencies"
|
|
72
69
|
@echo " make frontend-dev - Start frontend development server"
|
|
73
70
|
@echo " make frontend-build - Build frontend for production"
|
|
74
71
|
@echo " make frontend-preview - Preview frontend production build"
|
|
72
|
+
@echo " make install - Install all dependencies"
|
|
75
73
|
@echo " make help - Show this help message"
|
|
76
74
|
@echo " make setup - Prepare the project for dev mode and build"
|
|
77
75
|
@echo " make build - Build frontend and backend"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.PHONY: all backend-build backend-update backend-dev backend-run backend-
|
|
2
|
-
frontend-install frontend-dev frontend-build frontend-preview frontend-
|
|
3
|
-
setup build
|
|
1
|
+
.PHONY: all backend-build backend-update backend-dev backend-run backend-setup \
|
|
2
|
+
frontend-install frontend-dev frontend-build frontend-preview frontend-setup\
|
|
3
|
+
help setup build install
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# Default target
|
|
@@ -13,7 +13,7 @@ backend-setup:
|
|
|
13
13
|
|
|
14
14
|
backend-build:
|
|
15
15
|
@echo "Building backend..."
|
|
16
|
-
cd backend && go build -o
|
|
16
|
+
cd backend && go build -o backend
|
|
17
17
|
|
|
18
18
|
backend-update:
|
|
19
19
|
@echo "Updating backend..."
|
|
@@ -25,11 +25,7 @@ backend-dev: backend-update
|
|
|
25
25
|
|
|
26
26
|
backend-run: backend-build
|
|
27
27
|
@echo "Running backend..."
|
|
28
|
-
cd backend && ./
|
|
29
|
-
|
|
30
|
-
backend-clean:
|
|
31
|
-
@echo "Cleaning backend..."
|
|
32
|
-
cd backend && rm -f nupo-backend
|
|
28
|
+
cd backend && ./backend serve
|
|
33
29
|
|
|
34
30
|
# Frontend targets
|
|
35
31
|
frontend-setup:
|
|
@@ -52,10 +48,9 @@ frontend-preview: frontend-build
|
|
|
52
48
|
@echo "Previewing frontend production build..."
|
|
53
49
|
cd frontend && npm run preview
|
|
54
50
|
|
|
55
|
-
frontend-
|
|
56
|
-
@echo "
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
install: backend-update frontend-install
|
|
52
|
+
@echo "Dependencies installed"
|
|
53
|
+
|
|
59
54
|
setup: backend-setup frontend-setup
|
|
60
55
|
@echo "Setup ready"
|
|
61
56
|
|
|
@@ -68,10 +63,13 @@ help:
|
|
|
68
63
|
@echo " make backend-build - Build the backend only"
|
|
69
64
|
@echo " make backend-dev - Run the backend development only"
|
|
70
65
|
@echo " make backend-run - Run the backend only"
|
|
66
|
+
@echo " make backend-update - Update backend dependencies"
|
|
71
67
|
@echo " make frontend-setup - Create a symbolic link for frontend"
|
|
68
|
+
@echo " make frontend-install - Install frontend dependencies"
|
|
72
69
|
@echo " make frontend-dev - Start frontend development server"
|
|
73
70
|
@echo " make frontend-build - Build frontend for production"
|
|
74
71
|
@echo " make frontend-preview - Preview frontend production build"
|
|
72
|
+
@echo " make install - Install all dependencies"
|
|
75
73
|
@echo " make help - Show this help message"
|
|
76
74
|
@echo " make setup - Prepare the project for dev mode and build"
|
|
77
75
|
@echo " make build - Build frontend and backend"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.PHONY: all backend-build backend-update backend-dev backend-run backend-
|
|
2
|
-
frontend-install frontend-dev frontend-build frontend-preview frontend-
|
|
3
|
-
setup build
|
|
1
|
+
.PHONY: all backend-build backend-update backend-dev backend-run backend-setup \
|
|
2
|
+
frontend-install frontend-dev frontend-build frontend-preview frontend-setup\
|
|
3
|
+
help setup build install
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
# Default target
|
|
@@ -13,7 +13,7 @@ backend-setup:
|
|
|
13
13
|
|
|
14
14
|
backend-build:
|
|
15
15
|
@echo "Building backend..."
|
|
16
|
-
cd backend && go build -o
|
|
16
|
+
cd backend && go build -o backend
|
|
17
17
|
|
|
18
18
|
backend-update:
|
|
19
19
|
@echo "Updating backend..."
|
|
@@ -25,11 +25,7 @@ backend-dev: backend-update
|
|
|
25
25
|
|
|
26
26
|
backend-run: backend-build
|
|
27
27
|
@echo "Running backend..."
|
|
28
|
-
cd backend && ./
|
|
29
|
-
|
|
30
|
-
backend-clean:
|
|
31
|
-
@echo "Cleaning backend..."
|
|
32
|
-
cd backend && rm -f nupo-backend
|
|
28
|
+
cd backend && ./backend serve
|
|
33
29
|
|
|
34
30
|
# Frontend targets
|
|
35
31
|
frontend-setup:
|
|
@@ -52,10 +48,9 @@ frontend-preview: frontend-build
|
|
|
52
48
|
@echo "Previewing frontend production build..."
|
|
53
49
|
cd frontend && pnpm run preview
|
|
54
50
|
|
|
55
|
-
frontend-
|
|
56
|
-
@echo "
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
install: backend-update frontend-install
|
|
52
|
+
@echo "Dependencies installed"
|
|
53
|
+
|
|
59
54
|
setup: backend-setup frontend-setup
|
|
60
55
|
@echo "Setup ready"
|
|
61
56
|
|
|
@@ -68,10 +63,13 @@ help:
|
|
|
68
63
|
@echo " make backend-build - Build the backend only"
|
|
69
64
|
@echo " make backend-dev - Run the backend development only"
|
|
70
65
|
@echo " make backend-run - Run the backend only"
|
|
66
|
+
@echo " make backend-update - Update backend dependencies"
|
|
71
67
|
@echo " make frontend-setup - Create a symbolic link for frontend"
|
|
68
|
+
@echo " make frontend-install - Install frontend dependencies"
|
|
72
69
|
@echo " make frontend-dev - Start frontend development server"
|
|
73
70
|
@echo " make frontend-build - Build frontend for production"
|
|
74
71
|
@echo " make frontend-preview - Preview frontend production build"
|
|
72
|
+
@echo " make install - Install all dependencies"
|
|
75
73
|
@echo " make help - Show this help message"
|
|
76
74
|
@echo " make setup - Prepare the project for dev mode and build"
|
|
77
75
|
@echo " make build - Build frontend and backend"
|