@codigodoleo/wp-kit 3.1.0 → 3.2.0
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/lib/commands/init.js +19 -10
- package/lib/config/versions.js +5 -5
- package/lib/prompts/index.js +24 -14
- package/lib/utils/git.js +50 -13
- package/modules/deploy/.github/workflows/deploy-docker.yml +102 -0
- package/modules/deploy/.github/workflows/deploy-ssh.yml +126 -0
- package/modules/deploy/.github/workflows/release.yml +55 -0
- package/modules/deploy/index.js +39 -0
- package/modules/deploy/prompts.js +1 -3
- package/modules/deploy/templates/.gitlab/ci/deploy-docker.yml.hbs +35 -0
- package/modules/deploy/templates/.gitlab/ci/deploy-ssh.yml.hbs +83 -0
- package/modules/deploy/templates/.gitlab/ci/release.yml.hbs +26 -0
- package/modules/git/.husky/commit-msg +8 -4
- package/modules/git/.husky/pre-commit +0 -3
- package/modules/git/index.js +34 -38
- package/modules/git/templates/.lando.yml.hbs +13 -5
- package/modules/git/templates/package.json.hbs +4 -4
- package/modules/git/templates/workspace.json.hbs +114 -28
- package/modules/lint/templates/.lando.yml.hbs +10 -2
- package/modules/lint/templates/package.json.hbs +4 -4
- package/modules/lint/templates/workspace.json.hbs +56 -15
- package/modules/php/templates/.lando.yml.hbs +11 -2
- package/modules/php/templates/composer.json.hbs +1 -1
- package/modules/php/templates/workspace.json.hbs +74 -15
- package/modules/redis/templates/.lando.yml.hbs +8 -1
- package/modules/sage/index.js +114 -15
- package/modules/sage/prompts.js +1 -1
- package/modules/sage/templates/.devcontainer/devcontainer.json.hbs +7 -0
- package/modules/sage/templates/.devcontainer/docker-compose.override.yml.hbs +6 -0
- package/modules/sage/templates/.devcontainer/post-create.sh.hbs +11 -0
- package/modules/sage/templates/.lando.yml.hbs +49 -20
- package/modules/sage/templates/server/cmd/setup-sage-node.sh.hbs +23 -0
- package/modules/sage/templates/server/cmd/setup-sage-php.sh.hbs +24 -0
- package/modules/sage/templates/theme/app/Blocks/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/app/Fields/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/composer.json.hbs +25 -3
- package/modules/sage/templates/theme/package.json.hbs +15 -3
- package/modules/sage/templates/theme/resources/views/blocks/.gitkeep.hbs +0 -0
- package/modules/sage/templates/theme/vite.config.js.hbs +55 -13
- package/modules/sage/templates/workspace.json.hbs +155 -12
- package/modules/skills/index.js +18 -0
- package/modules/skills/prompts.js +21 -0
- package/modules/test/index.js +19 -0
- package/modules/test/prompts.js +8 -0
- package/modules/test/templates/composer.json.hbs +16 -0
- package/modules/test/templates/package.json.hbs +11 -0
- package/modules/test/templates/playwright.config.js.hbs +29 -0
- package/modules/test/tests/Pest.php +39 -0
- package/modules/test/tests/SmokeTest.php +15 -0
- package/modules/test/tests/e2e/example.spec.js +11 -0
- package/modules/test/tests/e2e/helpers/loginHelper.js +40 -0
- package/package.json +1 -1
- package/templates/.devcontainer/Dockerfile.hbs +24 -0
- package/templates/.devcontainer/config/nginx.conf +23 -0
- package/templates/.devcontainer/config/nginx.conf.hbs +23 -0
- package/templates/.devcontainer/devcontainer.json.hbs +29 -0
- package/templates/.devcontainer/docker-compose.yml.hbs +73 -0
- package/templates/.devcontainer/setup.sh.hbs +17 -0
- package/templates/.env.hbs +38 -15
- package/templates/.gitignore.hbs +2 -2
- package/templates/.lando.yml.hbs +88 -11
- package/templates/README.md.hbs +23 -7
- package/templates/composer.json.hbs +4 -3
- package/templates/package.json.hbs +0 -2
- package/templates/server/cmd/install-wp.sh.hbs +54 -43
- package/templates/server/cmd/setup-node.sh.hbs +11 -0
- package/templates/server/cmd/setup-php.sh.hbs +14 -0
- package/templates/server/www/vhosts.conf.hbs +54 -17
- package/templates/workspace.json.hbs +233 -40
- package/templates/wp-cli.yml.hbs +1 -0
package/modules/sage/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import { VERSION_REGISTRY, validateVersionCompatibility } from '../../lib/config
|
|
|
16
16
|
export async function setupModule(context, generator) {
|
|
17
17
|
const themeDir = path.join(context.cwd, 'content', 'themes', context.projectName);
|
|
18
18
|
const relativeThemeDir = `content/themes/${context.projectName}`;
|
|
19
|
+
const relativeDevcontainerDir = '.devcontainer';
|
|
19
20
|
|
|
20
21
|
try {
|
|
21
22
|
// 1. Validate version compatibility
|
|
@@ -46,11 +47,17 @@ export async function setupModule(context, generator) {
|
|
|
46
47
|
// 3. Prepare and validate directory
|
|
47
48
|
await fs.ensureDir(themeDir);
|
|
48
49
|
const files = await fs.readdir(themeDir);
|
|
50
|
+
let shouldInstallSage = true;
|
|
51
|
+
|
|
49
52
|
if (files.length > 0) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
const alreadyInstalled = await isSageThemeInstalled(themeDir);
|
|
54
|
+
if (alreadyInstalled) {
|
|
55
|
+
shouldInstallSage = false;
|
|
56
|
+
log(color.blue, '[sage] ♻️ Existing Sage theme detected. Reusing installation.');
|
|
57
|
+
} else {
|
|
58
|
+
log(color.orange, `⚠️ ${themeDir} has stale files. Cleaning before installation.`);
|
|
59
|
+
await fs.emptyDir(themeDir);
|
|
60
|
+
}
|
|
54
61
|
}
|
|
55
62
|
|
|
56
63
|
// 4. Build composer command with proper error handling
|
|
@@ -63,32 +70,114 @@ export async function setupModule(context, generator) {
|
|
|
63
70
|
'--ignore-platform-reqs',
|
|
64
71
|
].join(' ');
|
|
65
72
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
if (shouldInstallSage) {
|
|
74
|
+
log(color.blue, `[sage] 📦 Installing Sage ${context.sageVersion} (${sageConfig.tag})...`);
|
|
75
|
+
log(color.blue, `[sage] 📍 Location: ${relativeThemeDir}`);
|
|
76
|
+
execSync(cmd, { stdio: 'inherit', cwd: context.cwd });
|
|
77
|
+
}
|
|
71
78
|
|
|
72
79
|
// 6. Validate theme installation
|
|
73
80
|
await validateThemeInstallation(themeDir, sageConfig);
|
|
74
81
|
log(color.green, `[sage] ✅ Theme installation verified`);
|
|
75
82
|
|
|
76
83
|
// 7. Generate customizations
|
|
77
|
-
log(color.blue,
|
|
84
|
+
log(color.blue, '[sage] 🛠️ Applying advanced Sage DX customizations...');
|
|
85
|
+
if (context.sageVersion === '11') {
|
|
86
|
+
await generator.generateFile(
|
|
87
|
+
'theme/vite.config.js',
|
|
88
|
+
context,
|
|
89
|
+
'sage',
|
|
90
|
+
`${relativeThemeDir}/vite.config.js`
|
|
91
|
+
);
|
|
92
|
+
} else {
|
|
93
|
+
log(color.blue, '[sage] ℹ️ Keeping default Vite config for Sage 10 compatibility.');
|
|
94
|
+
}
|
|
78
95
|
await generator.generateFile(
|
|
79
|
-
'theme/
|
|
96
|
+
'theme/style.css',
|
|
80
97
|
context,
|
|
81
98
|
'sage',
|
|
82
|
-
`${relativeThemeDir}/
|
|
99
|
+
`${relativeThemeDir}/style.css`
|
|
83
100
|
);
|
|
101
|
+
|
|
84
102
|
await generator.generateFile(
|
|
85
|
-
'theme/
|
|
103
|
+
'theme/app/Blocks/.gitkeep',
|
|
86
104
|
context,
|
|
87
105
|
'sage',
|
|
88
|
-
`${relativeThemeDir}/
|
|
106
|
+
`${relativeThemeDir}/app/Blocks/.gitkeep`
|
|
107
|
+
);
|
|
108
|
+
await generator.generateFile(
|
|
109
|
+
'theme/app/Fields/.gitkeep',
|
|
110
|
+
context,
|
|
111
|
+
'sage',
|
|
112
|
+
`${relativeThemeDir}/app/Fields/.gitkeep`
|
|
113
|
+
);
|
|
114
|
+
await generator.generateFile(
|
|
115
|
+
'theme/resources/views/blocks/.gitkeep',
|
|
116
|
+
context,
|
|
117
|
+
'sage',
|
|
118
|
+
`${relativeThemeDir}/resources/views/blocks/.gitkeep`
|
|
89
119
|
);
|
|
90
120
|
|
|
91
|
-
|
|
121
|
+
await generator.mergeWithExistingFile({
|
|
122
|
+
existingFile: `${relativeThemeDir}/package.json`,
|
|
123
|
+
moduleTemplatePath: 'theme/package.json',
|
|
124
|
+
context,
|
|
125
|
+
format: 'json',
|
|
126
|
+
moduleName: 'sage',
|
|
127
|
+
mergeStrategy: 'replace',
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
await generator.mergeWithExistingFile({
|
|
131
|
+
existingFile: `${relativeThemeDir}/composer.json`,
|
|
132
|
+
moduleTemplatePath: 'theme/composer.json',
|
|
133
|
+
context,
|
|
134
|
+
format: 'json',
|
|
135
|
+
moduleName: 'sage',
|
|
136
|
+
mergeStrategy: 'replace',
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
await generator.generateFile(
|
|
140
|
+
'.devcontainer/docker-compose.override.yml',
|
|
141
|
+
context,
|
|
142
|
+
'sage',
|
|
143
|
+
`${relativeDevcontainerDir}/docker-compose.override.yml`
|
|
144
|
+
);
|
|
145
|
+
await generator.generateFile(
|
|
146
|
+
'.devcontainer/post-create.sh',
|
|
147
|
+
context,
|
|
148
|
+
'sage',
|
|
149
|
+
`${relativeDevcontainerDir}/post-create.sh`
|
|
150
|
+
);
|
|
151
|
+
await fs.chmod(path.join(context.cwd, relativeDevcontainerDir, 'post-create.sh'), 0o755);
|
|
152
|
+
|
|
153
|
+
// Unified setup scripts for Sage — shared between Lando, devcontainer and CI/CD
|
|
154
|
+
await generator.generateFile(
|
|
155
|
+
'server/cmd/setup-sage-php.sh',
|
|
156
|
+
context,
|
|
157
|
+
'sage',
|
|
158
|
+
'server/cmd/setup-sage-php.sh'
|
|
159
|
+
);
|
|
160
|
+
await generator.generateFile(
|
|
161
|
+
'server/cmd/setup-sage-node.sh',
|
|
162
|
+
context,
|
|
163
|
+
'sage',
|
|
164
|
+
'server/cmd/setup-sage-node.sh'
|
|
165
|
+
);
|
|
166
|
+
await fs.chmod(path.join(context.cwd, 'server/cmd/setup-sage-php.sh'), 0o755);
|
|
167
|
+
await fs.chmod(path.join(context.cwd, 'server/cmd/setup-sage-node.sh'), 0o755);
|
|
168
|
+
|
|
169
|
+
await generator.mergeWithExistingFile({
|
|
170
|
+
existingFile: `${relativeDevcontainerDir}/devcontainer.json`,
|
|
171
|
+
moduleTemplatePath: '.devcontainer/devcontainer.json',
|
|
172
|
+
context,
|
|
173
|
+
format: 'json',
|
|
174
|
+
moduleName: 'sage',
|
|
175
|
+
mergeStrategy: 'replace',
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
log(color.green, '[sage] ✅ Advanced Sage setup completed successfully');
|
|
179
|
+
log(color.green, `[sage] ✅ Theme directory: ${relativeThemeDir}`);
|
|
180
|
+
log(color.green, '[sage] ✅ Lando + Devcontainer command parity enabled');
|
|
92
181
|
} catch (error) {
|
|
93
182
|
log(color.red, `[sage] ❌ Installation failed: ${error.message}`);
|
|
94
183
|
throw error;
|
|
@@ -126,3 +215,13 @@ async function validateThemeInstallation(themeDir, sageConfig) {
|
|
|
126
215
|
|
|
127
216
|
log(color.blue, `[sage] ℹ️ Theme info: ${packageJson.name} v${packageJson.version || '1.0.0'}`);
|
|
128
217
|
}
|
|
218
|
+
|
|
219
|
+
async function isSageThemeInstalled(themeDir) {
|
|
220
|
+
const requiredFiles = ['package.json', 'composer.json', 'theme.json'];
|
|
221
|
+
for (const file of requiredFiles) {
|
|
222
|
+
if (!(await fs.pathExists(path.join(themeDir, file)))) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
}
|
package/modules/sage/prompts.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Sage devcontainer post-create — delegates to unified setup scripts.
|
|
3
|
+
# Invoked from: devcontainer.json postCreateCommand.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"
|
|
7
|
+
|
|
8
|
+
bash "${PROJECT_ROOT}/server/cmd/setup-sage-php.sh"
|
|
9
|
+
bash "${PROJECT_ROOT}/server/cmd/setup-sage-node.sh"
|
|
10
|
+
|
|
11
|
+
echo "Sage post-create bootstrap completed."
|
|
@@ -1,20 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
services:
|
|
2
|
+
build:
|
|
3
|
+
type: node:24
|
|
4
|
+
ssl: true
|
|
5
|
+
build:
|
|
6
|
+
- bash /app/server/cmd/setup-sage-node.sh
|
|
7
|
+
scanner: false
|
|
8
|
+
events:
|
|
9
|
+
post-start:
|
|
10
|
+
- bash ./server/cmd/setup-sage-php.sh
|
|
11
|
+
- bash ./server/cmd/setup-sage-node.sh
|
|
12
|
+
- wp theme activate {{projectName}}
|
|
13
|
+
- cd /app/content/themes/{{projectName}} && wp acorn optimize:clear
|
|
14
|
+
tooling:
|
|
15
|
+
dev:
|
|
16
|
+
service: build
|
|
17
|
+
description: Run the Sage/Vite development server
|
|
18
|
+
cmd: npm run dev --prefix /app/content/themes/{{projectName}}
|
|
19
|
+
theme-bootstrap:
|
|
20
|
+
service: appserver
|
|
21
|
+
description: Install theme dependencies
|
|
22
|
+
dir: /app/content/themes/{{projectName}}
|
|
23
|
+
cmd:
|
|
24
|
+
- appserver: bash /app/server/cmd/setup-sage-php.sh
|
|
25
|
+
- build: bash /app/server/cmd/setup-sage-node.sh
|
|
26
|
+
theme-build:
|
|
27
|
+
service: build
|
|
28
|
+
description: Build the Sage theme
|
|
29
|
+
cmd: npm run build --prefix /app/content/themes/{{projectName}}
|
|
30
|
+
theme-lint:
|
|
31
|
+
service: build
|
|
32
|
+
description: Lint the Sage theme
|
|
33
|
+
cmd: npm run lint --prefix /app/content/themes/{{projectName}}
|
|
34
|
+
acorn:
|
|
35
|
+
service: appserver
|
|
36
|
+
description: Run Acorn artisan commands
|
|
37
|
+
dir: /app/content/themes/{{projectName}}
|
|
38
|
+
cmd: wp acorn $ACORN_COMMAND
|
|
39
|
+
options:
|
|
40
|
+
command:
|
|
41
|
+
passthrough: true
|
|
42
|
+
alias:
|
|
43
|
+
- c
|
|
44
|
+
describe: Acorn command to execute
|
|
45
|
+
interactive:
|
|
46
|
+
type: input
|
|
47
|
+
message: "Acorn command (example: make:component Hero)"
|
|
48
|
+
weight: 100
|
|
49
|
+
env: ACORN_COMMAND
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Installs and builds Sage theme Node.js dependencies.
|
|
3
|
+
# Invoked from: Lando (build service build step + post-start), Devcontainer (post-create.sh), CI/CD.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
PROJECT_ROOT="${PROJECT_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
|
|
7
|
+
THEME_DIR="${PROJECT_ROOT}/content/themes/{{projectName}}"
|
|
8
|
+
|
|
9
|
+
if [ ! -d "${THEME_DIR}" ]; then
|
|
10
|
+
echo "Theme directory not found: ${THEME_DIR}" && exit 0
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if [ ! -d "${THEME_DIR}/node_modules" ]; then
|
|
14
|
+
echo "Installing Sage theme Node.js dependencies..."
|
|
15
|
+
npm install --prefix "${THEME_DIR}"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ ! -f "${THEME_DIR}/public/build/manifest.json" ]; then
|
|
19
|
+
echo "Building Sage theme..."
|
|
20
|
+
npm run build --prefix "${THEME_DIR}"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
echo "Sage theme Node.js setup complete."
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Installs Sage theme PHP dependencies via Composer.
|
|
3
|
+
# Invoked from: Lando (post-start), Devcontainer (post-create.sh), CI/CD.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
PROJECT_ROOT="${PROJECT_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
|
|
7
|
+
THEME_DIR="${PROJECT_ROOT}/content/themes/{{projectName}}"
|
|
8
|
+
|
|
9
|
+
if [ ! -d "${THEME_DIR}" ]; then
|
|
10
|
+
echo "Theme directory not found: ${THEME_DIR}" && exit 0
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
if [ -f "${THEME_DIR}/vendor/autoload.php" ]; then
|
|
14
|
+
echo "Sage PHP dependencies already installed, skipping."
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
echo "Installing Sage theme PHP dependencies..."
|
|
19
|
+
composer install \
|
|
20
|
+
--working-dir="${THEME_DIR}" \
|
|
21
|
+
--no-interaction \
|
|
22
|
+
--no-progress \
|
|
23
|
+
--optimize-autoloader
|
|
24
|
+
echo "Sage PHP dependencies installed."
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"description": "{{projectDescription}}",
|
|
3
|
+
"authors": [
|
|
4
|
+
{
|
|
5
|
+
"name": "{{author}}",
|
|
6
|
+
"email": "{{authorEmail}}"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"require": {
|
|
10
|
+
"php": ">={{phpVersion}}",
|
|
11
|
+
"log1x/sage-directives": "^2.0",
|
|
12
|
+
"log1x/acf-composer": "^2.0 || ^3.0"
|
|
13
|
+
},
|
|
14
|
+
"require-dev": {
|
|
15
|
+
"laravel/pint": "^1.21"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"lint": [
|
|
19
|
+
"./vendor/bin/pint --test"
|
|
20
|
+
],
|
|
21
|
+
"acorn:optimize": [
|
|
22
|
+
"wp acorn optimize"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
1
|
+
{
|
|
2
|
+
"author": "{{author}}",
|
|
3
|
+
"description": "{{projectDescription}}",
|
|
4
|
+
"version": "{{projectVersion}}",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "{{gitRepository}}"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "vite",
|
|
12
|
+
"build": "vite build",
|
|
13
|
+
"lint": "eslint resources --ext .js,.ts,.vue"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -1,13 +1,55 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
+
import laravel from 'laravel-vite-plugin';
|
|
5
|
+
import { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
base: '/app/content/themes/{{projectName}}/',
|
|
9
|
+
plugins: [
|
|
10
|
+
tailwindcss(),
|
|
11
|
+
laravel({
|
|
12
|
+
input: [
|
|
13
|
+
'resources/css/app.css',
|
|
14
|
+
'resources/js/app.js',
|
|
15
|
+
'resources/css/editor.css',
|
|
16
|
+
'resources/js/editor.js',
|
|
17
|
+
],
|
|
18
|
+
refresh: true,
|
|
19
|
+
watch: {
|
|
20
|
+
usePolling: true,
|
|
21
|
+
interval: 1000,
|
|
22
|
+
ignored: ['node_modules', 'public/build/hot'],
|
|
23
|
+
},
|
|
24
|
+
}),
|
|
25
|
+
wordpressPlugin(),
|
|
26
|
+
wordpressThemeJson({
|
|
27
|
+
disableTailwindColors: false,
|
|
28
|
+
disableTailwindFonts: false,
|
|
29
|
+
disableTailwindFontSizes: false,
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
resolve: {
|
|
33
|
+
alias: {
|
|
34
|
+
'@scripts': '/resources/js',
|
|
35
|
+
'@styles': '/resources/css',
|
|
36
|
+
'@fonts': '/resources/fonts',
|
|
37
|
+
'@images': '/resources/images',
|
|
38
|
+
'@blocks': '/app/Blocks',
|
|
39
|
+
'@fields': '/app/Fields',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
server: {
|
|
43
|
+
https: {
|
|
44
|
+
key: fs.readFileSync('/certs/cert.key'),
|
|
45
|
+
cert: fs.readFileSync('/certs/cert.crt'),
|
|
46
|
+
},
|
|
47
|
+
host: true,
|
|
48
|
+
port: 3009,
|
|
49
|
+
strictPort: true,
|
|
50
|
+
hmr: {
|
|
51
|
+
host: 'localhost',
|
|
52
|
+
protocol: 'wss',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
@@ -1,12 +1,155 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
1
|
+
{
|
|
2
|
+
"folders": [
|
|
3
|
+
{
|
|
4
|
+
"path": "./content/themes/{{projectName}}",
|
|
5
|
+
"name": "🎨 Theme"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"settings": {
|
|
9
|
+
"gitlens.hovers.detailsMarkdownFormat": "testing"
|
|
10
|
+
},
|
|
11
|
+
"tasks": {
|
|
12
|
+
"tasks": [
|
|
13
|
+
{
|
|
14
|
+
"label": "🛶 Lando: theme-bootstrap",
|
|
15
|
+
"type": "shell",
|
|
16
|
+
"command": "lando",
|
|
17
|
+
"args": ["theme-bootstrap"],
|
|
18
|
+
"group": "build",
|
|
19
|
+
"presentation": {
|
|
20
|
+
"echo": true,
|
|
21
|
+
"reveal": "always",
|
|
22
|
+
"focus": false,
|
|
23
|
+
"panel": "shared"
|
|
24
|
+
},
|
|
25
|
+
"problemMatcher": []
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"label": "🛶 Lando: theme-build",
|
|
29
|
+
"type": "shell",
|
|
30
|
+
"command": "lando",
|
|
31
|
+
"args": ["theme-build"],
|
|
32
|
+
"options": {
|
|
33
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
34
|
+
},
|
|
35
|
+
"group": "build",
|
|
36
|
+
"presentation": {
|
|
37
|
+
"echo": true,
|
|
38
|
+
"reveal": "always",
|
|
39
|
+
"focus": false,
|
|
40
|
+
"panel": "shared"
|
|
41
|
+
},
|
|
42
|
+
"problemMatcher": []
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"label": "🛶 Lando: theme-dev",
|
|
46
|
+
"type": "shell",
|
|
47
|
+
"command": "lando",
|
|
48
|
+
"args": ["theme-dev"],
|
|
49
|
+
"options": {
|
|
50
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
51
|
+
},
|
|
52
|
+
"group": "build",
|
|
53
|
+
"isBackground": true,
|
|
54
|
+
"presentation": {
|
|
55
|
+
"echo": true,
|
|
56
|
+
"reveal": "always",
|
|
57
|
+
"focus": false,
|
|
58
|
+
"panel": "shared"
|
|
59
|
+
},
|
|
60
|
+
"problemMatcher": []
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"label": "🛶 Lando: theme-lint",
|
|
64
|
+
"type": "shell",
|
|
65
|
+
"command": "lando",
|
|
66
|
+
"args": ["theme-lint"],
|
|
67
|
+
"options": {
|
|
68
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
69
|
+
},
|
|
70
|
+
"group": "build",
|
|
71
|
+
"presentation": {
|
|
72
|
+
"echo": true,
|
|
73
|
+
"reveal": "always",
|
|
74
|
+
"focus": false,
|
|
75
|
+
"panel": "shared"
|
|
76
|
+
},
|
|
77
|
+
"problemMatcher": []
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"label": "🛶 Lando: acorn",
|
|
81
|
+
"type": "shell",
|
|
82
|
+
"command": "lando",
|
|
83
|
+
"args": ["acorn", "make:component", "ExampleBlock"],
|
|
84
|
+
"options": {
|
|
85
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
86
|
+
},
|
|
87
|
+
"group": "build",
|
|
88
|
+
"presentation": {
|
|
89
|
+
"echo": true,
|
|
90
|
+
"reveal": "always",
|
|
91
|
+
"focus": false,
|
|
92
|
+
"panel": "shared"
|
|
93
|
+
},
|
|
94
|
+
"problemMatcher": []
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"label": "🐳 Devcontainer: theme-build",
|
|
98
|
+
"type": "shell",
|
|
99
|
+
"command": "docker",
|
|
100
|
+
"args": ["compose", "-f", ".devcontainer/docker-compose.yml", "-f", ".devcontainer/docker-compose.override.yml", "exec", "wordpress", "bash", "-lc", "cd /workspace/content/themes/{{projectName}} && yarn build"],
|
|
101
|
+
"group": "build",
|
|
102
|
+
"presentation": {
|
|
103
|
+
"echo": true,
|
|
104
|
+
"reveal": "always",
|
|
105
|
+
"focus": false,
|
|
106
|
+
"panel": "shared"
|
|
107
|
+
},
|
|
108
|
+
"problemMatcher": []
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"label": "🐳 Devcontainer: theme-dev",
|
|
112
|
+
"type": "shell",
|
|
113
|
+
"command": "docker",
|
|
114
|
+
"args": ["compose", "-f", ".devcontainer/docker-compose.yml", "-f", ".devcontainer/docker-compose.override.yml", "exec", "wordpress", "bash", "-lc", "cd /workspace/content/themes/{{projectName}} && yarn dev"],
|
|
115
|
+
"group": "build",
|
|
116
|
+
"isBackground": true,
|
|
117
|
+
"presentation": {
|
|
118
|
+
"echo": true,
|
|
119
|
+
"reveal": "always",
|
|
120
|
+
"focus": false,
|
|
121
|
+
"panel": "shared"
|
|
122
|
+
},
|
|
123
|
+
"problemMatcher": []
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"label": "🐳 Devcontainer: theme-lint",
|
|
127
|
+
"type": "shell",
|
|
128
|
+
"command": "docker",
|
|
129
|
+
"args": ["compose", "-f", ".devcontainer/docker-compose.yml", "-f", ".devcontainer/docker-compose.override.yml", "exec", "wordpress", "bash", "-lc", "cd /workspace/content/themes/{{projectName}} && yarn lint"],
|
|
130
|
+
"group": "build",
|
|
131
|
+
"presentation": {
|
|
132
|
+
"echo": true,
|
|
133
|
+
"reveal": "always",
|
|
134
|
+
"focus": false,
|
|
135
|
+
"panel": "shared"
|
|
136
|
+
},
|
|
137
|
+
"problemMatcher": []
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"label": "🐳 Devcontainer: acorn",
|
|
141
|
+
"type": "shell",
|
|
142
|
+
"command": "docker",
|
|
143
|
+
"args": ["compose", "-f", ".devcontainer/docker-compose.yml", "-f", ".devcontainer/docker-compose.override.yml", "exec", "wordpress", "bash", "-lc", "cd /workspace/content/themes/{{projectName}} && wp acorn make:component ExampleBlock"],
|
|
144
|
+
"group": "build",
|
|
145
|
+
"presentation": {
|
|
146
|
+
"echo": true,
|
|
147
|
+
"reveal": "always",
|
|
148
|
+
"focus": false,
|
|
149
|
+
"panel": "shared"
|
|
150
|
+
},
|
|
151
|
+
"problemMatcher": []
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { installSuperpowersSage } from '../../lib/utils/git.js';
|
|
2
|
+
import { log, color } from '../../lib/utils/logger.js';
|
|
3
|
+
|
|
4
|
+
export async function setupModule(context, _generator) {
|
|
5
|
+
if (!context.enable_skills) {
|
|
6
|
+
log(color.orange, '[skills] Instalação de skills desabilitada. Pulando.');
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const targets = context.skills_targets ?? ['claude'];
|
|
11
|
+
|
|
12
|
+
if (targets.length === 0) {
|
|
13
|
+
log(color.orange, '[skills] Nenhum destino selecionado. Pulando.');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
await installSuperpowersSage(context.cwd, targets);
|
|
18
|
+
}
|