wp-advads 1.0.33 → 1.0.35
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/.github/workflows/test.yml +17 -0
- package/CHANGELOG.md +23 -1
- package/LICENSE +15 -0
- package/README.md +86 -66
- package/package.json +9 -7
- package/src/app.js +17 -11
- package/src/commands/build.js +72 -59
- package/src/commands/class.js +34 -40
- package/src/commands/css.js +13 -19
- package/src/commands/init.js +4 -1
- package/src/commands/javascript.js +13 -19
- package/src/commands/release/change-version.js +14 -17
- package/src/commands/release/changelog.js +23 -31
- package/src/commands/release/git.js +25 -11
- package/src/commands/release/github.js +63 -12
- package/src/commands/release/semver.js +22 -25
- package/src/commands/release/translations.js +17 -23
- package/src/commands/release.js +3 -4
- package/src/commands/updates.js +20 -17
- package/src/commands/views.js +16 -18
- package/src/commands/wp-glotpress.js +125 -126
- package/src/commands/wp-pot.js +17 -9
- package/src/utilities/filesystem.js +57 -36
- package/src/utilities/flow.js +21 -0
- package/src/utilities/formatting.js +13 -4
- package/src/utilities/index.js +1 -1
- package/src/utilities/misc.js +1 -6
- package/src/utilities/settings.js +34 -14
- package/src/utilities/shell.js +60 -8
- package/template/files/class-singleton.php +5 -0
- package/template/files/javascript.js +0 -2
- package/template/files/view.php +2 -0
- package/test/build.test.js +168 -0
- package/test/changelog-locales.test.js +49 -0
- package/test/class.test.js +47 -0
- package/test/compile-templates.test.js +70 -0
- package/test/deps-hygiene.test.js +46 -0
- package/test/engines.test.js +11 -0
- package/test/get-latest-tag.test.js +51 -0
- package/test/git-precheck.test.js +44 -0
- package/test/github-final.test.js +93 -0
- package/test/glotpress-download.test.js +176 -0
- package/test/nested-path.test.js +39 -0
- package/test/no-fs-extra.test.js +11 -0
- package/test/package-identity.test.js +19 -0
- package/test/path-confine.test.js +42 -0
- package/test/pot-docs.test.js +27 -0
- package/test/pot-headers.test.js +49 -0
- package/test/project-root.test.js +26 -0
- package/test/release-waterfall.test.js +62 -0
- package/test/semver.test.js +25 -0
- package/test/settings-clone.test.js +34 -0
- package/test/settings-path.test.js +31 -0
- package/test/shell.test.js +100 -0
- package/test/singleton.test.js +14 -0
- package/test/stable-tag.test.js +13 -0
- package/test/stub-security.test.js +37 -0
- package/test/template-folder.test.js +19 -0
- package/test/translations.test.js +51 -0
- package/test/update-file-content.test.js +38 -0
- package/test/updates.test.js +39 -0
- package/test/version.test.js +22 -0
- package/test/view-escape.test.js +17 -0
- package/test/view.test.js +33 -0
- package/test/write-force.test.js +47 -0
- package/src/utilities/semver.js +0 -45
- package/template/.github/pull_request_template.md +0 -52
- package/template/configs/.editorconfig +0 -27
- package/template/configs/.eslintignore +0 -13
- package/template/configs/.eslintrc.js +0 -13
- package/template/configs/.phpcs.xml.dist +0 -87
- package/template/configs/.prettierignore +0 -49
- package/template/configs/.prettierrc.js +0 -3
- package/template/configs/.stylelintrc +0 -44
- package/template/configs/composer.json +0 -51
- package/template/configs/gitattributes +0 -34
- package/template/configs/gitignore +0 -43
- package/template/configs/package.json +0 -66
- package/template/configs/postcss.config.js +0 -6
- package/template/configs/tailwind.config.js +0 -8
- package/template/configs/webpack.mix.js +0 -65
- package/template/configs/webpack.mix.local.js +0 -3
- package/template/includes/index.php +0 -2
- package/template/index.js +0 -0
- package/template/index.php +0 -4
- package/template/plugin/assets/scss/app.scss +0 -0
- package/template/plugin/assets/src/app.js +0 -0
- package/template/tools/laravel-mix/wp-pot.js +0 -57
- package/template/tools/wp-glotpress.js +0 -162
package/src/utilities/semver.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export class SemVer {
|
|
2
|
-
constructor(version) {
|
|
3
|
-
this.rawVersion = version
|
|
4
|
-
|
|
5
|
-
this.parseVersion()
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
parseVersion() {
|
|
9
|
-
const regex = new RegExp('(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:-(?<pre>alpha|beta|rc))?(?:\\.(?<pre_count>\\d+))?', 'gm')
|
|
10
|
-
this.baseVersion = { ...regex.exec(this.rawVersion).groups }
|
|
11
|
-
|
|
12
|
-
this.baseVersion.major = parseInt(this.baseVersion.major)
|
|
13
|
-
this.baseVersion.minor = parseInt(this.baseVersion.minor)
|
|
14
|
-
this.baseVersion.patch = parseInt(this.baseVersion.patch)
|
|
15
|
-
this.baseVersion.pre = undefined === this.baseVersion.pre ? false : this.baseVersion.pre
|
|
16
|
-
this.baseVersion.pre_count = undefined === this.baseVersion.pre_count ? false : this.baseVersion.pre_count
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getCurrentVersion() {
|
|
20
|
-
return this.rawVersion
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
increment(type) {
|
|
24
|
-
const nextVersion = { ...this.baseVersion }
|
|
25
|
-
nextVersion[type] += 1
|
|
26
|
-
|
|
27
|
-
if ('patch' !== type) {
|
|
28
|
-
nextVersion.patch = 0
|
|
29
|
-
if ('minor' !== type) {
|
|
30
|
-
nextVersion.minor = 0
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return this.format(nextVersion);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
format(version) {
|
|
38
|
-
return `${version.major}.${version.minor}.${version.patch}`
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function incrementVersion(version, type) {
|
|
43
|
-
const semver = new SemVer(version)
|
|
44
|
-
return semver.increment(type)
|
|
45
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
## Description
|
|
2
|
-
|
|
3
|
-
Explain your approach to a solution and decisions that lead to it. E.g., which alternatives you evaluated and why you chose yours.
|
|
4
|
-
|
|
5
|
-
## Issue ticket number and link
|
|
6
|
-
Related to: #[Issue Number]
|
|
7
|
-
Closes: #[Issue Number]
|
|
8
|
-
|
|
9
|
-
## How Has This Been Tested?
|
|
10
|
-
|
|
11
|
-
Describe the tests that were conducted to verify the changes. Include instructions for reproducing the tests and any relevant details about the test configuration.
|
|
12
|
-
|
|
13
|
-
- [ ] Automated Test A (Purpose of Test A)
|
|
14
|
-
- [ ] Automated Test B (Purpose of Test B)
|
|
15
|
-
- [ ] Manual Test A (Purpose of Test A)
|
|
16
|
-
- [ ] Manual Test B (Purpose of Test B)
|
|
17
|
-
- [ ] Support / User A confirmed the fix
|
|
18
|
-
|
|
19
|
-
## Checklist:
|
|
20
|
-
|
|
21
|
-
### Developer -> Code Review:
|
|
22
|
-
- [ ] PR title is clear and descriptive
|
|
23
|
-
- [ ] Code is understandable, readable and well-documented
|
|
24
|
-
|
|
25
|
-
### Developer -> Testing:
|
|
26
|
-
- [ ] My changes generate no new warnings in debug.log and Query Monitor
|
|
27
|
-
- [ ] New and existing unit tests pass locally with my changes
|
|
28
|
-
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
29
|
-
|
|
30
|
-
### Developer -> Documentation:
|
|
31
|
-
- [ ] I have made corresponding changelogs that are grammatically correct according to ...
|
|
32
|
-
- [ ] (Optional) Update relevant documentation, such as API endpoints, configuration changes, or user guides
|
|
33
|
-
|
|
34
|
-
### Developer -> Dependencies:
|
|
35
|
-
- [ ] (Optional) If you introduced any external dependencies, explain your reasoning here.
|
|
36
|
-
|
|
37
|
-
### Reviewers -> Review:
|
|
38
|
-
... describe what they tested – and what they didn’t
|
|
39
|
-
|
|
40
|
-
### Assignee -> Review:
|
|
41
|
-
- [ ] Ensure the PR aligns with the original user story or feature requirement
|
|
42
|
-
- [ ] Review the code changes to ensure they match the product's design and functionality expectations
|
|
43
|
-
|
|
44
|
-
### Assignee -> Testing:
|
|
45
|
-
- [ ] Conduct user acceptance testing to validate that the changes meet the user's needs
|
|
46
|
-
- [ ] Verify that the feature works as expected and doesn't introduce regressions
|
|
47
|
-
- [ ] PR reviewer has approved the release
|
|
48
|
-
- [ ] Final changelog has been determined/approved
|
|
49
|
-
|
|
50
|
-
## Further comments
|
|
51
|
-
|
|
52
|
-
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# This file is for unifying the coding style for different editors and IDEs
|
|
2
|
-
# editorconfig.org
|
|
3
|
-
|
|
4
|
-
# WordPress Coding Standards
|
|
5
|
-
# https://make.wordpress.org/core/handbook/coding-standards/
|
|
6
|
-
|
|
7
|
-
root = true
|
|
8
|
-
|
|
9
|
-
[*]
|
|
10
|
-
charset = utf-8
|
|
11
|
-
end_of_line = lf
|
|
12
|
-
indent_size = 4
|
|
13
|
-
tab_width = 4
|
|
14
|
-
indent_style = tab
|
|
15
|
-
insert_final_newline = true
|
|
16
|
-
trim_trailing_whitespace = true
|
|
17
|
-
|
|
18
|
-
[*.txt]
|
|
19
|
-
trim_trailing_whitespace = false
|
|
20
|
-
|
|
21
|
-
[*.{md,json,yml,yaml}]
|
|
22
|
-
trim_trailing_whitespace = false
|
|
23
|
-
indent_style = space
|
|
24
|
-
indent_size = 2
|
|
25
|
-
|
|
26
|
-
[*.json]
|
|
27
|
-
indent_style = tab
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0"?>
|
|
2
|
-
<ruleset name="{{company.name}}">
|
|
3
|
-
<description>{{company.name}} Coding Standards.</description>
|
|
4
|
-
|
|
5
|
-
<!-- PHPCS arguments: -->
|
|
6
|
-
<arg value="ps" />
|
|
7
|
-
<arg name="colors"/>
|
|
8
|
-
<arg name="parallel" value="20" />
|
|
9
|
-
<arg name="extensions" value="php"/>
|
|
10
|
-
|
|
11
|
-
<!-- Set files and paths: -->
|
|
12
|
-
<file>.</file>
|
|
13
|
-
|
|
14
|
-
<!-- Exclude paths -->
|
|
15
|
-
<exclude-pattern>*/languages/*</exclude-pattern>
|
|
16
|
-
<exclude-pattern>*/lib/*</exclude-pattern>
|
|
17
|
-
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
|
18
|
-
<exclude-pattern>*/packages/*</exclude-pattern>
|
|
19
|
-
<exclude-pattern>*/tests/*</exclude-pattern>
|
|
20
|
-
<exclude-pattern>*/vendor/*</exclude-pattern>
|
|
21
|
-
<exclude-pattern>*/index.php</exclude-pattern>
|
|
22
|
-
|
|
23
|
-
<!-- PHPCompatibility configs: -->
|
|
24
|
-
<config name="testVersion" value="7.2-" />
|
|
25
|
-
<config name="minimum_supported_wp_version" value="4.9" />
|
|
26
|
-
<config name="minimum_wp_version" value="4.9" />
|
|
27
|
-
|
|
28
|
-
<rule ref="PHPCompatibility">
|
|
29
|
-
<include-pattern>*\.php$</include-pattern>
|
|
30
|
-
<exclude-pattern>tests/</exclude-pattern>
|
|
31
|
-
</rule>
|
|
32
|
-
|
|
33
|
-
<!-- Rules: -->
|
|
34
|
-
<rule ref="WordPress"/>
|
|
35
|
-
|
|
36
|
-
<rule ref="WordPress.WP.I18n">
|
|
37
|
-
<properties>
|
|
38
|
-
<property name="text_domain" type="array" value="{{wp.textDomain}}" />
|
|
39
|
-
</properties>
|
|
40
|
-
</rule>
|
|
41
|
-
|
|
42
|
-
<rule ref="WordPress.NamingConventions">
|
|
43
|
-
<exclude name="WordPress.NamingConventions.PrefixAllGlobals" />
|
|
44
|
-
</rule>
|
|
45
|
-
|
|
46
|
-
<rule ref="WordPress.NamingConventions.ValidHookName">
|
|
47
|
-
<properties>
|
|
48
|
-
<property name="additionalWordDelimiters" value="-"/>
|
|
49
|
-
</properties>
|
|
50
|
-
</rule>
|
|
51
|
-
|
|
52
|
-
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
|
|
53
|
-
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
|
|
54
|
-
<exclude-pattern>includes/**/interface-*.php</exclude-pattern>
|
|
55
|
-
</rule>
|
|
56
|
-
|
|
57
|
-
<!-- Disable disallow short arrays and enforce them: -->
|
|
58
|
-
<rule ref="WordPress-Extra">
|
|
59
|
-
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
|
|
60
|
-
</rule>
|
|
61
|
-
|
|
62
|
-
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
|
63
|
-
|
|
64
|
-
<!-- Elevate these rules to an error, so it gets printed on commit -->
|
|
65
|
-
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
|
66
|
-
<type>error</type>
|
|
67
|
-
</rule>
|
|
68
|
-
|
|
69
|
-
<rule ref="Generic.CodeAnalysis.AssignmentInCondition">
|
|
70
|
-
<type>error</type>
|
|
71
|
-
</rule>
|
|
72
|
-
|
|
73
|
-
<rule ref="Universal.Operators.StrictComparisons">
|
|
74
|
-
<type>error</type>
|
|
75
|
-
</rule>
|
|
76
|
-
|
|
77
|
-
<rule ref="WordPress.PHP.StrictInArray">
|
|
78
|
-
<type>error</type>
|
|
79
|
-
</rule>
|
|
80
|
-
|
|
81
|
-
<!-- Method names MUST NOT be prefixed with a single underscore to indicate protected or private visibility. That is, an underscore prefix explicitly has no meaning. -->
|
|
82
|
-
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
|
|
83
|
-
<type>error</type>
|
|
84
|
-
<message>Method name "%s" must not be prefixed with an underscore to indicate visibility</message>
|
|
85
|
-
</rule>
|
|
86
|
-
|
|
87
|
-
</ruleset>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Wordpress - ignore core, configuration, examples, uploads and logs.
|
|
2
|
-
# https://github.com/github/gitignore/blob/main/WordPress.gitignore
|
|
3
|
-
|
|
4
|
-
# Operating System files
|
|
5
|
-
.DS_Store
|
|
6
|
-
Thumbs.db
|
|
7
|
-
|
|
8
|
-
# IDE files
|
|
9
|
-
.vscode/*
|
|
10
|
-
project.xml
|
|
11
|
-
project.properties
|
|
12
|
-
.project
|
|
13
|
-
.settings*
|
|
14
|
-
*.sublime-project
|
|
15
|
-
*.sublime-workspace
|
|
16
|
-
.sublimelinterrc
|
|
17
|
-
|
|
18
|
-
# Eslint Cache
|
|
19
|
-
.eslintcache
|
|
20
|
-
|
|
21
|
-
# Environment files
|
|
22
|
-
wp-cli.local.yml
|
|
23
|
-
.wp-env.override.json
|
|
24
|
-
npm-debug.log
|
|
25
|
-
.pnpm-debug.log
|
|
26
|
-
|
|
27
|
-
# Node Package Dependencies
|
|
28
|
-
node_modules/
|
|
29
|
-
|
|
30
|
-
# Composer
|
|
31
|
-
vendor/
|
|
32
|
-
packages/
|
|
33
|
-
bin/composer/**/vendor/
|
|
34
|
-
composer.json
|
|
35
|
-
composer.lock
|
|
36
|
-
|
|
37
|
-
# Config files
|
|
38
|
-
.*
|
|
39
|
-
*-lock*
|
|
40
|
-
webpack.mix.js
|
|
41
|
-
tailwind.config.js
|
|
42
|
-
|
|
43
|
-
# Support .gitkeep Files
|
|
44
|
-
!.gitkeep
|
|
45
|
-
|
|
46
|
-
# Project files
|
|
47
|
-
assets/css
|
|
48
|
-
assets/js
|
|
49
|
-
tools/
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@wordpress/stylelint-config/scss",
|
|
3
|
-
"ignoreFiles": [
|
|
4
|
-
"**/*.js",
|
|
5
|
-
"assets/css/*.min.css",
|
|
6
|
-
"node_modules/**/*.css",
|
|
7
|
-
"vendor/**/*.css"
|
|
8
|
-
],
|
|
9
|
-
"rules": {
|
|
10
|
-
"scss/at-rule-no-unknown": [
|
|
11
|
-
true,
|
|
12
|
-
{
|
|
13
|
-
"ignoreAtRules": [
|
|
14
|
-
"apply",
|
|
15
|
-
"layer",
|
|
16
|
-
"responsive",
|
|
17
|
-
"screen",
|
|
18
|
-
"tailwind",
|
|
19
|
-
"variants"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"at-rule-empty-line-before": [
|
|
24
|
-
"always",
|
|
25
|
-
{
|
|
26
|
-
"ignoreAtRules": [
|
|
27
|
-
"tailwind",
|
|
28
|
-
"apply",
|
|
29
|
-
"variants",
|
|
30
|
-
"responsive",
|
|
31
|
-
"screen",
|
|
32
|
-
"import"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"rule-empty-line-before": [
|
|
37
|
-
"always",
|
|
38
|
-
{
|
|
39
|
-
"ignore": ["first-nested" ]
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"no-descending-specificity": null
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{package.vendor}}/{{package.name}}",
|
|
3
|
-
"description": "{{wp.description}}",
|
|
4
|
-
"homepage": "{{company.url}}",
|
|
5
|
-
"version": "{{wp.version}}",
|
|
6
|
-
"type": "wordpress-plugin",
|
|
7
|
-
"license": "GPL-3.0-or-later",
|
|
8
|
-
"prefer-stable": true,
|
|
9
|
-
"minimum-stability": "dev",
|
|
10
|
-
"authors": [
|
|
11
|
-
{
|
|
12
|
-
"name": "{{author.name}}",
|
|
13
|
-
"email": "{{author.email}}",
|
|
14
|
-
"homepage": "{{author.url}}"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"require": {
|
|
18
|
-
"php": ">=7.2",
|
|
19
|
-
"advanced-ads/framework": "dev-main"
|
|
20
|
-
},
|
|
21
|
-
"require-dev": {
|
|
22
|
-
"phpcompatibility/phpcompatibility-wp": "*",
|
|
23
|
-
"wp-coding-standards/wpcs": "^3.0.0"
|
|
24
|
-
},
|
|
25
|
-
"config": {
|
|
26
|
-
"optimize-autoloader": true,
|
|
27
|
-
"sort-packages": true,
|
|
28
|
-
"platform": {
|
|
29
|
-
"php": "7.2"
|
|
30
|
-
},
|
|
31
|
-
"allow-plugins": {
|
|
32
|
-
"dealerdirect/phpcodesniffer-composer-installer": true
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"autoload": {
|
|
36
|
-
"classmap": [
|
|
37
|
-
"includes/"
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"post-install-cmd": [
|
|
42
|
-
"composer global require wp-cli/wp-cli",
|
|
43
|
-
"composer global require wp-cli/i18n-command"
|
|
44
|
-
],
|
|
45
|
-
"build": [
|
|
46
|
-
"rm -r packages || true",
|
|
47
|
-
"COMPOSER_VENDOR_DIR=packages composer install -o -a -n --no-dev --no-scripts",
|
|
48
|
-
"composer dump"
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Set the default behavior, in case people don't have `core.autocrlf` set.
|
|
2
|
-
* text=auto
|
|
3
|
-
|
|
4
|
-
# Declare files that will always have LF line endings on checkout.
|
|
5
|
-
*.php text eol=lf
|
|
6
|
-
|
|
7
|
-
# Denote all files that are truly binary and should not be modified.
|
|
8
|
-
*.aar binary
|
|
9
|
-
*.gif binary
|
|
10
|
-
*.jar binary
|
|
11
|
-
*.jpg binary
|
|
12
|
-
*.png binary
|
|
13
|
-
*.ttf binary
|
|
14
|
-
*.webp binary
|
|
15
|
-
|
|
16
|
-
# Remove files for archives generated using `git archive`.
|
|
17
|
-
/.* export-ignore
|
|
18
|
-
changelog.txt export-ignore
|
|
19
|
-
composer.* export-ignore
|
|
20
|
-
package*.json export-ignore
|
|
21
|
-
phpcs.* export-ignore
|
|
22
|
-
phpunit.* export-ignore
|
|
23
|
-
README.md export-ignore
|
|
24
|
-
|
|
25
|
-
# Remove folders for archives generated using `git archive`.
|
|
26
|
-
assets/admin/scss export-ignore
|
|
27
|
-
assets/admin/src export-ignore
|
|
28
|
-
assets/frontend/scss export-ignore
|
|
29
|
-
assets/frontend/src export-ignore
|
|
30
|
-
bin/ export-ignore
|
|
31
|
-
.changelog/ export-ignore
|
|
32
|
-
tests/ export-ignore
|
|
33
|
-
tools/ export-ignore
|
|
34
|
-
adv-ads-scaffolding export-ignore
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Wordpress - ignore core, configuration, examples, uploads and logs.
|
|
2
|
-
# https://github.com/github/gitignore/blob/main/WordPress.gitignore
|
|
3
|
-
|
|
4
|
-
# Operating System files
|
|
5
|
-
.DS_Store
|
|
6
|
-
Thumbs.db
|
|
7
|
-
|
|
8
|
-
# IDE files
|
|
9
|
-
.vscode/*
|
|
10
|
-
project.xml
|
|
11
|
-
project.properties
|
|
12
|
-
.project
|
|
13
|
-
.settings*
|
|
14
|
-
*.sublime-project
|
|
15
|
-
*.sublime-workspace
|
|
16
|
-
.sublimelinterrc
|
|
17
|
-
|
|
18
|
-
# Caches
|
|
19
|
-
.eslintcache
|
|
20
|
-
.stylelintcache
|
|
21
|
-
|
|
22
|
-
# Environment files
|
|
23
|
-
wp-cli.local.yml
|
|
24
|
-
.wp-env.override.json
|
|
25
|
-
npm-debug.log
|
|
26
|
-
.pnpm-debug.log
|
|
27
|
-
|
|
28
|
-
# Node Package Dependencies
|
|
29
|
-
node_modules/
|
|
30
|
-
|
|
31
|
-
# Composer
|
|
32
|
-
packages/**/tests/
|
|
33
|
-
vendor/
|
|
34
|
-
bin/composer/**/vendor/
|
|
35
|
-
|
|
36
|
-
# Support .gitkeep Files
|
|
37
|
-
!.gitkeep
|
|
38
|
-
webpack.mix.local.js
|
|
39
|
-
mix-manifest.json
|
|
40
|
-
|
|
41
|
-
# WP Browser Files
|
|
42
|
-
tests/_output
|
|
43
|
-
tests/.env
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{package.name}}",
|
|
3
|
-
"title": "{{wp.name}}",
|
|
4
|
-
"description": "{{wp.description}}",
|
|
5
|
-
"homepage": "{{company.url}}",
|
|
6
|
-
"private": true,
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/advanced-ads/{{package.name}}.git"
|
|
10
|
-
},
|
|
11
|
-
"author": "{{author.name}}",
|
|
12
|
-
"license": "GPL-3.0-or-later",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/advanced-ads/{{package.name}}/issues"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"prepare": "husky install",
|
|
18
|
-
"dev": "mix",
|
|
19
|
-
"watch": "mix watch",
|
|
20
|
-
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
|
21
|
-
"hot": "mix watch --hot",
|
|
22
|
-
"build": "mix --production",
|
|
23
|
-
"lint": "lint-staged",
|
|
24
|
-
"lint:css": "stylelint \"**/*.css\" --cache",
|
|
25
|
-
"lint:scss": "stylelint \"**/*.scss\" --cache",
|
|
26
|
-
"lint:js": "eslint . --cache",
|
|
27
|
-
"lint:p": "prettier -c .",
|
|
28
|
-
"lint:pw": "prettier -w .",
|
|
29
|
-
"lint:php": "vendor/bin/phpcs",
|
|
30
|
-
"translations": "node ./tools/wp-glotpress.js"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
},
|
|
34
|
-
"browserslist": [
|
|
35
|
-
"> 1%",
|
|
36
|
-
"last 1 Android versions",
|
|
37
|
-
"last 1 ChromeAndroid versions",
|
|
38
|
-
"last 2 Chrome versions",
|
|
39
|
-
"last 2 Firefox versions",
|
|
40
|
-
"last 2 Safari versions",
|
|
41
|
-
"last 2 iOS versions",
|
|
42
|
-
"last 2 Edge versions",
|
|
43
|
-
"last 2 Opera versions"
|
|
44
|
-
],
|
|
45
|
-
"lint-staged": {
|
|
46
|
-
"*.js": [
|
|
47
|
-
"prettier -c",
|
|
48
|
-
"eslint --cache"
|
|
49
|
-
],
|
|
50
|
-
"*.(sa|sc|c)ss": [
|
|
51
|
-
"prettier -c",
|
|
52
|
-
"stylelint --cache"
|
|
53
|
-
],
|
|
54
|
-
"*.php": "vendor/bin/phpcs",
|
|
55
|
-
"*.md": "prettier -c"
|
|
56
|
-
},
|
|
57
|
-
"glotpress": {
|
|
58
|
-
"project": "{{package.name}}",
|
|
59
|
-
"destination": "./languages/"
|
|
60
|
-
},
|
|
61
|
-
"wpPot": {
|
|
62
|
-
"output": "/languages/",
|
|
63
|
-
"file": "{{wp.textDomain}}.pot",
|
|
64
|
-
"domain": "{{wp.textDomain}}"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
-
// webpack.mix.js
|
|
3
|
-
|
|
4
|
-
const mix = require('laravel-mix');
|
|
5
|
-
const { join } = require('path');
|
|
6
|
-
const packageData = require('./package.json');
|
|
7
|
-
require('./tools/laravel-mix/wp-pot');
|
|
8
|
-
|
|
9
|
-
// Local config.
|
|
10
|
-
let localConfig = {};
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
localConfig = require('./webpack.mix.local');
|
|
14
|
-
} catch {}
|
|
15
|
-
|
|
16
|
-
// Webpack Config.
|
|
17
|
-
mix.webpackConfig({
|
|
18
|
-
externals: {
|
|
19
|
-
jquery: 'jQuery',
|
|
20
|
-
lodash: 'lodash',
|
|
21
|
-
moment: 'moment',
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Aliasing Paths.
|
|
26
|
-
mix.alias({
|
|
27
|
-
'@root': join(__dirname, 'assets/src'),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// Browsersync
|
|
31
|
-
if (undefined !== localConfig.wpUrl && '' !== localConfig.wpUrl) {
|
|
32
|
-
mix.browserSync({
|
|
33
|
-
proxy: localConfig.wpUrl,
|
|
34
|
-
ghostMode: false,
|
|
35
|
-
notify: false,
|
|
36
|
-
ui: false,
|
|
37
|
-
open: true,
|
|
38
|
-
online: false,
|
|
39
|
-
files: ['assets/css/*.min.css', 'assets/js/*.js', '**/*.php'],
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* CSS Files
|
|
45
|
-
*/
|
|
46
|
-
mix.sass('assets/scss/app.scss', 'assets/css/app.min.css', {
|
|
47
|
-
sassOptions: {
|
|
48
|
-
outputStyle: 'compressed',
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* JavaScript Files
|
|
54
|
-
*/
|
|
55
|
-
mix.js('assets/src/app.js', 'assets/js/app.js');
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* WordPress translation
|
|
59
|
-
*/
|
|
60
|
-
mix.wpPot({
|
|
61
|
-
output: packageData.wpPot.output,
|
|
62
|
-
file: packageData.wpPot.file,
|
|
63
|
-
skipJS: true,
|
|
64
|
-
domain: packageData.wpPot.domain,
|
|
65
|
-
});
|
package/template/index.js
DELETED
|
File without changes
|
package/template/index.php
DELETED
|
File without changes
|
|
File without changes
|