@codigodoleo/wp-kit 3.2.0 → 3.4.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.
Files changed (68) hide show
  1. package/README.md +73 -194
  2. package/lib/core/infer-ci-capabilities.js +17 -0
  3. package/lib/prompts/index.js +64 -4
  4. package/modules/blank-theme/index.js +71 -0
  5. package/modules/blank-theme/lint/.prettierrc.json +12 -0
  6. package/modules/blank-theme/lint/.stylelintrc.json +7 -0
  7. package/modules/{lint → blank-theme/lint}/eslint.config.mjs +2 -8
  8. package/modules/blank-theme/lint/pint.json +11 -0
  9. package/modules/blank-theme/prompts.js +33 -0
  10. package/modules/blank-theme/templates/.lando.yml.hbs +26 -0
  11. package/modules/blank-theme/templates/functions.php.hbs +46 -0
  12. package/modules/blank-theme/templates/package.json.hbs +16 -0
  13. package/modules/blank-theme/templates/style.css.hbs +7 -0
  14. package/modules/blank-theme/templates/vite.config.js.hbs +23 -0
  15. package/modules/deploy/.github/workflows/deploy-docker.yml +2 -0
  16. package/modules/deploy/.github/workflows/deploy-ssh.yml +2 -0
  17. package/modules/deploy/.github/workflows/release.yml +2 -0
  18. package/modules/deploy/index.js +38 -0
  19. package/modules/deploy/templates/.github/workflows/ci.yml.hbs +29 -1
  20. package/modules/deploy/templates/.gitlab/ci/lint-blank-theme.yml.hbs +35 -0
  21. package/modules/deploy/templates/.gitlab/ci/lint-mu-plugin.yml.hbs +19 -0
  22. package/modules/deploy/templates/.gitlab/ci/lint-plugin.yml.hbs +19 -0
  23. package/modules/deploy/templates/.gitlab/ci/lint-sage.yml.hbs +47 -0
  24. package/modules/git/templates/workspace.json.hbs +1 -1
  25. package/modules/lint/.commitlintrc.json +21 -0
  26. package/modules/lint/.prettierignore +15 -25
  27. package/modules/lint/.prettierrc.json +5 -16
  28. package/modules/lint/index.js +75 -8
  29. package/modules/lint/prompts.js +1 -8
  30. package/modules/lint/templates/.lando.yml.hbs +3 -8
  31. package/modules/lint/templates/workspace.json.hbs +3 -3
  32. package/modules/mu-plugin/index.js +49 -0
  33. package/modules/mu-plugin/lint/.prettierrc.json +7 -0
  34. package/modules/mu-plugin/lint/eslint.config.mjs +30 -0
  35. package/modules/mu-plugin/lint/pint.json +11 -0
  36. package/modules/mu-plugin/prompts.js +23 -0
  37. package/modules/mu-plugin/templates/.lando.yml.hbs +15 -0
  38. package/modules/mu-plugin/templates/composer.json.hbs +14 -0
  39. package/modules/mu-plugin/templates/plugin.php.hbs +15 -0
  40. package/modules/php/templates/composer.json.hbs +15 -1
  41. package/modules/plugin/index.js +45 -0
  42. package/modules/plugin/lint/.prettierrc.json +7 -0
  43. package/modules/plugin/lint/eslint.config.mjs +30 -0
  44. package/modules/plugin/lint/pint.json +11 -0
  45. package/modules/plugin/prompts.js +23 -0
  46. package/modules/plugin/templates/.lando.yml.hbs +15 -0
  47. package/modules/plugin/templates/composer.json.hbs +14 -0
  48. package/modules/plugin/templates/plugin.php.hbs +15 -0
  49. package/modules/sage/index.js +25 -0
  50. package/modules/sage/lint/.prettierrc.json +12 -0
  51. package/modules/sage/lint/.stylelintrc.json +7 -0
  52. package/modules/sage/lint/eslint.config.mjs +30 -0
  53. package/modules/sage/lint/pint.json +11 -0
  54. package/modules/sage/prompts.js +22 -7
  55. package/modules/sage/templates/.devcontainer/docker-compose.override.yml.hbs +1 -3
  56. package/modules/sage/templates/.lando.yml.hbs +17 -5
  57. package/modules/sage/templates/theme/vite.config.js.hbs +4 -4
  58. package/package.json +7 -1
  59. package/templates/.devcontainer/docker-compose.yml.hbs +3 -0
  60. package/templates/.gitignore.hbs +84 -13
  61. package/templates/.lando.yml.hbs +2 -0
  62. package/templates/composer.json.hbs +60 -13
  63. package/templates/workspace.json.hbs +1 -1
  64. package/modules/lint/.eslintignore +0 -36
  65. package/modules/lint/.eslintrc.json +0 -8
  66. package/modules/lint/.stylelintignore +0 -19
  67. package/modules/lint/.stylelintrc.json +0 -9
  68. package/modules/lint/pint.json +0 -26
