@codigodoleo/wp-kit 3.2.0 → 3.3.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/core/infer-ci-capabilities.js +17 -0
- package/lib/prompts/index.js +3 -3
- package/modules/blank-theme/index.js +71 -0
- package/modules/blank-theme/lint/.prettierrc.json +12 -0
- package/modules/blank-theme/lint/.stylelintrc.json +7 -0
- package/modules/{lint → blank-theme/lint}/eslint.config.mjs +2 -8
- package/modules/blank-theme/lint/pint.json +11 -0
- package/modules/blank-theme/prompts.js +36 -0
- package/modules/blank-theme/templates/.lando.yml.hbs +26 -0
- package/modules/blank-theme/templates/functions.php.hbs +46 -0
- package/modules/blank-theme/templates/package.json.hbs +16 -0
- package/modules/blank-theme/templates/style.css.hbs +7 -0
- package/modules/blank-theme/templates/vite.config.js.hbs +23 -0
- package/modules/deploy/.github/workflows/deploy-docker.yml +2 -0
- package/modules/deploy/.github/workflows/deploy-ssh.yml +2 -0
- package/modules/deploy/.github/workflows/release.yml +2 -0
- package/modules/deploy/index.js +38 -0
- package/modules/deploy/templates/.github/workflows/ci.yml.hbs +29 -1
- package/modules/deploy/templates/.gitlab/ci/lint-blank-theme.yml.hbs +35 -0
- package/modules/deploy/templates/.gitlab/ci/lint-mu-plugin.yml.hbs +19 -0
- package/modules/deploy/templates/.gitlab/ci/lint-plugin.yml.hbs +19 -0
- package/modules/deploy/templates/.gitlab/ci/lint-sage.yml.hbs +47 -0
- package/modules/git/templates/workspace.json.hbs +1 -1
- package/modules/lint/.commitlintrc.json +21 -0
- package/modules/lint/.prettierignore +15 -25
- package/modules/lint/.prettierrc.json +5 -16
- package/modules/lint/index.js +75 -8
- package/modules/lint/prompts.js +1 -8
- package/modules/lint/templates/.lando.yml.hbs +3 -8
- package/modules/lint/templates/workspace.json.hbs +3 -3
- package/modules/mu-plugin/index.js +49 -0
- package/modules/mu-plugin/lint/.prettierrc.json +7 -0
- package/modules/mu-plugin/lint/eslint.config.mjs +30 -0
- package/modules/mu-plugin/lint/pint.json +11 -0
- package/modules/mu-plugin/prompts.js +29 -0
- package/modules/mu-plugin/templates/.lando.yml.hbs +15 -0
- package/modules/mu-plugin/templates/composer.json.hbs +14 -0
- package/modules/mu-plugin/templates/plugin.php.hbs +15 -0
- package/modules/php/templates/composer.json.hbs +15 -1
- package/modules/plugin/index.js +45 -0
- package/modules/plugin/lint/.prettierrc.json +7 -0
- package/modules/plugin/lint/eslint.config.mjs +30 -0
- package/modules/plugin/lint/pint.json +11 -0
- package/modules/plugin/prompts.js +29 -0
- package/modules/plugin/templates/.lando.yml.hbs +15 -0
- package/modules/plugin/templates/composer.json.hbs +14 -0
- package/modules/plugin/templates/plugin.php.hbs +15 -0
- package/modules/sage/index.js +25 -0
- package/modules/sage/lint/.prettierrc.json +12 -0
- package/modules/sage/lint/.stylelintrc.json +7 -0
- package/modules/sage/lint/eslint.config.mjs +30 -0
- package/modules/sage/lint/pint.json +11 -0
- package/modules/sage/prompts.js +21 -0
- package/modules/sage/templates/.lando.yml.hbs +13 -1
- package/modules/sage/templates/theme/vite.config.js.hbs +4 -4
- package/package.json +1 -1
- package/templates/.gitignore.hbs +84 -13
- package/templates/composer.json.hbs +60 -13
- package/templates/workspace.json.hbs +1 -1
- package/modules/lint/.eslintignore +0 -36
- package/modules/lint/.eslintrc.json +0 -8
- package/modules/lint/.stylelintignore +0 -19
- package/modules/lint/.stylelintrc.json +0 -9
- package/modules/lint/pint.json +0 -26
|
@@ -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
|
|
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 {
|
|
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:
|
|
48
|
+
port: 5173,
|
|
49
49
|
strictPort: true,
|
|
50
50
|
hmr: {
|
|
51
51
|
host: 'localhost',
|
package/package.json
CHANGED
package/templates/.gitignore.hbs
CHANGED
|
@@ -1,13 +1,84 @@
|
|
|
1
|
-
# WordPress
|
|
2
|
-
|
|
3
|
-
content/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
@@ -1,13 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}/wordpress",
|
|
3
|
+
"type": "project",
|
|
4
|
+
"description": "{{projectDescription}}",
|
|
5
|
+
"authors": [
|
|
6
|
+
{
|
|
7
|
+
"name": "{{author}}",
|
|
8
|
+
"email": "{{authorEmail}}"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"repositories": {
|
|
12
|
+
"wpackagist": {
|
|
13
|
+
"type": "composer",
|
|
14
|
+
"url": "https://wpackagist.org"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"require": {
|
|
19
|
+
"php": ">={{phpVersion}}",
|
|
20
|
+
"roots/wordpress": "{{wpCoreVersion}}",
|
|
21
|
+
"roots/bedrock-autoloader": "^1.0",
|
|
22
|
+
"inpsyde/wp-translation-downloader": "^2.5",
|
|
23
|
+
"vlucas/phpdotenv": "^5.5"
|
|
24
|
+
},
|
|
25
|
+
"config": {
|
|
26
|
+
"allow-plugins": {
|
|
27
|
+
"roots/wordpress-core-installer": true,
|
|
28
|
+
"inpsyde/wp-translation-downloader": true,
|
|
29
|
+
"composer/installers": true
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"extra": {
|
|
33
|
+
"wordpress-install-dir": "wp",
|
|
34
|
+
"installer-paths": {
|
|
35
|
+
"content/plugins/{$name}/": [
|
|
36
|
+
"type:wordpress-plugin"
|
|
37
|
+
],
|
|
38
|
+
"content/themes/{$name}/": [
|
|
39
|
+
"type:wordpress-theme"
|
|
40
|
+
],
|
|
41
|
+
"content/mu-plugins/{$name}/": [
|
|
42
|
+
"type:wordpress-muplugin"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"wp-translation-downloader": {
|
|
46
|
+
"languages": [
|
|
47
|
+
"pt_BR",
|
|
48
|
+
"en_US"
|
|
49
|
+
],
|
|
50
|
+
"languageRootDir": "content/languages",
|
|
51
|
+
"virtual-packages": [
|
|
52
|
+
{
|
|
53
|
+
"name": "wordpress/wordpress",
|
|
54
|
+
"type": "wordpress-core",
|
|
55
|
+
"version": "{{wpCoreVersion}}"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Node and vendor
|
|
2
|
-
node_modules/
|
|
3
|
-
vendor/
|
|
4
|
-
dist/
|
|
5
|
-
build/
|
|
6
|
-
|
|
7
|
-
# Tests
|
|
8
|
-
__tests__/
|
|
9
|
-
__test__/
|
|
10
|
-
*.test.js
|
|
11
|
-
*.spec.js
|
|
12
|
-
|
|
13
|
-
# IDE and system
|
|
14
|
-
.vscode/
|
|
15
|
-
.idea/
|
|
16
|
-
.history/
|
|
17
|
-
.cursor/
|
|
18
|
-
|
|
19
|
-
# WordPress and uploads
|
|
20
|
-
wp/
|
|
21
|
-
wp-content/uploads/
|
|
22
|
-
wp-content/upgrade/
|
|
23
|
-
wp-content/cache/
|
|
24
|
-
wp-content/ai1wm-backups/
|
|
25
|
-
|
|
26
|
-
# Misc
|
|
27
|
-
*.min.js
|
|
28
|
-
*.min.css
|
|
29
|
-
*.log
|
|
30
|
-
.cache/
|
|
31
|
-
.next/
|
|
32
|
-
out/
|
|
33
|
-
coverage/
|
|
34
|
-
.nyc_output/
|
|
35
|
-
.env
|
|
36
|
-
.env.*
|
package/modules/lint/pint.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"preset": "psr12",
|
|
3
|
-
"rules": {
|
|
4
|
-
"array_syntax": {
|
|
5
|
-
"syntax": "short"
|
|
6
|
-
},
|
|
7
|
-
"binary_operator_spaces": {
|
|
8
|
-
"default": "single_space"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"exclude": [
|
|
12
|
-
"wp",
|
|
13
|
-
"content",
|
|
14
|
-
"vendor",
|
|
15
|
-
"node_modules",
|
|
16
|
-
".git",
|
|
17
|
-
"storage",
|
|
18
|
-
"bootstrap/cache",
|
|
19
|
-
"public/build",
|
|
20
|
-
"public/hot",
|
|
21
|
-
"public/storage",
|
|
22
|
-
"public/vendor",
|
|
23
|
-
"tests/coverage",
|
|
24
|
-
"tests/reports"
|
|
25
|
-
]
|
|
26
|
-
}
|