wp-advads 1.0.20 → 1.0.22

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "wp-advads",
4
- "version": "1.0.20",
4
+ "version": "1.0.22",
5
5
  "description": "Create a Advanced Ads wordPress plugin eco system.",
6
6
  "author": {
7
7
  "name": "Shakeeb Ahmed",
@@ -90,21 +90,30 @@ class CreateFile {
90
90
  }
91
91
 
92
92
  getTemplates = (args) => {
93
- const { singleton = false, integration = false, routes = false, initializer = false } = args
94
-
95
- if ( singleton ) {
93
+ const {
94
+ s = false,
95
+ singleton = false,
96
+ i = false,
97
+ integration = false,
98
+ r = false,
99
+ routes = false,
100
+ init = false,
101
+ initializer = false
102
+ } = args
103
+
104
+ if ( singleton || s ) {
96
105
  return [ '/file-singleton.php' ]
97
106
  }
98
107
 
99
- if ( integration ) {
108
+ if ( integration || i ) {
100
109
  return [ '/file-integration.php' ]
101
110
  }
102
111
 
103
- if ( routes ) {
112
+ if ( routes || r ) {
104
113
  return [ '/file-routes.php' ]
105
114
  }
106
115
 
107
- if ( initializer ) {
116
+ if ( initializer || init ) {
108
117
  return [ '/file-initializer.php' ]
109
118
  }
110
119
 
@@ -2,7 +2,7 @@
2
2
  * Node dependencies
3
3
  */
4
4
  import fs from 'fs'
5
- import { join } from 'path'
5
+ import { join, sep } from 'path'
6
6
  import { createRequire } from 'node:module'
7
7
 
8
8
  /**
@@ -60,5 +60,5 @@ export function getRootFolder() {
60
60
  export function getTemplateFolder() {
61
61
  const require = createRequire( import.meta.url )
62
62
  return require.resolve( '../../template' )
63
- .replace( '/index.js', '' )
63
+ .replace( `${sep}index.js`, '' )
64
64
  }