@@ -0,0 +1,30 @@
1
+ import js from '@eslint/js';
2
+ import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
+ import prettierPlugin from 'eslint-plugin-prettier';
4
+ import globals from 'globals';
5
+
6
+ export default [
7
+ {
8
+ ignores: ['node_modules/**', 'vendor/**', 'dist/**'],
9
+ },
10
+ js.configs.recommended,
11
+ {
12
+ files: ['resources/**/*.{js,mjs,ts}'],
13
+ languageOptions: {
14
+ ecmaVersion: 2022,
15
+ sourceType: 'module',
16
+ globals: {
17
+ ...globals.browser,
18
+ ...globals.node,
19
+ },
20
+ },
21
+ plugins: {
22
+ prettier: prettierPlugin,
23
+ },
24
+ rules: {
25
+ 'prettier/prettier': 'error',
26
+ 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
+ },
28
+ },
29
+ eslintConfigPrettier,
30
+ ];
@@ -0,0 +1,11 @@
1
+ {
2
+ "preset": "psr12",
3
+ "rules": {
4
+ "array_syntax": {
5
+ "syntax": "short"
6
+ },
7
+ "binary_operator_spaces": {
8
+ "default": "single_space"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,23 @@
1
+ export default [
2
+ {
3
+ type: 'input',
4
+ name: 'mu_plugin_name',
5
+ message: 'MU Plugin slug (used as directory name):',
6
+ default: (answers) => `${answers.projectName || 'wordpress'}-core`,
7
+ when: (answers) => answers.selectedContentModules?.includes('mu-plugin'),
8
+ },
9
+ {
10
+ type: 'confirm',
11
+ name: 'mu_plugin_lint_pint',
12
+ message: 'MU Plugin: enable Pint for PHP?',
13
+ default: true,
14
+ when: (answers) => answers.selectedContentModules?.includes('mu-plugin') && answers.enable_lint,
15
+ },
16
+ {
17
+ type: 'confirm',
18
+ name: 'mu_plugin_lint_eslint',
19
+ message: 'MU Plugin: enable ESLint for JS/TS?',
20
+ default: false,
21
+ when: (answers) => answers.selectedContentModules?.includes('mu-plugin') && answers.enable_lint,
22
+ },
23
+ ];
@@ -0,0 +1,15 @@
1
+ tooling:
2
+ {{#if enable_lint}}
3
+ mu-pint:
4
+ service: appserver
5
+ description: Lint PHP in the MU plugin
6
+ dir: /app/content/mu-plugins/{{mu_plugin_name}}
7
+ cmd: ./vendor/bin/pint
8
+ {{#if mu_plugin_lint_eslint}}
9
+ mu-eslint:
10
+ service: build
11
+ description: Lint JS/TS in the MU plugin
12
+ dir: /app/content/mu-plugins/{{mu_plugin_name}}
13
+ cmd: npx eslint --fix resources/
14
+ {{/if}}
15
+ {{/if}}
@@ -0,0 +1,14 @@
1
+ {
2
+ "description": "{{projectDescription}} — MU Plugin",
3
+ "autoload": {
4
+ "psr-4": {
5
+ "App\\MuPlugins\\": "src/"
6
+ }
7
+ },
8
+ "require-dev": {
9
+ "laravel/pint": "^1.21"
10
+ },
11
+ "scripts": {
12
+ "lint": ["./vendor/bin/pint --test"]
13
+ }
14
+ }
@@ -0,0 +1,15 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: {{mu_plugin_name}}
4
+ * Description: {{projectDescription}}
5
+ * Version: {{projectVersion}}
6
+ */
7
+
8
+ if (!defined('ABSPATH')) {
9
+ exit;
10
+ }
11
+
12
+ // Autoload via Composer
13
+ if (file_exists(__DIR__ . '/vendor/autoload.php')) {
14
+ require_once __DIR__ . '/vendor/autoload.php';
15
+ }
@@ -1 +1,15 @@
1
- { "require-dev": { "laravel/pint": "^1.29", "phpunit/phpunit": "^11.5", "phpstan/phpstan": "^2.1", "phpstan/extension-installer": "^1.4", "szepeviktor/phpstan-wordpress": "^2.0", "php-stubs/wordpress-stubs": "^6.8" }, "config": { "allow-plugins": { "phpstan/extension-installer": true } } }
1
+ {
2
+ "require-dev": {
3
+ "laravel/pint": "^1.29",
4
+ "phpunit/phpunit": "^12.5",
5
+ "phpstan/phpstan": "^2.1",
6
+ "phpstan/extension-installer": "^1.4",
7
+ "szepeviktor/phpstan-wordpress": "^2.0",
8
+ "php-stubs/wordpress-stubs": "^6.8"
9
+ },
10
+ "config": {
11
+ "allow-plugins": {
12
+ "phpstan/extension-installer": true
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,45 @@
1
+ import path from 'path';
2
+
3
+ import fs from 'fs-extra';
4
+
5
+ import { log, color } from '../../lib/utils/logger.js';
6
+
7
+ export async function setupModule(context, generator) {
8
+ const pluginName = context.plugin_name || `${context.projectName}-plugin`;
9
+ const pluginDir = `content/plugins/${pluginName}`;
10
+ const absolutePluginDir = path.join(generator.cwd, pluginDir);
11
+
12
+ log(color.blue, `[plugin] 📂 Scaffolding plugin: ${pluginDir}`);
13
+
14
+ // 1. Ensure directory exists
15
+ await fs.ensureDir(absolutePluginDir);
16
+
17
+ // 2. Generate main plugin entry file
18
+ await generator.generateFile(
19
+ 'plugin.php',
20
+ { ...context, plugin_name: pluginName },
21
+ 'plugin',
22
+ `${pluginDir}/${pluginName}.php`
23
+ );
24
+
25
+ // 3. Generate composer.json
26
+ await generator.generateFile(
27
+ 'composer.json',
28
+ { ...context, plugin_name: pluginName },
29
+ 'plugin',
30
+ `${pluginDir}/composer.json`
31
+ );
32
+
33
+ // 4. Create src/ scaffold
34
+ await fs.ensureFile(path.join(absolutePluginDir, 'src', '.gitkeep'));
35
+
36
+ // 5. Lint configs co-located in plugin — always installed (IDE/editor support)
37
+ log(color.blue, '[plugin] 🔧 Installing lint configurations...');
38
+ await generator.copyFile('lint/.prettierrc.json', 'plugin', `${pluginDir}/.prettierrc.json`);
39
+ await generator.copyFile('lint/pint.json', 'plugin', `${pluginDir}/pint.json`);
40
+ if (context.plugin_lint_eslint === true) {
41
+ await generator.copyFile('lint/eslint.config.mjs', 'plugin', `${pluginDir}/eslint.config.mjs`);
42
+ }
43
+
44
+ log(color.green, `[plugin] ✅ Plugin scaffolded: ${pluginDir}`);
45
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "printWidth": 100,
6
+ "tabWidth": 2
7
+ }
@@ -0,0 +1,30 @@
1
+ import js from '@eslint/js';
2
+ import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
+ import prettierPlugin from 'eslint-plugin-prettier';
4
+ import globals from 'globals';
5
+
6
+ export default [
7
+ {
8
+ ignores: ['node_modules/**', 'vendor/**', 'dist/**'],
9
+ },
10
+ js.configs.recommended,
11
+ {
12
+ files: ['resources/**/*.{js,mjs,ts}'],
13
+ languageOptions: {
14
+ ecmaVersion: 2022,
15
+ sourceType: 'module',
16
+ globals: {
17
+ ...globals.browser,
18
+ ...globals.node,
19
+ },
20
+ },
21
+ plugins: {
22
+ prettier: prettierPlugin,
23
+ },
24
+ rules: {
25
+ 'prettier/prettier': 'error',
26
+ 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
+ },
28
+ },
29
+ eslintConfigPrettier,
30
+ ];
@@ -0,0 +1,11 @@
1
+ {
2
+ "preset": "psr12",
3
+ "rules": {
4
+ "array_syntax": {
5
+ "syntax": "short"
6
+ },
7
+ "binary_operator_spaces": {
8
+ "default": "single_space"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,23 @@
1
+ export default [
2
+ {
3
+ type: 'input',
4
+ name: 'plugin_name',
5
+ message: 'Plugin slug (used as directory name):',
6
+ default: (answers) => `${answers.projectName || 'wordpress'}-plugin`,
7
+ when: (answers) => answers.selectedContentModules?.includes('plugin'),
8
+ },
9
+ {
10
+ type: 'confirm',
11
+ name: 'plugin_lint_pint',
12
+ message: 'Plugin: enable Pint for PHP?',
13
+ default: true,
14
+ when: (answers) => answers.selectedContentModules?.includes('plugin') && answers.enable_lint,
15
+ },
16
+ {
17
+ type: 'confirm',
18
+ name: 'plugin_lint_eslint',
19
+ message: 'Plugin: enable ESLint for JS/TS?',
20
+ default: false,
21
+ when: (answers) => answers.selectedContentModules?.includes('plugin') && answers.enable_lint,
22
+ },
23
+ ];
@@ -0,0 +1,15 @@
1
+ tooling:
2
+ {{#if enable_lint}}
3
+ plugin-pint:
4
+ service: appserver
5
+ description: Lint PHP in the plugin
6
+ dir: /app/content/plugins/{{plugin_name}}
7
+ cmd: ./vendor/bin/pint
8
+ {{#if plugin_lint_eslint}}
9
+ plugin-eslint:
10
+ service: build
11
+ description: Lint JS/TS in the plugin
12
+ dir: /app/content/plugins/{{plugin_name}}
13
+ cmd: npx eslint --fix resources/
14
+ {{/if}}
15
+ {{/if}}
@@ -0,0 +1,14 @@
1
+ {
2
+ "description": "{{projectDescription}} — Plugin",
3
+ "autoload": {
4
+ "psr-4": {
5
+ "App\\Plugins\\": "src/"
6
+ }
7
+ },
8
+ "require-dev": {
9
+ "laravel/pint": "^1.21"
10
+ },
11
+ "scripts": {
12
+ "lint": ["./vendor/bin/pint --test"]
13
+ }
14
+ }
@@ -0,0 +1,15 @@
1
+ <?php
2
+ /**
3
+ * Plugin Name: {{plugin_name}}
4
+ * Description: {{projectDescription}}
5
+ * Version: {{projectVersion}}
6
+ */
7
+
8
+ if (!defined('ABSPATH')) {
9
+ exit;
10
+ }
11
+
12
+ // Autoload via Composer
13
+ if (file_exists(__DIR__ . '/vendor/autoload.php')) {
14
+ require_once __DIR__ . '/vendor/autoload.php';
15
+ }
@@ -175,6 +175,31 @@ export async function setupModule(context, generator) {
175
175
  mergeStrategy: 'replace',
176
176
  });
177
177
 
178
+ // 8. Lint configs co-located in theme — always installed (IDE/editor support)
179
+ log(color.blue, '[sage] 🔧 Installing lint configurations...');
180
+ await generator.copyFile(
181
+ 'lint/.prettierrc.json',
182
+ 'sage',
183
+ `${relativeThemeDir}/.prettierrc.json`
184
+ );
185
+ if (context.sage_lint_eslint !== false) {
186
+ await generator.copyFile(
187
+ 'lint/eslint.config.mjs',
188
+ 'sage',
189
+ `${relativeThemeDir}/eslint.config.mjs`
190
+ );
191
+ }
192
+ if (context.sage_lint_pint !== false) {
193
+ await generator.copyFile('lint/pint.json', 'sage', `${relativeThemeDir}/pint.json`);
194
+ }
195
+ if (context.sage_lint_stylelint !== false) {
196
+ await generator.copyFile(
197
+ 'lint/.stylelintrc.json',
198
+ 'sage',
199
+ `${relativeThemeDir}/.stylelintrc.json`
200
+ );
201
+ }
202
+
178
203
  log(color.green, '[sage] ✅ Advanced Sage setup completed successfully');
179
204
  log(color.green, `[sage] ✅ Theme directory: ${relativeThemeDir}`);
180
205
  log(color.green, '[sage] ✅ Lando + Devcontainer command parity enabled');
@@ -0,0 +1,12 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "printWidth": 100,
6
+ "tabWidth": 2,
7
+ "overrides": [
8
+ { "files": "*.blade.php", "options": { "parser": "html" } },
9
+ { "files": "*.vue", "options": { "parser": "vue" } },
10
+ { "files": "*.scss", "options": { "singleQuote": false } }
11
+ ]
12
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": ["stylelint-config-standard-scss"],
3
+ "rules": {
4
+ "color-hex-length": "short",
5
+ "string-quotes": "double"
6
+ }
7
+ }
@@ -0,0 +1,30 @@
1
+ import js from '@eslint/js';
2
+ import eslintConfigPrettier from 'eslint-config-prettier/flat';
3
+ import prettierPlugin from 'eslint-plugin-prettier';
4
+ import globals from 'globals';
5
+
6
+ export default [
7
+ {
8
+ ignores: ['node_modules/**', 'vendor/**', 'public/build/**'],
9
+ },
10
+ js.configs.recommended,
11
+ {
12
+ files: ['resources/**/*.{js,mjs,ts,vue}'],
13
+ languageOptions: {
14
+ ecmaVersion: 2022,
15
+ sourceType: 'module',
16
+ globals: {
17
+ ...globals.browser,
18
+ ...globals.node,
19
+ },
20
+ },
21
+ plugins: {
22
+ prettier: prettierPlugin,
23
+ },
24
+ rules: {
25
+ 'prettier/prettier': 'error',
26
+ 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
27
+ },
28
+ },
29
+ eslintConfigPrettier,
30
+ ];
@@ -0,0 +1,11 @@
1
+ {
2
+ "preset": "psr12",
3
+ "rules": {
4
+ "array_syntax": {
5
+ "syntax": "short"
6
+ },
7
+ "binary_operator_spaces": {
8
+ "default": "single_space"
9
+ }
10
+ }
11
+ }
@@ -1,16 +1,31 @@
1
1
  export default [
2
- {
3
- type: 'confirm',
4
- name: 'enable_sage',
5
- message: 'Enable Sage theme (advanced setup is automatic)?',
6
- default: true,
7
- },
8
2
  {
9
3
  type: 'list',
10
4
  name: 'sageVersion',
11
5
  message: 'Sage version:',
12
6
  choices: ['11', '10'],
13
7
  default: '11',
14
- when: (answers) => answers.enable_sage,
8
+ when: (answers) => answers.selectedContentModules?.includes('sage'),
9
+ },
10
+ {
11
+ type: 'confirm',
12
+ name: 'sage_lint_eslint',
13
+ message: 'Sage: enable ESLint for JS/TS/Vue?',
14
+ default: true,
15
+ when: (answers) => answers.selectedContentModules?.includes('sage') && answers.enable_lint,
16
+ },
17
+ {
18
+ type: 'confirm',
19
+ name: 'sage_lint_stylelint',
20
+ message: 'Sage: enable Stylelint for CSS/SCSS?',
21
+ default: true,
22
+ when: (answers) => answers.selectedContentModules?.includes('sage') && answers.enable_lint,
23
+ },
24
+ {
25
+ type: 'confirm',
26
+ name: 'sage_lint_pint',
27
+ message: 'Sage: enable Pint for PHP?',
28
+ default: true,
29
+ when: (answers) => answers.selectedContentModules?.includes('sage') && answers.enable_lint,
15
30
  },
16
31
  ];
@@ -1,6 +1,4 @@
1
1
  services:
2
- wordpress:
2
+ app:
3
3
  environment:
4
4
  SAGE_THEME_DIR: /workspace/content/themes/{{projectName}}
5
- ports:
6
- - "3009:3009"
@@ -7,10 +7,10 @@ services:
7
7
  scanner: false
8
8
  events:
9
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
10
+ - appserver: bash ./server/cmd/setup-sage-php.sh
11
+ - appserver: wp theme activate {{projectName}}
12
+ - appserver: cd /app/content/themes/{{projectName}} && wp acorn optimize:clear
13
+ - build: bash ./server/cmd/setup-sage-node.sh
14
14
  tooling:
15
15
  dev:
16
16
  service: build
@@ -29,8 +29,20 @@ tooling:
29
29
  cmd: npm run build --prefix /app/content/themes/{{projectName}}
30
30
  theme-lint:
31
31
  service: build
32
- description: Lint the Sage theme
32
+ description: Lint the Sage theme (JS/TS/Vue)
33
33
  cmd: npm run lint --prefix /app/content/themes/{{projectName}}
34
+ {{#if enable_lint}}
35
+ pint:
36
+ service: appserver
37
+ description: Lint PHP in the Sage theme
38
+ dir: /app/content/themes/{{projectName}}
39
+ cmd: ./vendor/bin/pint
40
+ stylelint:
41
+ service: build
42
+ description: Lint CSS/SCSS in the Sage theme
43
+ cmd: npx stylelint --fix "resources/**/*.{css,scss}" --config /app/content/themes/{{projectName}}/.stylelintrc.json
44
+ dir: /app/content/themes/{{projectName}}
45
+ {{/if}}
34
46
  acorn:
35
47
  service: appserver
36
48
  description: Run Acorn artisan commands
@@ -1,8 +1,8 @@
1
- import fs from 'fs';
2
- import { defineConfig } from 'vite';
1
+ import { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';
3
2
  import tailwindcss from '@tailwindcss/vite';
3
+ import fs from 'fs';
4
4
  import laravel from 'laravel-vite-plugin';
5
- import { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';
5
+ import { defineConfig } from 'vite';
6
6
 
7
7
  export default defineConfig({
8
8
  base: '/app/content/themes/{{projectName}}/',
@@ -45,7 +45,7 @@ export default defineConfig({
45
45
  cert: fs.readFileSync('/certs/cert.crt'),
46
46
  },
47
47
  host: true,
48
- port: 3009,
48
+ port: 5173,
49
49
  strictPort: true,
50
50
  hmr: {
51
51
  host: 'localhost',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codigodoleo/wp-kit",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Kit opinativo para padronizar projetos WordPress com CI/CD dinâmico.",
5
5
  "main": "bin/index.js",
6
6
  "bin": {
@@ -30,6 +30,12 @@
30
30
  "test:setup": "npm run test:clean && npm run test:scaffold",
31
31
  "test:clean": "rm -rf __test-sandbox__",
32
32
  "test:scaffold": "node ./bin/index.js init --output=__test-sandbox__/test-project --defaults",
33
+ "test:e2e": "bash scripts/validate-e2e.sh",
34
+ "test:e2e:base": "bash scripts/validate-e2e.sh base",
35
+ "test:e2e:sage": "bash scripts/validate-e2e.sh sage",
36
+ "test:e2e:blank-theme": "bash scripts/validate-e2e.sh blank-theme",
37
+ "test:e2e:mu-plugin": "bash scripts/validate-e2e.sh mu-plugin",
38
+ "test:e2e:all": "bash scripts/validate-e2e.sh all",
33
39
  "open-cursor": "cursor ./__test-sandbox__/test-project/wordpress-dev.code-workspace"
34
40
  },
35
41
  "keywords": [
@@ -3,6 +3,9 @@ services:
3
3
  build:
4
4
  context: ..
5
5
  dockerfile: .devcontainer/Dockerfile
6
+ # Force linux/amd64 for Apple Silicon (ARM) compatibility via Rosetta 2.
7
+ # Remove this line if the base image gains a native linux/arm64 variant.
8
+ platform: linux/amd64
6
9
  container_name: {{projectName}}-app
7
10
  working_dir: /workspace
8
11
  env_file:
@@ -1,13 +1,84 @@
1
- # WordPress wp/ content/uploads/* !content/uploads/.gitkeep content/upgrade/* content/backup-db/*
2
- content/backups/* content/blogs.dir/* content/cache/* content/advanced-cache.php
3
- content/wp-cache-config.php content/plugins/* !content/plugins/.gitkeep content/themes/*
4
- content/languages/* !content/languages/.gitkeep content/mu-plugins/* !content/mu-plugins/.gitkeep #
5
- Theme{{#if enable_sage}}
6
- !content/themes/{{projectName}}{{/if}}
7
-
8
- # Composer vendor/ composer.phar # Node.js
9
- node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* .npm .yarn-integrity # IDE/Editor *.swp
10
- *.swo *~ # OS .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db # Logs *.log
11
- logs/ # Temporary files *.tmp *.temp .cache/ # Build artifacts dist/ build/ public/build/ # Database
12
- *.sql *.sqlite # Backup files *.bak *.backup *.old # Lando .lando.local.yml # PHP *.php~ *.php.bak
13
- php_errors.log # Testing coverage/ .phpunit.result.cache
1
+ # WordPress
2
+ wp/
3
+ content/uploads/*
4
+ !content/uploads/.gitkeep
5
+ content/upgrade/*
6
+ content/backup-db/*
7
+ content/backups/*
8
+ content/blogs.dir/*
9
+ content/cache/*
10
+ content/advanced-cache.php
11
+ content/wp-cache-config.php
12
+ content/plugins/*
13
+ !content/plugins/.gitkeep
14
+ content/themes/*
15
+ content/languages/*
16
+ !content/languages/.gitkeep
17
+ content/mu-plugins/*
18
+ !content/mu-plugins/.gitkeep
19
+
20
+ # Theme{{#if enable_sage}}
21
+ !content/themes/{{projectName}}{{/if}}
22
+
23
+
24
+ # Composer
25
+ vendor/
26
+ composer.phar
27
+
28
+ # Node.js
29
+ node_modules/
30
+ npm-debug.log*
31
+ yarn-debug.log*
32
+ yarn-error.log*
33
+ .npm
34
+ .yarn-integrity
35
+
36
+
37
+ # IDE/Editor
38
+ *.swp
39
+ *.swo
40
+ *~
41
+
42
+ # OS
43
+ .DS_Store
44
+ .DS_Store?
45
+ ._*
46
+ .Spotlight-V100
47
+ .Trashes
48
+ ehthumbs.db
49
+ Thumbs.db
50
+
51
+ # Logs
52
+ *.log
53
+ logs/
54
+
55
+ # Temporary files
56
+ *.tmp
57
+ *.temp
58
+ .cache/
59
+
60
+ # Build artifacts
61
+ dist/
62
+ build/
63
+ public/build/
64
+
65
+ # Database
66
+ *.sql
67
+ *.sqlite
68
+
69
+ # Backup files
70
+ *.bak
71
+ *.backup
72
+ *.old
73
+
74
+ # Lando
75
+ .lando.local.yml
76
+
77
+ # PHP
78
+ *.php~
79
+ *.php.bak
80
+ php_errors.log
81
+
82
+ # Testing
83
+ coverage/
84
+ .phpunit.result.cache
@@ -28,6 +28,7 @@ services:
28
28
  build:
29
29
  - bash /app/server/cmd/setup-php.sh
30
30
  overrides:
31
+ platform: linux/amd64
31
32
  extra_hosts:
32
33
  - "host.docker.internal:host-gateway"
33
34
  environment:
@@ -41,6 +42,7 @@ services:
41
42
  - bash /app/server/cmd/setup-node.sh
42
43
  scanner: false
43
44
  overrides:
45
+ platform: linux/amd64
44
46
  ports:
45
47
  - 5173:5173
46
48
  database: