wp-advads 1.0.10 → 1.0.12
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/setup/prompts.js +13 -37
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
|
@@ -16,42 +16,6 @@ export default ( next ) => {
|
|
|
16
16
|
const getAnswer = ( key, defaultVal = '' ) => get( settings, key, defaultVal )
|
|
17
17
|
|
|
18
18
|
const questions = [
|
|
19
|
-
// Company
|
|
20
|
-
{
|
|
21
|
-
type: 'input',
|
|
22
|
-
name: 'company.name',
|
|
23
|
-
message: 'Enter company name',
|
|
24
|
-
default: getAnswer( 'company.name','Advanced Ads' ),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: 'input',
|
|
28
|
-
name: 'company.url',
|
|
29
|
-
message: 'Enter company website url',
|
|
30
|
-
default: getAnswer( 'company.url', 'https://wpadvancedads.com/' ),
|
|
31
|
-
filter: ( val ) => val.toLowerCase()
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
// Author
|
|
35
|
-
{
|
|
36
|
-
type: 'input',
|
|
37
|
-
name: 'author.name',
|
|
38
|
-
message: 'Enter author name',
|
|
39
|
-
default: getAnswer( 'author.name', 'Advanced Ads' ),
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
type: 'input',
|
|
43
|
-
name: 'author.email',
|
|
44
|
-
message: 'Enter author email',
|
|
45
|
-
default: getAnswer( 'author.email', 'info@wpadvancedads.com' ),
|
|
46
|
-
filter: ( val ) => val.toLowerCase()
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: 'input',
|
|
50
|
-
name: 'author.url',
|
|
51
|
-
message: 'Enter author website url',
|
|
52
|
-
default: getAnswer( 'author.url', 'https://wpadvancedads.com' ),
|
|
53
|
-
filter: ( val ) => val.toLowerCase()
|
|
54
|
-
},
|
|
55
19
|
|
|
56
20
|
// WordPress
|
|
57
21
|
{
|
|
@@ -100,7 +64,19 @@ export default ( next ) => {
|
|
|
100
64
|
inquirer.prompt( questions )
|
|
101
65
|
.then( ( answers ) => {
|
|
102
66
|
const date = new Date()
|
|
103
|
-
answers
|
|
67
|
+
answers = {
|
|
68
|
+
...answers,
|
|
69
|
+
year: date.getFullYear(),
|
|
70
|
+
company: {
|
|
71
|
+
name: 'Advanced Ads',
|
|
72
|
+
url: 'https://wpadvancedads.com/',
|
|
73
|
+
},
|
|
74
|
+
author: {
|
|
75
|
+
name: 'Advanced Ads',
|
|
76
|
+
email: 'info@wpadvancedads.com',
|
|
77
|
+
url: 'https://wpadvancedads.com/',
|
|
78
|
+
}
|
|
79
|
+
}
|
|
104
80
|
|
|
105
81
|
// Validation.
|
|
106
82
|
if ( '' === answers.wp.textDomain ) {
|