@airfleet/generator-init 0.20.11 → 0.20.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.
|
@@ -140,6 +140,7 @@ export default class extends Generator {
|
|
|
140
140
|
ajaxVariables: this.ajaxVariables,
|
|
141
141
|
optionsPage: this.optionsPage,
|
|
142
142
|
viewsPrefix: this.viewsPrefix,
|
|
143
|
+
phpVersion: this._getPhpVersion(this.answers.pluginPhpVersion),
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
146
|
|
|
@@ -249,4 +250,18 @@ export default class extends Generator {
|
|
|
249
250
|
}
|
|
250
251
|
}
|
|
251
252
|
|
|
253
|
+
_getPhpVersion(pluginPhpVersion) {
|
|
254
|
+
const toFind = ['=','>'];
|
|
255
|
+
|
|
256
|
+
for (const char of toFind) {
|
|
257
|
+
const index = pluginPhpVersion.indexOf(char);
|
|
258
|
+
|
|
259
|
+
if (index >= 0) {
|
|
260
|
+
return pluginPhpVersion.substring(index + 1);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return pluginPhpVersion;
|
|
265
|
+
}
|
|
266
|
+
|
|
252
267
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Plugin URI: <%= answers.pluginDocumentationUrl %>
|
|
13
13
|
* Description: <%= answers.pluginDescription %>
|
|
14
14
|
* Version: <%= answers.pluginVersion %>
|
|
15
|
+
* Requires PHP: <%= phpVersion %>
|
|
15
16
|
* Author: Airfleet
|
|
16
17
|
* Author URI: https://www.airfleet.co/
|
|
17
18
|
* Text Domain: <%= name.slug %>
|