@codigodoleo/wp-kit 3.4.0 → 3.5.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/prompts/index.js +9 -1
- package/lib/utils/git.js +109 -5
- package/modules/docs/templates/README.md.hbs +160 -67
- package/modules/git/templates/package.json.hbs +14 -4
- package/modules/lint/templates/package.json.hbs +16 -4
- package/modules/sage/templates/.lando.yml.hbs +11 -16
- package/modules/skills/prompts.js +1 -1
- package/package.json +1 -1
- package/templates/.editorconfig.hbs +39 -5
- package/templates/CLAUDE.md.hbs +48 -23
package/lib/prompts/index.js
CHANGED
|
@@ -21,8 +21,16 @@ export async function runPrompts({ defaults = false } = {}) {
|
|
|
21
21
|
{
|
|
22
22
|
type: 'input',
|
|
23
23
|
name: 'projectName',
|
|
24
|
-
message: 'Project name:',
|
|
24
|
+
message: 'Project name (lowercase, hyphens only):',
|
|
25
25
|
default: 'wordpress-dev',
|
|
26
|
+
filter: (val) =>
|
|
27
|
+
val
|
|
28
|
+
.trim()
|
|
29
|
+
.toLowerCase()
|
|
30
|
+
.replace(/\s+/g, '-')
|
|
31
|
+
.replace(/[^a-z0-9-]/g, ''),
|
|
32
|
+
validate: (val) =>
|
|
33
|
+
/^[a-z0-9][a-z0-9-]*$/.test(val) || 'Use only lowercase letters, numbers and hyphens.',
|
|
26
34
|
},
|
|
27
35
|
{
|
|
28
36
|
type: 'input',
|
package/lib/utils/git.js
CHANGED
|
@@ -6,6 +6,9 @@ import fs from 'fs-extra';
|
|
|
6
6
|
|
|
7
7
|
import { log, color } from './logger.js';
|
|
8
8
|
|
|
9
|
+
const CLAUDE_PLUGIN_SUPERPOWERS_SAGE = '.claude/plugins/superpowers-sage';
|
|
10
|
+
const CLAUDE_PLUGIN_SUPERPOWERS = '.claude/plugins/superpowers';
|
|
11
|
+
|
|
9
12
|
export function getGitUserDefaults() {
|
|
10
13
|
const exec = (cmd) => {
|
|
11
14
|
try {
|
|
@@ -28,7 +31,7 @@ export function getGitUserDefaults() {
|
|
|
28
31
|
*/
|
|
29
32
|
const TARGET_CONFIG = {
|
|
30
33
|
claude: {
|
|
31
|
-
dest:
|
|
34
|
+
dest: CLAUDE_PLUGIN_SUPERPOWERS_SAGE,
|
|
32
35
|
dirs: ['.claude-plugin', 'skills', 'agents', 'hooks'],
|
|
33
36
|
label: 'Claude Code (.claude/)',
|
|
34
37
|
},
|
|
@@ -44,6 +47,78 @@ const TARGET_CONFIG = {
|
|
|
44
47
|
},
|
|
45
48
|
};
|
|
46
49
|
|
|
50
|
+
const CLAUDE_SETTINGS_BASELINE = {
|
|
51
|
+
$schema: 'https://json.schemastore.org/claude-code-settings.json',
|
|
52
|
+
permissions: {
|
|
53
|
+
deny: [
|
|
54
|
+
'Read(./.env)',
|
|
55
|
+
'Read(./.env.*)',
|
|
56
|
+
'Read(./secrets/**)',
|
|
57
|
+
'Read(./config/credentials.json)',
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
function mergeUnique(base = [], extra = []) {
|
|
63
|
+
return [...new Set([...(Array.isArray(base) ? base : []), ...extra])];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function mergeClaudeSettings(existing = {}, incoming = {}) {
|
|
67
|
+
const merged = { ...existing, ...incoming };
|
|
68
|
+
|
|
69
|
+
const existingPermissions = existing.permissions ?? {};
|
|
70
|
+
const incomingPermissions = incoming.permissions ?? {};
|
|
71
|
+
|
|
72
|
+
merged.permissions = {
|
|
73
|
+
...existingPermissions,
|
|
74
|
+
...incomingPermissions,
|
|
75
|
+
deny: mergeUnique(existingPermissions.deny, incomingPermissions.deny),
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
merged.enabledPlugins = {
|
|
79
|
+
...(existing.enabledPlugins ?? {}),
|
|
80
|
+
...(incoming.enabledPlugins ?? {}),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return merged;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function updateClaudeProjectSettings(targetDir, enabledPlugins = {}) {
|
|
87
|
+
const claudeDir = path.join(targetDir, '.claude');
|
|
88
|
+
const settingsPath = path.join(claudeDir, 'settings.json');
|
|
89
|
+
|
|
90
|
+
await fs.ensureDir(claudeDir);
|
|
91
|
+
|
|
92
|
+
let existing = {};
|
|
93
|
+
if (await fs.pathExists(settingsPath)) {
|
|
94
|
+
try {
|
|
95
|
+
existing = await fs.readJson(settingsPath);
|
|
96
|
+
} catch {
|
|
97
|
+
log(
|
|
98
|
+
color.orange,
|
|
99
|
+
'[skills] .claude/settings.json invalido. Recriando com baseline seguro + plugins instalados.'
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const nextSettings = mergeClaudeSettings(existing, {
|
|
105
|
+
...CLAUDE_SETTINGS_BASELINE,
|
|
106
|
+
enabledPlugins,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
await fs.writeJson(settingsPath, nextSettings, { spaces: 2 });
|
|
110
|
+
log(
|
|
111
|
+
color.green,
|
|
112
|
+
'✅ .claude/settings.json atualizado com plugins locais e baseline de seguranca.'
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function cloneRepo(repo, tmpDir) {
|
|
117
|
+
return spawnSync('git', ['clone', '--depth=1', repo, tmpDir], {
|
|
118
|
+
stdio: 'inherit',
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
47
122
|
/**
|
|
48
123
|
* Clona codigodoleo/superpowers-sage e copia o conteúdo para os destinos selecionados.
|
|
49
124
|
* Requer git instalado no host.
|
|
@@ -52,8 +127,10 @@ const TARGET_CONFIG = {
|
|
|
52
127
|
* @param {string[]} targets - Lista de destinos: 'claude' | 'cursor' | 'ai'
|
|
53
128
|
*/
|
|
54
129
|
export async function installSuperpowersSage(targetDir, targets = ['claude']) {
|
|
55
|
-
const
|
|
130
|
+
const sageRepo = 'https://github.com/codigodoleo/superpowers-sage.git';
|
|
131
|
+
const baseRepo = 'https://github.com/obra/superpowers.git';
|
|
56
132
|
const tmpDir = path.join(os.tmpdir(), `superpowers-sage-${Date.now()}`);
|
|
133
|
+
const tmpBaseDir = path.join(os.tmpdir(), `superpowers-base-${Date.now()}`);
|
|
57
134
|
|
|
58
135
|
const validTargets = targets.filter((t) => TARGET_CONFIG[t]);
|
|
59
136
|
if (validTargets.length === 0) {
|
|
@@ -63,9 +140,7 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
|
|
|
63
140
|
|
|
64
141
|
log(color.blue, `🔌 Clonando superpowers-sage para: ${validTargets.join(', ')}...`);
|
|
65
142
|
|
|
66
|
-
const result =
|
|
67
|
-
stdio: 'inherit',
|
|
68
|
-
});
|
|
143
|
+
const result = cloneRepo(sageRepo, tmpDir);
|
|
69
144
|
|
|
70
145
|
if (result.status !== 0) {
|
|
71
146
|
log(
|
|
@@ -92,5 +167,34 @@ export async function installSuperpowersSage(targetDir, targets = ['claude']) {
|
|
|
92
167
|
log(color.green, `✅ superpowers-sage instalado em ${cfg.dest}`);
|
|
93
168
|
}
|
|
94
169
|
|
|
170
|
+
const claudeEnabledPlugins = {
|
|
171
|
+
'superpowers-sage@superpowers-sage-marketplace': true,
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
if (validTargets.includes('claude')) {
|
|
175
|
+
log(color.blue, '🔌 Clonando superpowers (base) para Claude Code...');
|
|
176
|
+
|
|
177
|
+
const baseResult = cloneRepo(baseRepo, tmpBaseDir);
|
|
178
|
+
if (baseResult.status !== 0) {
|
|
179
|
+
log(
|
|
180
|
+
color.orange,
|
|
181
|
+
'⚠️ Nao foi possivel clonar obra/superpowers. O plugin base nao foi instalado localmente.'
|
|
182
|
+
);
|
|
183
|
+
} else {
|
|
184
|
+
const baseDest = path.join(targetDir, CLAUDE_PLUGIN_SUPERPOWERS);
|
|
185
|
+
await fs.ensureDir(baseDest);
|
|
186
|
+
await fs.copy(tmpBaseDir, baseDest, {
|
|
187
|
+
overwrite: true,
|
|
188
|
+
filter: (src) =>
|
|
189
|
+
!src.includes(`${path.sep}.git${path.sep}`) && !src.endsWith(`${path.sep}.git`),
|
|
190
|
+
});
|
|
191
|
+
claudeEnabledPlugins['superpowers@superpowers-dev'] = true;
|
|
192
|
+
log(color.green, `✅ superpowers instalado em ${CLAUDE_PLUGIN_SUPERPOWERS}`);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
await updateClaudeProjectSettings(targetDir, claudeEnabledPlugins);
|
|
196
|
+
}
|
|
197
|
+
|
|
95
198
|
await fs.remove(tmpDir);
|
|
199
|
+
await fs.remove(tmpBaseDir);
|
|
96
200
|
}
|
|
@@ -1,67 +1,160 @@
|
|
|
1
|
-
# 🏠 Pipefy WordPress Website
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
# 🏠 Pipefy WordPress Website
|
|
2
|
+
|
|
3
|
+
Bem-vindo à documentação oficial do site **pipefy.com** - um projeto WordPress robusto e moderno da Pipefy.
|
|
4
|
+
|
|
5
|
+
## 🎯 **Visão Geral**
|
|
6
|
+
|
|
7
|
+
Este é o repositório principal do site institucional da Pipefy, construído com **WordPress** e uma infraestrutura cloud-native moderna. O projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de manutenção.
|
|
8
|
+
|
|
9
|
+
### 📊 **Status do Projeto**
|
|
10
|
+
- **Versão Atual**: `1.1.7` (2025-05-23)
|
|
11
|
+
- **WordPress**: Customizado com tema Pipefy 2020
|
|
12
|
+
- **Ambiente**: Multi-ambiente (Local, Development, Staging, Production)
|
|
13
|
+
- **Deploy**: Automatizado via GitLab CI/CD + Kubernetes
|
|
14
|
+
|
|
15
|
+
## 🚀 **Quick Start**
|
|
16
|
+
|
|
17
|
+
### Pré-requisitos
|
|
18
|
+
- [Lando](https://lando.dev/) (para desenvolvimento local)
|
|
19
|
+
- [Docker](https://docker.com/)
|
|
20
|
+
- [Git](https://git-scm.com/)
|
|
21
|
+
- [Node.js](https://nodejs.org/) (versão especificada em `.nvmrc`)
|
|
22
|
+
|
|
23
|
+
### Setup Rápido
|
|
24
|
+
```bash
|
|
25
|
+
# 1. Clone o repositório
|
|
26
|
+
git clone git@gitlab.com:pipefy/wordpress/pipefy-website.git
|
|
27
|
+
cd pipefy-website
|
|
28
|
+
|
|
29
|
+
# 2. Inicie o ambiente local
|
|
30
|
+
lando start
|
|
31
|
+
|
|
32
|
+
# 3. Configure WordPress
|
|
33
|
+
lando ssh -c "development/scripts/init-wp.sh --user=seu-email@pipefy.com"
|
|
34
|
+
|
|
35
|
+
# 4. Acesse o site
|
|
36
|
+
# Frontend: https://pipefy.lndo.site
|
|
37
|
+
# Admin: https://pipefy.lndo.site/wp-admin
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 🏗️ **Arquitetura**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
44
|
+
│ Local │────│ Development │────│ Staging │────│ Production │
|
|
45
|
+
│ pipefy.lndo.site│ │development-www │ │ staging-www │ │ www.pipefy.com │
|
|
46
|
+
│ │ │ .pipefy.com │ │ .pipefy.com │ │ │
|
|
47
|
+
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
48
|
+
│ │ │ │
|
|
49
|
+
└───────────────────────┼───────────────────────┼───────────────────────┘
|
|
50
|
+
│ │
|
|
51
|
+
┌─────────────────┐ ┌─────────────────┐
|
|
52
|
+
│ GitLab CI/CD │ │ Kubernetes │
|
|
53
|
+
│ Pipelines │ │ + CloudFlare │
|
|
54
|
+
└─────────────────┘ └─────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 🛠️ **Stack Tecnológico**
|
|
58
|
+
|
|
59
|
+
| Categoria | Tecnologia |
|
|
60
|
+
|-----------|------------|
|
|
61
|
+
| **CMS** | WordPress (customizado) |
|
|
62
|
+
| **Tema** | Pipefy 2020 (custom theme) |
|
|
63
|
+
| **Frontend** | PHP, JavaScript, Sass, Gutenberg Blocks |
|
|
64
|
+
| **Containerização** | Docker, Lando |
|
|
65
|
+
| **Orquestração** | Kubernetes, Helm |
|
|
66
|
+
| **CI/CD** | GitLab CI/CD |
|
|
67
|
+
| **Infraestrutura** | Terraform, OCI (Oracle Cloud) |
|
|
68
|
+
| **CDN/DNS** | CloudFlare |
|
|
69
|
+
| **Monitoramento** | Custom health checks |
|
|
70
|
+
|
|
71
|
+
## 📁 **Estrutura do Projeto**
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
pipefy-website/
|
|
75
|
+
├── 📂 dist/ # WordPress core + customizações
|
|
76
|
+
│ └── 📂 wp-content/
|
|
77
|
+
│ ├── 📂 themes/pipefy-2020/ # Tema principal
|
|
78
|
+
│ ├── 📂 plugins/ # Plugins WordPress
|
|
79
|
+
│ └── 📂 mu-plugins/ # Must-use plugins
|
|
80
|
+
├── 📂 development/ # Scripts e config. desenvolvimento
|
|
81
|
+
├── 📂 helm/ # Charts Kubernetes
|
|
82
|
+
├── 📂 k8s/ # Manifests Kubernetes
|
|
83
|
+
├── 📂 terraform/ # Infraestrutura como código
|
|
84
|
+
├── 📂 .gitlab/ # Templates GitLab CI/CD
|
|
85
|
+
├── 📄 .lando.yml # Configuração ambiente local
|
|
86
|
+
├── 📄 .gitlab-ci.yml # Pipeline CI/CD
|
|
87
|
+
└── 📄 CHANGELOG.md # Histórico de mudanças
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 🌍 **Ambientes**
|
|
91
|
+
|
|
92
|
+
| Ambiente | URL | Branch | Namespace K8s | Finalidade |
|
|
93
|
+
|----------|-----|--------|---------------|------------|
|
|
94
|
+
| **Local** | `pipefy.lndo.site` | `feature/*` | - | Desenvolvimento local |
|
|
95
|
+
| **Development** | `development-www.pipefy.com` | `development` | `website-dev` | Testes contínuos |
|
|
96
|
+
| **Staging** | `staging-www.pipefy.com` | `staging` | `website-stg` | Homologação |
|
|
97
|
+
| **Production** | `www.pipefy.com` | `master` | `website-prod` | Site oficial |
|
|
98
|
+
|
|
99
|
+
## 🔄 **Workflow de Desenvolvimento**
|
|
100
|
+
|
|
101
|
+
```mermaid
|
|
102
|
+
graph LR
|
|
103
|
+
A[Feature Branch] --> B[Pull Request]
|
|
104
|
+
B --> C[Code Review]
|
|
105
|
+
C --> D[Merge to Development]
|
|
106
|
+
D --> E["🚀 development-www.pipefy.com"]
|
|
107
|
+
E --> F[Merge to Staging]
|
|
108
|
+
F --> G["🔍 staging-www.pipefy.com"]
|
|
109
|
+
G --> H[Tests + QA]
|
|
110
|
+
H --> I[Merge to Master]
|
|
111
|
+
I --> J["✅ www.pipefy.com"]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 📚 **Documentação Principal**
|
|
115
|
+
|
|
116
|
+
### 🚀 **Para Desenvolvedores**
|
|
117
|
+
- [Getting Started](Getting-Started) - Setup completo do ambiente
|
|
118
|
+
- [Arquitetura](Arquitetura) - Estrutura técnica detalhada
|
|
119
|
+
- [Desenvolvimento](Desenvolvimento) - Guias de desenvolvimento
|
|
120
|
+
- [Deploy Pipeline](Deploy-Pipeline) - Processo de deploy
|
|
121
|
+
|
|
122
|
+
### 🔧 **Para DevOps**
|
|
123
|
+
- [Infraestrutura](Infraestrutura) - Kubernetes, Terraform, AWS
|
|
124
|
+
- [Monitoramento](Monitoramento) - Health checks e observabilidade
|
|
125
|
+
- [Troubleshooting](Troubleshooting) - Resolução de problemas
|
|
126
|
+
|
|
127
|
+
### 📦 **Para Gestão**
|
|
128
|
+
- [Plugins & Integrações](Plugins-Integracoes) - Componentes externos
|
|
129
|
+
- [Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) - Histórico de versões
|
|
130
|
+
- [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) - Responsabilidades
|
|
131
|
+
|
|
132
|
+
## 🆘 **Precisa de Ajuda?**
|
|
133
|
+
|
|
134
|
+
### 🐛 **Problemas Comuns**
|
|
135
|
+
- [Troubleshooting](Troubleshooting) - Guia de resolução
|
|
136
|
+
- [FAQ](FAQ) - Perguntas frequentes
|
|
137
|
+
|
|
138
|
+
### 📞 **Contatos**
|
|
139
|
+
- **Equipe**: @Approvers (conforme [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS))
|
|
140
|
+
- **Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues)
|
|
141
|
+
- **Pipefy Cards**: Vinculados no [CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md)
|
|
142
|
+
|
|
143
|
+
## 🎯 **Links Importantes**
|
|
144
|
+
|
|
145
|
+
| Recurso | Link | Ambiente |
|
|
146
|
+
|---------|------|----------|
|
|
147
|
+
| **Site Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production |
|
|
148
|
+
| **Site Staging** | [staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging |
|
|
149
|
+
| **Site Development** | [development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development |
|
|
150
|
+
| **Site Local** | [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local |
|
|
151
|
+
| **GitLab Project** | [pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - |
|
|
152
|
+
| **CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) | - |
|
|
153
|
+
| **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
📝 **Última atualização**: Junho 2025
|
|
158
|
+
🔄 **Versão da documentação**: 1.1
|
|
159
|
+
✨ **Criado com**: Análise automatizada do projeto + GitHub Copilot
|
|
160
|
+
🌐 **Ambientes atualizados**: Local, Development, Staging, Production
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"prepare": "husky",
|
|
4
|
+
"commit": "lando git-cz"
|
|
5
|
+
},
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"@commitlint/cli": "^19.7.1",
|
|
8
|
+
"@commitlint/config-conventional": "^19.7.1",
|
|
9
|
+
"@commitlint/prompt": "^19.5.0",
|
|
10
|
+
"commitizen": "^4.3.1",
|
|
11
|
+
"husky": "^9.0.11",
|
|
12
|
+
"lint-staged": "^15.5.0"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"format": "prettier --write .",
|
|
4
|
+
"lint": "lando eslint .",
|
|
5
|
+
"lint:fix": "lando eslint . --fix"
|
|
6
|
+
},
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"globals": "^16.3.0",
|
|
9
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
10
|
+
"@eslint/js": "^9.30.1",
|
|
11
|
+
"eslint": "^9.30.1",
|
|
12
|
+
"eslint-config-prettier": "^10.1.5",
|
|
13
|
+
"eslint-plugin-prettier": "^5.3.1",
|
|
14
|
+
"prettier": "^3.6.2"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -16,6 +16,17 @@ tooling:
|
|
|
16
16
|
service: build
|
|
17
17
|
description: Run the Sage/Vite development server
|
|
18
18
|
cmd: npm run dev --prefix /app/content/themes/{{projectName}}
|
|
19
|
+
flush:
|
|
20
|
+
service: appserver
|
|
21
|
+
description: Flush WordPress, Acorn and Redis caches
|
|
22
|
+
cmd:
|
|
23
|
+
- appserver: wp acorn optimize:clear
|
|
24
|
+
- appserver: wp acorn cache:clear
|
|
25
|
+
- appserver: wp acorn view:clear
|
|
26
|
+
- appserver: wp acorn route:clear
|
|
27
|
+
- appserver: wp rewrite flush
|
|
28
|
+
- appserver: wp cache flush
|
|
29
|
+
- cache: redis-cli FLUSHDB
|
|
19
30
|
theme-bootstrap:
|
|
20
31
|
service: appserver
|
|
21
32
|
description: Install theme dependencies
|
|
@@ -43,19 +54,3 @@ tooling:
|
|
|
43
54
|
cmd: npx stylelint --fix "resources/**/*.{css,scss}" --config /app/content/themes/{{projectName}}/.stylelintrc.json
|
|
44
55
|
dir: /app/content/themes/{{projectName}}
|
|
45
56
|
{{/if}}
|
|
46
|
-
acorn:
|
|
47
|
-
service: appserver
|
|
48
|
-
description: Run Acorn artisan commands
|
|
49
|
-
dir: /app/content/themes/{{projectName}}
|
|
50
|
-
cmd: wp acorn $ACORN_COMMAND
|
|
51
|
-
options:
|
|
52
|
-
command:
|
|
53
|
-
passthrough: true
|
|
54
|
-
alias:
|
|
55
|
-
- c
|
|
56
|
-
describe: Acorn command to execute
|
|
57
|
-
interactive:
|
|
58
|
-
type: input
|
|
59
|
-
message: "Acorn command (example: make:component Hero)"
|
|
60
|
-
weight: 100
|
|
61
|
-
env: ACORN_COMMAND
|
package/package.json
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
indent_style = space
|
|
6
|
+
indent_size = 2
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.php]
|
|
12
|
+
indent_size = 4
|
|
13
|
+
max_line_length = 120
|
|
14
|
+
|
|
15
|
+
[*.blade.php]
|
|
16
|
+
indent_size = 4
|
|
17
|
+
insert_final_newline = true
|
|
18
|
+
trim_trailing_whitespace = true
|
|
19
|
+
|
|
20
|
+
[*.js]
|
|
21
|
+
indent_size = 2
|
|
22
|
+
|
|
23
|
+
[*.json]
|
|
24
|
+
indent_size = 2
|
|
25
|
+
|
|
26
|
+
[*.css]
|
|
27
|
+
indent_size = 2
|
|
28
|
+
|
|
29
|
+
[*.scss]
|
|
30
|
+
indent_size = 2
|
|
31
|
+
|
|
32
|
+
[*.md]
|
|
33
|
+
trim_trailing_whitespace = false
|
|
34
|
+
|
|
35
|
+
[*.yml]
|
|
36
|
+
indent_size = 2
|
|
37
|
+
|
|
38
|
+
[*.yaml]
|
|
39
|
+
indent_size = 2
|
package/templates/CLAUDE.md.hbs
CHANGED
|
@@ -1,28 +1,53 @@
|
|
|
1
|
-
#
|
|
2
|
-
{{projectName}}
|
|
1
|
+
# {{projectName}}
|
|
3
2
|
|
|
4
3
|
> WordPress project scaffolded by [wp-kit](https://github.com/codigodoleo/wp-kit), using the
|
|
5
|
-
[Roots](https://roots.io/) ecosystem: Bedrock, Sage, Acorn, and Lando.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
{{
|
|
11
|
-
{{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
> [Roots](https://roots.io/) ecosystem: Bedrock, Sage, Acorn, and Lando.
|
|
5
|
+
|
|
6
|
+
## Stack
|
|
7
|
+
|
|
8
|
+
- PHP {{phpVersion}}
|
|
9
|
+
- Node.js {{nodeVersion}}
|
|
10
|
+
- WordPress {{wpCoreVersion}}
|
|
11
|
+
{{#if useSage}}- Sage {{sageVersion}} + Acorn
|
|
12
|
+
{{/if}}- Lando (local development)
|
|
13
|
+
|
|
14
|
+
## Local Development
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
lando start
|
|
18
|
+
lando dev # HMR dev server (Vite)
|
|
19
|
+
lando theme-build # Production build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## AI Co-Pilot
|
|
23
|
+
|
|
24
|
+
This project includes [superpowers](https://github.com/obra/superpowers) and [superpowers-sage](https://github.com/codigodoleo/superpowers-sage) in `.claude/`.
|
|
25
|
+
Start a session with:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/sage-onboard
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Available commands:
|
|
32
|
+
|
|
33
|
+
| Command | Purpose |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `/sage-onboard` | Project analysis and overview |
|
|
36
|
+
| `/sage-plan` | Architecture decision for a new feature |
|
|
37
|
+
| `/sage-scaffold` | Run generators and create stubs |
|
|
38
|
+
| `/sage-review` | Review code against conventions |
|
|
39
|
+
| `/sage-debug` | Guided troubleshooting |
|
|
40
|
+
|
|
41
|
+
## Theme
|
|
21
42
|
|
|
22
43
|
{{#if useSage}}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
Theme located at `content/themes/{{themeName}}/`.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
lando theme-bootstrap # Install theme dependencies
|
|
48
|
+
lando acorn make:component ComponentName
|
|
49
|
+
lando acorn acf:block BlockName
|
|
50
|
+
```
|
|
26
51
|
{{else}}
|
|
27
|
-
|
|
28
|
-
{{/if}}
|
|
52
|
+
No Sage theme configured.
|
|
53
|
+
{{/if}}
|