create-nexu 1.3.1 → 1.4.1
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/dist/index.js +29 -0
- package/package.json +1 -1
- package/templates/default/.github/actions/build/action.yml +35 -0
- package/templates/default/gitignore +44 -0
- /package/templates/default/apps/{.gitkeep → gitkeep} +0 -0
- /package/templates/default/services/postgres/init/{.gitkeep → gitkeep} +0 -0
package/dist/index.js
CHANGED
|
@@ -425,6 +425,22 @@ async function init(projectName, options) {
|
|
|
425
425
|
try {
|
|
426
426
|
const templateDir = getTemplateDir2();
|
|
427
427
|
fs3.copySync(templateDir, projectDir);
|
|
428
|
+
const dotfilesToRename = [
|
|
429
|
+
{ src: path3.join(projectDir, "gitignore"), dest: path3.join(projectDir, ".gitignore") },
|
|
430
|
+
{
|
|
431
|
+
src: path3.join(projectDir, "apps", "gitkeep"),
|
|
432
|
+
dest: path3.join(projectDir, "apps", ".gitkeep")
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
src: path3.join(projectDir, "services", "postgres", "init", "gitkeep"),
|
|
436
|
+
dest: path3.join(projectDir, "services", "postgres", "init", ".gitkeep")
|
|
437
|
+
}
|
|
438
|
+
];
|
|
439
|
+
for (const { src, dest } of dotfilesToRename) {
|
|
440
|
+
if (fs3.existsSync(src)) {
|
|
441
|
+
fs3.renameSync(src, dest);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
428
444
|
spinner.succeed("Template copied");
|
|
429
445
|
} catch (error) {
|
|
430
446
|
spinner.fail("Failed to copy template");
|
|
@@ -1033,6 +1049,19 @@ ${change.relativePath}:`));
|
|
|
1033
1049
|
if (deletedFilesCount > 0) {
|
|
1034
1050
|
cleanEmptyDirectories(projectDir);
|
|
1035
1051
|
}
|
|
1052
|
+
const dotfilesToRename = [
|
|
1053
|
+
{ src: path4.join(projectDir, "gitignore"), dest: path4.join(projectDir, ".gitignore") },
|
|
1054
|
+
{ src: path4.join(projectDir, "apps", "gitkeep"), dest: path4.join(projectDir, "apps", ".gitkeep") },
|
|
1055
|
+
{
|
|
1056
|
+
src: path4.join(projectDir, "services", "postgres", "init", "gitkeep"),
|
|
1057
|
+
dest: path4.join(projectDir, "services", "postgres", "init", ".gitkeep")
|
|
1058
|
+
}
|
|
1059
|
+
];
|
|
1060
|
+
for (const { src, dest } of dotfilesToRename) {
|
|
1061
|
+
if (fs4.existsSync(src)) {
|
|
1062
|
+
fs4.renameSync(src, dest);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1036
1065
|
if (selectedCategories.includes("dependencies") && dependencyChanges) {
|
|
1037
1066
|
const templatePkgPath = path4.join(templateDir, "package.json");
|
|
1038
1067
|
const projectPkgPath = path4.join(projectDir, "package.json");
|
package/package.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: 'Build'
|
|
2
|
+
description: 'Build all packages and apps'
|
|
3
|
+
|
|
4
|
+
inputs:
|
|
5
|
+
turbo-token:
|
|
6
|
+
description: 'Turbo remote cache token'
|
|
7
|
+
required: false
|
|
8
|
+
turbo-team:
|
|
9
|
+
description: 'Turbo team name'
|
|
10
|
+
required: false
|
|
11
|
+
|
|
12
|
+
runs:
|
|
13
|
+
using: 'composite'
|
|
14
|
+
steps:
|
|
15
|
+
- name: Setup pnpm
|
|
16
|
+
uses: pnpm/action-setup@v3
|
|
17
|
+
with:
|
|
18
|
+
version: 9
|
|
19
|
+
|
|
20
|
+
- name: Setup Node.js
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: 20
|
|
24
|
+
cache: 'pnpm'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
shell: bash
|
|
28
|
+
run: pnpm install --frozen-lockfile
|
|
29
|
+
|
|
30
|
+
- name: Build
|
|
31
|
+
shell: bash
|
|
32
|
+
run: pnpm build
|
|
33
|
+
env:
|
|
34
|
+
TURBO_TOKEN: ${{ inputs.turbo-token }}
|
|
35
|
+
TURBO_TEAM: ${{ inputs.turbo-team }}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules
|
|
3
|
+
.pnpm-store
|
|
4
|
+
|
|
5
|
+
# Build outputs
|
|
6
|
+
dist
|
|
7
|
+
.next
|
|
8
|
+
out
|
|
9
|
+
build
|
|
10
|
+
|
|
11
|
+
# Environment
|
|
12
|
+
.env
|
|
13
|
+
.env.local
|
|
14
|
+
.env.*.local
|
|
15
|
+
*.local
|
|
16
|
+
|
|
17
|
+
# IDE
|
|
18
|
+
.idea
|
|
19
|
+
.vscode/*
|
|
20
|
+
!.vscode/settings.json
|
|
21
|
+
!.vscode/extensions.json
|
|
22
|
+
|
|
23
|
+
# Logs
|
|
24
|
+
*.log
|
|
25
|
+
npm-debug.log*
|
|
26
|
+
pnpm-debug.log*
|
|
27
|
+
|
|
28
|
+
# Testing
|
|
29
|
+
coverage
|
|
30
|
+
.nyc_output
|
|
31
|
+
|
|
32
|
+
# Turbo
|
|
33
|
+
.turbo
|
|
34
|
+
|
|
35
|
+
# OS
|
|
36
|
+
.DS_Store
|
|
37
|
+
Thumbs.db
|
|
38
|
+
|
|
39
|
+
# Docker
|
|
40
|
+
.docker
|
|
41
|
+
|
|
42
|
+
# Misc
|
|
43
|
+
*.tgz
|
|
44
|
+
.cache
|
|
File without changes
|
|
File without changes
|