wp-advads 1.0.9 → 1.0.11
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/CHANGELOG.md +20 -0
- package/README.md +49 -0
- package/package.json +1 -1
- package/src/commands/release/change-version.js +2 -2
- package/src/commands/release/changelog.js +2 -2
- package/src/commands/release/composer.js +1 -1
- package/src/commands/release/translations.js +1 -1
- package/src/commands/setup/prompts.js +13 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
## 1.0.11 - 08.08.2023
|
|
5
|
+
|
|
6
|
+
Improve: Remove company questions
|
|
7
|
+
Update: README.md
|
|
8
|
+
Add: CAHNGELOG.md
|
|
9
|
+
|
|
10
|
+
## 1.0.10 - 07.08.2023
|
|
11
|
+
|
|
12
|
+
Refactor: the whole pluign
|
|
13
|
+
|
|
14
|
+
## 1.0.5 - 24.07.2023
|
|
15
|
+
|
|
16
|
+
Update: PHPCS file
|
|
17
|
+
|
|
18
|
+
## 1.0.0 - 10.05.2023
|
|
19
|
+
|
|
20
|
+
Initial release
|
package/README.md
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# WordPress Scaffolding
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/wp-advads) [](https://standardjs.com)
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="https://img.icons8.com/nolan/256/wordpress.png"/>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
## 📃 Introduction
|
|
10
|
+
|
|
11
|
+
Quickly bootstrap your next awesome WordPress plugin with just one command!
|
|
12
|
+
|
|
13
|
+
## 💾 Installation
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
npx wp-advads
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 🕹 Usage
|
|
20
|
+
|
|
21
|
+
### Create plugin
|
|
22
|
+
Run `wp-advads make:plugin` command in your terminal and answer the questions and boom, it will auto-magically generate a WordPress plugin for you without stress!
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
npx wp-advads make:plugin
|
|
26
|
+
npx wp-advads make:plugin --folder=my-awesome-plugin
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Create files
|
|
30
|
+
Generate files within the plugin folder using the answer from creating plugin step.
|
|
31
|
+
```js
|
|
32
|
+
npx wp-advads make:file --file="Dashboard"
|
|
33
|
+
npx wp-advads make:file --file="Admin\Report\Dashboard"
|
|
34
|
+
npx wp-advads make:file --file="Admin\Report\Dashboard" --singleton
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
1. This one generate a file named `class-dashboard.php` in `includes` folder with namespace `${rootNamespace}`.
|
|
38
|
+
2. This one generate a file name `class-dashboard.php` in `includes/admin/report` folder with namespace `${rootNamespace}\Admin\Report`.
|
|
39
|
+
3. This one generate a file name `class-dashboard.php` in `includes/admin/report` folder with namespace `${rootNamespace}\Admin\Report` and it will be a singleton class.
|
|
40
|
+
|
|
41
|
+
### Create release
|
|
42
|
+
Create the release branch performing checks and tasks required for it.
|
|
43
|
+
```js
|
|
44
|
+
npx wp-advads make:release
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 📖 Changelog
|
|
48
|
+
|
|
49
|
+
[See the changelog file](./CHANGELOG.md)
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ function updateReadme(next) {
|
|
|
33
33
|
if (null !== regex) {
|
|
34
34
|
regex = regex.groups
|
|
35
35
|
content = content.replace(`${regex.prefix}${regex.version}`, `${regex.prefix} ${pluginData.semver.getNextVersionString()}`)
|
|
36
|
-
pluginData.commitMessages.push('update
|
|
36
|
+
pluginData.commitMessages.push('update version in readme.txt')
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
return content
|
|
@@ -90,7 +90,7 @@ function updatePluginFiles(next) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
if(update) {
|
|
93
|
-
pluginData.commitMessages.push('update
|
|
93
|
+
pluginData.commitMessages.push('update version in ' + fileName)
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
return content
|
|
@@ -187,7 +187,7 @@ function writeToChangelog(next) {
|
|
|
187
187
|
].join('\n')
|
|
188
188
|
)
|
|
189
189
|
|
|
190
|
-
pluginData.commitMessages.push('
|
|
190
|
+
pluginData.commitMessages.push('add changelog to changelog.txt')
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
return content
|
|
@@ -216,7 +216,7 @@ function writeToReadme(next) {
|
|
|
216
216
|
].join('\n')
|
|
217
217
|
)
|
|
218
218
|
|
|
219
|
-
pluginData.commitMessages.push('
|
|
219
|
+
pluginData.commitMessages.push('add changelog to readme.txt')
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
return content
|
|
@@ -29,7 +29,7 @@ export function updateComposer(next) {
|
|
|
29
29
|
execCommand('composer install -o -a -n --no-dev --no-scripts', function() {
|
|
30
30
|
fs.renameSync('./vendor', './packages')
|
|
31
31
|
execCommand('composer install --no-scripts', function() {
|
|
32
|
-
pluginData.commitMessages.push('update
|
|
32
|
+
pluginData.commitMessages.push('update 3rd party dependecies and composer dump-autoloader')
|
|
33
33
|
onSameLine(`${logSymbols.success} composer updated`)
|
|
34
34
|
next()
|
|
35
35
|
})
|
|
@@ -29,7 +29,7 @@ export function wpPot( next ) {
|
|
|
29
29
|
execCommand(
|
|
30
30
|
[ 'wp', 'i18n', 'make-pot', rootPath, `${rootPath}${output}${file} --domain=${domain} --exclude=${exclude.join(',')}` ].join(' '),
|
|
31
31
|
() => {
|
|
32
|
-
pluginData.commitMessages.push('update
|
|
32
|
+
pluginData.commitMessages.push('update POT file')
|
|
33
33
|
console.log( logSymbols.success + ' POT file successfully generated!' )
|
|
34
34
|
next()
|
|
35
35
|
}
|
|
@@ -100,7 +100,19 @@ export default ( next ) => {
|
|
|
100
100
|
inquirer.prompt( questions )
|
|
101
101
|
.then( ( answers ) => {
|
|
102
102
|
const date = new Date()
|
|
103
|
-
answers
|
|
103
|
+
answers = {
|
|
104
|
+
...answers,
|
|
105
|
+
year: date.getFullYear(),
|
|
106
|
+
company: {
|
|
107
|
+
name: 'Advanced Ads',
|
|
108
|
+
url: 'https://wpadvancedads.com/',
|
|
109
|
+
},
|
|
110
|
+
author: {
|
|
111
|
+
name: 'Advanced Ads',
|
|
112
|
+
email: 'info@wpadvancedads.com',
|
|
113
|
+
url: 'https://wpadvancedads.com/',
|
|
114
|
+
}
|
|
115
|
+
}
|
|
104
116
|
|
|
105
117
|
// Validation.
|
|
106
118
|
if ( '' === answers.wp.textDomain ) {
|