@codigodoleo/wp-kit 3.1.0 → 3.1.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/modules/git/index.js +34 -38
- package/modules/git/templates/.lando.yml.hbs +13 -5
- package/modules/git/templates/workspace.json.hbs +114 -28
- package/modules/lint/templates/.lando.yml.hbs +10 -2
- package/modules/lint/templates/workspace.json.hbs +56 -15
- package/modules/php/templates/.lando.yml.hbs +11 -2
- package/modules/php/templates/workspace.json.hbs +74 -15
- package/modules/redis/templates/.lando.yml.hbs +8 -1
- package/modules/sage/templates/.lando.yml.hbs +63 -20
- package/modules/sage/templates/workspace.json.hbs +67 -12
- package/package.json +1 -1
- package/templates/.lando.yml.hbs +44 -11
- package/templates/workspace.json.hbs +177 -40
package/modules/git/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import {
|
|
2
|
+
import { execFileSync } from 'child_process';
|
|
3
3
|
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
|
|
6
6
|
import { log, color } from '../../lib/utils/logger.js';
|
|
7
7
|
|
|
8
|
+
function runGitCommand(args, cwd, stdio = 'ignore') {
|
|
9
|
+
return execFileSync('git', args, { cwd, stdio });
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
export async function setupModule(context, generator) {
|
|
9
13
|
const gitDir = path.join(generator.cwd, '.git');
|
|
10
14
|
|
|
@@ -25,17 +29,14 @@ export async function setupModule(context, generator) {
|
|
|
25
29
|
|
|
26
30
|
if (!(await fs.pathExists(gitDir))) {
|
|
27
31
|
log(color.orange, '[git] Initializing Git repository');
|
|
28
|
-
|
|
32
|
+
runGitCommand(['init'], generator.cwd);
|
|
29
33
|
await generator.copyFile('.gitmessage', 'git');
|
|
30
34
|
|
|
31
35
|
if (context.defaultBranch && context.defaultBranch !== 'main') {
|
|
32
36
|
try {
|
|
33
|
-
|
|
34
|
-
cwd: generator.cwd,
|
|
35
|
-
stdio: 'ignore',
|
|
36
|
-
});
|
|
37
|
+
runGitCommand(['branch', '-M', context.defaultBranch], generator.cwd);
|
|
37
38
|
log(color.green, `[git] Default branch set to: ${context.defaultBranch}`);
|
|
38
|
-
} catch
|
|
39
|
+
} catch {
|
|
39
40
|
log(color.yellow, '[git] Warning: Could not rename default branch');
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -50,39 +51,30 @@ export async function setupModule(context, generator) {
|
|
|
50
51
|
|
|
51
52
|
for (const [key, value] of gitConfigs) {
|
|
52
53
|
try {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
stdio: 'ignore',
|
|
56
|
-
});
|
|
57
|
-
} catch (error) {
|
|
54
|
+
runGitCommand(['config', key, value], generator.cwd);
|
|
55
|
+
} catch {
|
|
58
56
|
log(color.yellow, `[git] Warning: Could not set ${key}`);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
|
|
62
60
|
try {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
stdio: 'ignore',
|
|
66
|
-
});
|
|
67
|
-
} catch (error) {
|
|
61
|
+
runGitCommand(['config', 'user.name', context.author], generator.cwd);
|
|
62
|
+
} catch {
|
|
68
63
|
log(color.yellow, `[git] Warning: Could not set user.name`);
|
|
69
64
|
}
|
|
70
65
|
|
|
71
66
|
try {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
stdio: 'ignore',
|
|
75
|
-
});
|
|
76
|
-
} catch (error) {
|
|
67
|
+
runGitCommand(['config', 'user.email', context.authorEmail], generator.cwd);
|
|
68
|
+
} catch {
|
|
77
69
|
log(color.yellow, `[git] Warning: Could not set user.email`);
|
|
78
70
|
}
|
|
79
71
|
|
|
80
72
|
try {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
} catch
|
|
73
|
+
runGitCommand(
|
|
74
|
+
['config', 'commit.template', path.join(generator.cwd, '.gitmessage')],
|
|
75
|
+
generator.cwd
|
|
76
|
+
);
|
|
77
|
+
} catch {
|
|
86
78
|
log(color.yellow, `[git] Warning: Could not set commit.template`);
|
|
87
79
|
}
|
|
88
80
|
}
|
|
@@ -110,7 +102,7 @@ export async function setupModule(context, generator) {
|
|
|
110
102
|
// Registra hook para fazer o commit inicial após todo o setup
|
|
111
103
|
generator.hooks.addAction(
|
|
112
104
|
'after_setup_complete',
|
|
113
|
-
async (context,
|
|
105
|
+
async (context, _generator) => {
|
|
114
106
|
const projectGitDir = path.join(context.cwd, '.git');
|
|
115
107
|
if (!(await fs.pathExists(projectGitDir))) {
|
|
116
108
|
return; // Repositório não foi inicializado neste setup
|
|
@@ -120,16 +112,20 @@ export async function setupModule(context, generator) {
|
|
|
120
112
|
log(color.blue, '[git] Making initial commit...');
|
|
121
113
|
|
|
122
114
|
// Adiciona todos os arquivos
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
115
|
+
runGitCommand(['add', '.'], context.cwd);
|
|
116
|
+
|
|
117
|
+
// Ignora assinatura e hooks neste commit automático para não depender do ambiente local.
|
|
118
|
+
runGitCommand(
|
|
119
|
+
[
|
|
120
|
+
'-c',
|
|
121
|
+
'commit.gpgsign=false',
|
|
122
|
+
'commit',
|
|
123
|
+
'--no-verify',
|
|
124
|
+
'-m',
|
|
125
|
+
'chore: initial project setup',
|
|
126
|
+
],
|
|
127
|
+
context.cwd
|
|
128
|
+
);
|
|
133
129
|
|
|
134
130
|
log(color.green, '[git] ✅ Initial commit created successfully');
|
|
135
131
|
} catch (error) {
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
git-cz
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
tooling:
|
|
2
|
+
git-cz:
|
|
3
|
+
service: appserver
|
|
4
|
+
description: Make commit using Conventional Commits
|
|
5
|
+
cmd: npx git-cz
|
|
6
|
+
commitlint-check:
|
|
7
|
+
service: appserver
|
|
8
|
+
description: Verificar se a mensagem de commit segue o padrão
|
|
9
|
+
cmd: npx commitlint --from HEAD~1 --to HEAD --verbose
|
|
10
|
+
conventional-changelog:
|
|
11
|
+
service: appserver
|
|
12
|
+
description: Gerar changelog baseado em commits convencionais
|
|
13
|
+
cmd: npx conventional-changelog -p angular -i CHANGELOG.md -s
|
|
@@ -1,28 +1,114 @@
|
|
|
1
|
-
{
|
|
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
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"git.inputValidation": "always",
|
|
4
|
+
"git.inputValidationSubjectLength": 72,
|
|
5
|
+
"git.inputValidationLength": 72,
|
|
6
|
+
"git.verboseCommit": true,
|
|
7
|
+
"git.useCommitInputAsStashMessage": true,
|
|
8
|
+
"git.promptToSaveFilesBeforeCommit": "always",
|
|
9
|
+
"git.confirmSync": false,
|
|
10
|
+
"git.autofetch": true,
|
|
11
|
+
"git.enableSmartCommit": true,
|
|
12
|
+
"git.smartCommitChanges": "tracked",
|
|
13
|
+
"git.allowForcePush": false,
|
|
14
|
+
"git.alwaysSignOff": false,
|
|
15
|
+
"git.enableCommitSigning": true,
|
|
16
|
+
"conventionalCommits.emojiFormat": "emoji",
|
|
17
|
+
"conventionalCommits.showEditor": true,
|
|
18
|
+
"conventionalCommits.silent": false,
|
|
19
|
+
"conventionalCommits.autoCommit": false,
|
|
20
|
+
"conventionalCommits.promptBody": true,
|
|
21
|
+
"conventionalCommits.promptFooter": true,
|
|
22
|
+
"conventionalCommits.promptScope": true,
|
|
23
|
+
"conventionalCommits.scopes": [
|
|
24
|
+
"ui",
|
|
25
|
+
"api",
|
|
26
|
+
"auth",
|
|
27
|
+
"config",
|
|
28
|
+
"deps",
|
|
29
|
+
"docs",
|
|
30
|
+
"tests",
|
|
31
|
+
"build",
|
|
32
|
+
"ci",
|
|
33
|
+
"theme",
|
|
34
|
+
"plugin",
|
|
35
|
+
"database",
|
|
36
|
+
"security",
|
|
37
|
+
"performance",
|
|
38
|
+
"core",
|
|
39
|
+
"docker",
|
|
40
|
+
"lando"
|
|
41
|
+
],
|
|
42
|
+
"conventionalCommits.gitmoji": false,
|
|
43
|
+
"conventionalCommits.lineBreak": "\\n",
|
|
44
|
+
"gitlens.ai.experimental.generateCommitMessage.enabled": true,
|
|
45
|
+
"gitlens.experimental.generateCommitMessage.enabled": true,
|
|
46
|
+
"gitlens.ai.experimental.generateCommitMessage.model": "gpt-4",
|
|
47
|
+
"gitlens.ai.experimental.generateCommitMessage.maxTokens": 200,
|
|
48
|
+
"gitlens.ai.experimental.generateCommitMessage.temperature": 0.2,
|
|
49
|
+
"github.copilot.enable": {
|
|
50
|
+
"*": true,
|
|
51
|
+
"yaml": true,
|
|
52
|
+
"plaintext": true,
|
|
53
|
+
"markdown": true,
|
|
54
|
+
"scminput": true
|
|
55
|
+
},
|
|
56
|
+
"github.copilot.advanced": {
|
|
57
|
+
"debug.overrideEngine": "copilot-chat",
|
|
58
|
+
"debug.useNodeFetcher": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"extensions": {
|
|
62
|
+
"recommendations": [
|
|
63
|
+
"eamodio.gitlens",
|
|
64
|
+
"mhutchie.git-graph",
|
|
65
|
+
"vivaxy.vscode-conventional-commits"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"tasks": {
|
|
69
|
+
"tasks": [
|
|
70
|
+
{
|
|
71
|
+
"label": "📝 Conventional Commit (via Lando)",
|
|
72
|
+
"type": "shell",
|
|
73
|
+
"command": "lando",
|
|
74
|
+
"args": ["git-cz"],
|
|
75
|
+
"group": "build",
|
|
76
|
+
"presentation": {
|
|
77
|
+
"echo": true,
|
|
78
|
+
"reveal": "always",
|
|
79
|
+
"focus": false,
|
|
80
|
+
"panel": "shared"
|
|
81
|
+
},
|
|
82
|
+
"problemMatcher": []
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"label": "🔍 CommitLint: Check Last Commit",
|
|
86
|
+
"type": "shell",
|
|
87
|
+
"command": "lando",
|
|
88
|
+
"args": ["commitlint-check"],
|
|
89
|
+
"group": "test",
|
|
90
|
+
"presentation": {
|
|
91
|
+
"echo": true,
|
|
92
|
+
"reveal": "always",
|
|
93
|
+
"focus": false,
|
|
94
|
+
"panel": "shared"
|
|
95
|
+
},
|
|
96
|
+
"problemMatcher": []
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"label": "📋 Generate Changelog",
|
|
100
|
+
"type": "shell",
|
|
101
|
+
"command": "lando",
|
|
102
|
+
"args": ["conventional-changelog"],
|
|
103
|
+
"group": "build",
|
|
104
|
+
"presentation": {
|
|
105
|
+
"echo": true,
|
|
106
|
+
"reveal": "always",
|
|
107
|
+
"focus": false,
|
|
108
|
+
"panel": "shared"
|
|
109
|
+
},
|
|
110
|
+
"problemMatcher": []
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
|
|
1
|
+
tooling:
|
|
2
|
+
eslint:
|
|
3
|
+
service: appserver
|
|
4
|
+
cmd: yarn eslint
|
|
5
|
+
prettier:
|
|
6
|
+
service: appserver
|
|
7
|
+
cmd: yarn prettier
|
|
8
|
+
stylelint:
|
|
9
|
+
service: appserver
|
|
10
|
+
cmd: yarn stylelint **/*.{css,scss,vue}
|
|
@@ -1,15 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"editor.
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
4
|
+
"editor.formatOnSave": false,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll": true,
|
|
7
|
+
"source.fixAll.eslint": true,
|
|
8
|
+
"source.organizeImports": true
|
|
9
|
+
},
|
|
10
|
+
"prettier.requireConfig": true,
|
|
11
|
+
"prettier.useEditorConfig": true,
|
|
12
|
+
"[blade]": {
|
|
13
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
14
|
+
"editor.formatOnSave": false,
|
|
15
|
+
"editor.insertSpaces": true,
|
|
16
|
+
"editor.tabSize": 2
|
|
17
|
+
},
|
|
18
|
+
"[javascript]": {
|
|
19
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
20
|
+
"editor.formatOnSave": false,
|
|
21
|
+
"editor.insertSpaces": true,
|
|
22
|
+
"editor.tabSize": 2
|
|
23
|
+
},
|
|
24
|
+
"[typescript]": {
|
|
25
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
26
|
+
"editor.formatOnSave": false,
|
|
27
|
+
"editor.insertSpaces": true,
|
|
28
|
+
"editor.tabSize": 2
|
|
29
|
+
},
|
|
30
|
+
"[css]": {
|
|
31
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
32
|
+
"editor.formatOnSave": false,
|
|
33
|
+
"editor.insertSpaces": true,
|
|
34
|
+
"editor.tabSize": 2
|
|
35
|
+
},
|
|
36
|
+
"[scss]": {
|
|
37
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
38
|
+
"editor.formatOnSave": false,
|
|
39
|
+
"editor.insertSpaces": true,
|
|
40
|
+
"editor.tabSize": 2
|
|
41
|
+
},
|
|
42
|
+
"files.eol": "\n",
|
|
43
|
+
"files.trimTrailingWhitespace": true,
|
|
44
|
+
"files.insertFinalNewline": true
|
|
45
|
+
},
|
|
46
|
+
"extensions": {
|
|
47
|
+
"recommendations": [
|
|
48
|
+
"esbenp.prettier-vscode",
|
|
49
|
+
"dbaeumer.vscode-eslint",
|
|
50
|
+
"editorconfig.editorconfig",
|
|
51
|
+
"stylelint.vscode-stylelint",
|
|
52
|
+
"bmewburn.vscode-intelephense-client",
|
|
53
|
+
"bradlc.vscode-tailwindcss"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
tooling:
|
|
2
|
-
pint
|
|
1
|
+
tooling:
|
|
2
|
+
pint:
|
|
3
|
+
service: appserver
|
|
4
|
+
description: PHP Code Style (modern PSR-12)
|
|
5
|
+
cmd:
|
|
6
|
+
- pint
|
|
7
|
+
pint-check:
|
|
8
|
+
service: appserver
|
|
9
|
+
description: Check code style without fixing
|
|
10
|
+
cmd:
|
|
11
|
+
- pint --test
|
|
@@ -1,15 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
1
|
+
{
|
|
2
|
+
"settings": {
|
|
3
|
+
"php.validate.enable": true,
|
|
4
|
+
"php.validate.executablePath": "${workspaceFolder}/scripts/php-wrapper.sh",
|
|
5
|
+
"php.validate.run": "onSave",
|
|
6
|
+
"php.suggest.basic": false,
|
|
7
|
+
"intelephense.files.maxSize": 5000000,
|
|
8
|
+
"intelephense.files.exclude": [
|
|
9
|
+
"**/.git/**",
|
|
10
|
+
"**/node_modules/**",
|
|
11
|
+
"**/vendor/**/{Test,test,Tests,tests}/**",
|
|
12
|
+
"**/.lando/**",
|
|
13
|
+
"**/wp/**",
|
|
14
|
+
"**/content/cache/**"
|
|
15
|
+
],
|
|
16
|
+
"intelephense.stubs": [
|
|
17
|
+
"wordpress"
|
|
18
|
+
],
|
|
19
|
+
"[php]": {
|
|
20
|
+
"editor.defaultFormatter": "open-southeners.laravel-pint",
|
|
21
|
+
"editor.formatOnSave": true,
|
|
22
|
+
"editor.insertSpaces": true,
|
|
23
|
+
"editor.tabSize": 4
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"extensions": {
|
|
27
|
+
"recommendations": [
|
|
28
|
+
"open-southeners.laravel-pint"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"tasks": {
|
|
32
|
+
"tasks": [
|
|
33
|
+
{
|
|
34
|
+
"label": "🔧 PHP: Fix Code Style (Pint)",
|
|
35
|
+
"type": "shell",
|
|
36
|
+
"command": "lando",
|
|
37
|
+
"args": ["pint"],
|
|
38
|
+
"group": "build",
|
|
39
|
+
"presentation": {
|
|
40
|
+
"echo": true,
|
|
41
|
+
"reveal": "always",
|
|
42
|
+
"focus": false,
|
|
43
|
+
"panel": "shared"
|
|
44
|
+
},
|
|
45
|
+
"problemMatcher": []
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "🔍 PHP: Check Code Style (Pint)",
|
|
49
|
+
"type": "shell",
|
|
50
|
+
"command": "lando",
|
|
51
|
+
"args": ["pint", "--test"],
|
|
52
|
+
"group": "test",
|
|
53
|
+
"presentation": {
|
|
54
|
+
"echo": true,
|
|
55
|
+
"reveal": "always",
|
|
56
|
+
"focus": false,
|
|
57
|
+
"panel": "shared"
|
|
58
|
+
},
|
|
59
|
+
"problemMatcher": {
|
|
60
|
+
"owner": "pint",
|
|
61
|
+
"fileLocation": "absolute",
|
|
62
|
+
"pattern": {
|
|
63
|
+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error)\\s+-\\s+(.*)$",
|
|
64
|
+
"file": 1,
|
|
65
|
+
"line": 2,
|
|
66
|
+
"column": 3,
|
|
67
|
+
"severity": 4,
|
|
68
|
+
"message": 5
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1,20 +1,63 @@
|
|
|
1
|
-
events:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
{{projectName}}
|
|
5
|
-
-
|
|
6
|
-
&& wp acorn optimize:clear && wp acorn optimize
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/app/content/themes/{{projectName}}
|
|
12
|
-
cmd:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
events:
|
|
2
|
+
post-start:
|
|
3
|
+
- cd /app/content/themes/{{projectName}} && composer install --no-interaction --no-progress --optimize-autoloader
|
|
4
|
+
- cd /app/content/themes/{{projectName}} && yarn install && yarn build
|
|
5
|
+
- wp theme activate {{projectName}}
|
|
6
|
+
- cd /app/content/themes/{{projectName}} && wp acorn optimize:clear && wp acorn optimize
|
|
7
|
+
tooling:
|
|
8
|
+
theme-build:
|
|
9
|
+
service: appserver
|
|
10
|
+
description: "Build the Sage theme"
|
|
11
|
+
dir: /app/content/themes/{{projectName}}
|
|
12
|
+
cmd:
|
|
13
|
+
- composer install --no-interaction --no-progress --optimize-autoloader
|
|
14
|
+
- yarn install
|
|
15
|
+
- yarn build
|
|
16
|
+
theme-lint:
|
|
17
|
+
service: appserver
|
|
18
|
+
description: "Lint the Sage theme"
|
|
19
|
+
dir: /app/content/themes/{{projectName}}
|
|
20
|
+
cmd:
|
|
21
|
+
- yarn lint
|
|
22
|
+
- pint --test
|
|
23
|
+
theme-dev:
|
|
24
|
+
service: appserver
|
|
25
|
+
description: "Dev the Sage theme"
|
|
26
|
+
dir: /app/content/themes/{{projectName}}
|
|
27
|
+
cmd:
|
|
28
|
+
- yarn dev
|
|
29
|
+
acorn-make:
|
|
30
|
+
service: appserver
|
|
31
|
+
description: Create new Acorn classes interactively
|
|
32
|
+
dir: /app/content/themes/{{projectName}}
|
|
33
|
+
cmd: wp acorn make:$ACORN_TYPE $ACORN_NAME
|
|
34
|
+
options:
|
|
35
|
+
type:
|
|
36
|
+
passthrough: true
|
|
37
|
+
alias:
|
|
38
|
+
- t
|
|
39
|
+
describe: Type of class to create
|
|
40
|
+
interactive:
|
|
41
|
+
type: list
|
|
42
|
+
message: What type of class would you like to create?
|
|
43
|
+
choices:
|
|
44
|
+
- name: Command (Artisan command)
|
|
45
|
+
value: command
|
|
46
|
+
- name: Component (View component class)
|
|
47
|
+
value: component
|
|
48
|
+
- name: Composer (View composer class)
|
|
49
|
+
value: composer
|
|
50
|
+
- name: Provider (Service provider class)
|
|
51
|
+
value: provider
|
|
52
|
+
weight: 100
|
|
53
|
+
env: ACORN_TYPE
|
|
54
|
+
filename:
|
|
55
|
+
passthrough: true
|
|
56
|
+
alias:
|
|
57
|
+
- n
|
|
58
|
+
describe: Name of the class to create
|
|
59
|
+
interactive:
|
|
60
|
+
type: input
|
|
61
|
+
message: What is the name of the class?
|
|
62
|
+
weight: 200
|
|
63
|
+
env: ACORN_NAME
|
|
@@ -1,12 +1,67 @@
|
|
|
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": "🏗️ Theme: Build Assets",
|
|
15
|
+
"type": "shell",
|
|
16
|
+
"command": "lando",
|
|
17
|
+
"args": ["yarn", "build"],
|
|
18
|
+
"options": {
|
|
19
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
20
|
+
},
|
|
21
|
+
"group": "build",
|
|
22
|
+
"presentation": {
|
|
23
|
+
"echo": true,
|
|
24
|
+
"reveal": "always",
|
|
25
|
+
"focus": false,
|
|
26
|
+
"panel": "shared"
|
|
27
|
+
},
|
|
28
|
+
"problemMatcher": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"label": "👀 Theme: Watch Assets",
|
|
32
|
+
"type": "shell",
|
|
33
|
+
"command": "lando",
|
|
34
|
+
"args": ["yarn", "dev"],
|
|
35
|
+
"options": {
|
|
36
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
37
|
+
},
|
|
38
|
+
"group": "build",
|
|
39
|
+
"isBackground": true,
|
|
40
|
+
"presentation": {
|
|
41
|
+
"echo": true,
|
|
42
|
+
"reveal": "always",
|
|
43
|
+
"focus": false,
|
|
44
|
+
"panel": "shared"
|
|
45
|
+
},
|
|
46
|
+
"problemMatcher": []
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "📦 Theme: Composer Install",
|
|
50
|
+
"type": "shell",
|
|
51
|
+
"command": "lando",
|
|
52
|
+
"args": ["composer", "install"],
|
|
53
|
+
"options": {
|
|
54
|
+
"cwd": "${workspaceFolder}/content/themes/{{projectName}}"
|
|
55
|
+
},
|
|
56
|
+
"group": "build",
|
|
57
|
+
"presentation": {
|
|
58
|
+
"echo": true,
|
|
59
|
+
"reveal": "always",
|
|
60
|
+
"focus": false,
|
|
61
|
+
"panel": "shared"
|
|
62
|
+
},
|
|
63
|
+
"problemMatcher": []
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
package/package.json
CHANGED
package/templates/.lando.yml.hbs
CHANGED
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
name:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
name: {{projectName}}
|
|
2
|
+
recipe: wordpress
|
|
3
|
+
config:
|
|
4
|
+
webroot: ./
|
|
5
|
+
via: nginx
|
|
6
|
+
php: "{{phpVersion}}"
|
|
7
|
+
xdebug: true
|
|
8
|
+
extra_php_extensions:
|
|
9
|
+
- bcmath
|
|
10
|
+
- exif
|
|
11
|
+
- gd
|
|
12
|
+
- mysqli
|
|
13
|
+
- zip
|
|
14
|
+
- imagick
|
|
15
|
+
- redis
|
|
16
|
+
config:
|
|
17
|
+
php: ./server/php/php.ini
|
|
18
|
+
vhosts: ./server/www/vhosts.conf
|
|
19
|
+
env_file:
|
|
20
|
+
- .env
|
|
21
|
+
services:
|
|
22
|
+
appserver:
|
|
23
|
+
build_as_root:
|
|
24
|
+
- apt-get update
|
|
25
|
+
- apt-get install -y curl gnupg
|
|
26
|
+
- curl -fsSL https://deb.nodesource.com/setup_23.x | bash -
|
|
27
|
+
- apt-get install -y nodejs
|
|
28
|
+
- npm install -g npm@latest
|
|
29
|
+
- npm install -g yarn@1.22
|
|
30
|
+
events:
|
|
31
|
+
post-start:
|
|
32
|
+
- bash ./server/cmd/install-wp.sh
|
|
33
|
+
- composer install --no-interaction --no-progress --optimize-autoloader
|
|
34
|
+
tooling:
|
|
35
|
+
yarn:
|
|
36
|
+
service: appserver
|
|
37
|
+
yarn-upgrade:
|
|
38
|
+
service: appserver
|
|
39
|
+
cmd: yarn upgrade --latest
|
|
40
|
+
yarn-clean-install:
|
|
41
|
+
service: appserver
|
|
42
|
+
cmd:
|
|
43
|
+
- rm -rf node_modules
|
|
44
|
+
- yarn install
|
|
@@ -1,40 +1,177 @@
|
|
|
1
|
-
{
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"folders": [
|
|
3
|
+
{
|
|
4
|
+
"name": "🌿 {{projectName}}",
|
|
5
|
+
"path": "."
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"settings": {
|
|
9
|
+
"git.inputValidation": "always",
|
|
10
|
+
"git.inputValidationLength": 100,
|
|
11
|
+
"git.inputValidationSubjectLength": 100,
|
|
12
|
+
"git.confirmSync": false,
|
|
13
|
+
"git.autofetch": true,
|
|
14
|
+
"git.enableSmartCommit": true,
|
|
15
|
+
"git.suggestSmartCommit": true,
|
|
16
|
+
"git.autoStash": true,
|
|
17
|
+
"git.allowNoVerifyCommit": false,
|
|
18
|
+
"editor.formatOnSave": false,
|
|
19
|
+
"editor.codeActionsOnSave": {
|
|
20
|
+
"source.fixAll.eslint": "explicit",
|
|
21
|
+
"source.organizeImports": "explicit"
|
|
22
|
+
},
|
|
23
|
+
"editor.tabSize": 4,
|
|
24
|
+
"editor.insertSpaces": true,
|
|
25
|
+
"search.exclude": {
|
|
26
|
+
"**/node_modules": true,
|
|
27
|
+
"**/vendor": true,
|
|
28
|
+
"**/.lando": true,
|
|
29
|
+
"**/public/build": true,
|
|
30
|
+
"**/dist": true,
|
|
31
|
+
"**/.git": true,
|
|
32
|
+
"**/wp": true
|
|
33
|
+
},
|
|
34
|
+
"files.exclude": {
|
|
35
|
+
"**/node_modules": true,
|
|
36
|
+
"**/vendor": true,
|
|
37
|
+
"**/.git": true,
|
|
38
|
+
"**/.DS_Store": true,
|
|
39
|
+
"**/Thumbs.db": true
|
|
40
|
+
},
|
|
41
|
+
"extensions.ignoreRecommendations": false,
|
|
42
|
+
"emmet.includeLanguages": {
|
|
43
|
+
"blade": "html",
|
|
44
|
+
"php": "html"
|
|
45
|
+
},
|
|
46
|
+
"files.autoSave": "onFocusChange",
|
|
47
|
+
"files.trimTrailingWhitespace": true,
|
|
48
|
+
"files.insertFinalNewline": true
|
|
49
|
+
},
|
|
50
|
+
"extensions": {
|
|
51
|
+
"recommendations": [
|
|
52
|
+
"eamodio.gitlens",
|
|
53
|
+
"ms-vscode.vscode-json",
|
|
54
|
+
"streetsidesoftware.code-spell-checker",
|
|
55
|
+
"vivaxy.vscode-conventional-commits",
|
|
56
|
+
"bmewburn.vscode-intelephense-client",
|
|
57
|
+
"wordpresstoolbox.wordpress-toolbox",
|
|
58
|
+
"tungvn.wordpress-snippet",
|
|
59
|
+
"junstyle.php-cs-fixer",
|
|
60
|
+
"felixfbecker.php-debug",
|
|
61
|
+
"esbenp.prettier-vscode",
|
|
62
|
+
"dbaeumer.vscode-eslint",
|
|
63
|
+
"bradlc.vscode-tailwindcss",
|
|
64
|
+
"ms-azuretools.vscode-docker",
|
|
65
|
+
"ms-vscode-remote.remote-containers",
|
|
66
|
+
"ms-vscode.vscode-typescript-next",
|
|
67
|
+
"formulahendry.auto-rename-tag",
|
|
68
|
+
"christian-kohler.path-intellisense",
|
|
69
|
+
"ms-vscode.vscode-todo-highlight",
|
|
70
|
+
"mhutchie.git-graph",
|
|
71
|
+
"pkief.material-icon-theme",
|
|
72
|
+
"zhuangtongfa.material-theme",
|
|
73
|
+
"xdebug.php-debug",
|
|
74
|
+
"yzhang.markdown-all-in-one",
|
|
75
|
+
"davidanson.vscode-markdownlint",
|
|
76
|
+
"editorconfig.editorconfig",
|
|
77
|
+
"ms-vscode.js-debug",
|
|
78
|
+
"johnbillion.vscode-wordpress-hooks",
|
|
79
|
+
"valeryanm.vscode-phpsab",
|
|
80
|
+
"GitHub.copilot",
|
|
81
|
+
"GitHub.copilot-chat",
|
|
82
|
+
"ms-vscode-remote.remote-wsl",
|
|
83
|
+
"Catppuccin.catppuccin-vsc",
|
|
84
|
+
"sainnhe.everforest"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"tasks": {
|
|
88
|
+
"version": "2.0.0",
|
|
89
|
+
"tasks": [
|
|
90
|
+
{
|
|
91
|
+
"label": "🚀 Lando: Start",
|
|
92
|
+
"type": "shell",
|
|
93
|
+
"command": "lando",
|
|
94
|
+
"args": ["start"],
|
|
95
|
+
"group": "build",
|
|
96
|
+
"presentation": {
|
|
97
|
+
"echo": true,
|
|
98
|
+
"reveal": "always",
|
|
99
|
+
"focus": false,
|
|
100
|
+
"panel": "shared"
|
|
101
|
+
},
|
|
102
|
+
"isBackground": true,
|
|
103
|
+
"problemMatcher": []
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"label": "🛑 Lando: Stop",
|
|
107
|
+
"type": "shell",
|
|
108
|
+
"command": "lando",
|
|
109
|
+
"args": ["stop"],
|
|
110
|
+
"group": "build",
|
|
111
|
+
"presentation": {
|
|
112
|
+
"echo": true,
|
|
113
|
+
"reveal": "always",
|
|
114
|
+
"focus": false,
|
|
115
|
+
"panel": "shared"
|
|
116
|
+
},
|
|
117
|
+
"problemMatcher": []
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"label": "ℹ️ Lando: Info",
|
|
121
|
+
"type": "shell",
|
|
122
|
+
"command": "lando",
|
|
123
|
+
"args": ["info"],
|
|
124
|
+
"group": "build",
|
|
125
|
+
"presentation": {
|
|
126
|
+
"echo": true,
|
|
127
|
+
"reveal": "always",
|
|
128
|
+
"focus": false,
|
|
129
|
+
"panel": "shared"
|
|
130
|
+
},
|
|
131
|
+
"problemMatcher": []
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"label": "🌐 Yarn: Install (Node)",
|
|
135
|
+
"type": "shell",
|
|
136
|
+
"command": "lando",
|
|
137
|
+
"args": ["yarn", "install"],
|
|
138
|
+
"group": "build",
|
|
139
|
+
"presentation": {
|
|
140
|
+
"echo": true,
|
|
141
|
+
"reveal": "always",
|
|
142
|
+
"focus": false,
|
|
143
|
+
"panel": "shared"
|
|
144
|
+
},
|
|
145
|
+
"problemMatcher": []
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"label": "📦 Composer: Install Dependencies",
|
|
149
|
+
"type": "shell",
|
|
150
|
+
"command": "lando",
|
|
151
|
+
"args": ["composer", "install"],
|
|
152
|
+
"group": "build",
|
|
153
|
+
"presentation": {
|
|
154
|
+
"echo": true,
|
|
155
|
+
"reveal": "always",
|
|
156
|
+
"focus": false,
|
|
157
|
+
"panel": "shared"
|
|
158
|
+
},
|
|
159
|
+
"problemMatcher": []
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"label": "🗄️ Redis CLI",
|
|
163
|
+
"type": "shell",
|
|
164
|
+
"command": "lando",
|
|
165
|
+
"args": ["redis-cli"],
|
|
166
|
+
"group": "build",
|
|
167
|
+
"presentation": {
|
|
168
|
+
"echo": true,
|
|
169
|
+
"reveal": "always",
|
|
170
|
+
"focus": false,
|
|
171
|
+
"panel": "shared"
|
|
172
|
+
},
|
|
173
|
+
"problemMatcher": []
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}
|