wp-lemon-create 1.9.2 → 2.0.1

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.
Files changed (2) hide show
  1. package/lib/index.js +16 -6
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -24,6 +24,7 @@ let plugins_wpml = false;
24
24
  let is_spinup = false;
25
25
  let skipGit = false;
26
26
  let branch = false;
27
+ let version_constraints = '*';
27
28
 
28
29
  program
29
30
  .name(commandName)
@@ -109,6 +110,7 @@ program
109
110
  plugins_searchwp = prompt('Add plugin: SearchWP? yes/no (defaults to no)', 'no');
110
111
  plugins_wpml = prompt('Add plugin: WPML? yes/no (defaults to no)', 'no');
111
112
  is_spinup = prompt('Does the project run on Spinup-wp? (defaults to no)', 'no');
113
+ is_beta = prompt('Is this a beta project? (defaults to no)', 'no');
112
114
 
113
115
  if (project_repository == 'none') {
114
116
  skipGit = true;
@@ -128,6 +130,11 @@ program
128
130
  shell.echo(`🎉 Setting up ${project_type} wp-lemon project with url ${project_url} \n`);
129
131
 
130
132
  if (project_type == 'new') {
133
+
134
+ if (is_beta) {
135
+ version_constraints = '^4@beta';
136
+ }
137
+
131
138
  shell.echo('⏳ Downloading Bedrock. This may take a minute or so.\n');
132
139
 
133
140
  /**
@@ -157,7 +164,7 @@ program
157
164
  shell.exec('composer require composer/installers ~1.0', { silent: true });
158
165
  shell.exec('"roots/wordpress', { silent: true });
159
166
  // Add libraries and parent theme
160
- shell.exec('composer require highground/bulldozer giggsey/libphonenumber-for-php timber/timber satispress/wp-lemon --with-all-dependencies', { silent: true });
167
+ shell.exec(`composer require highground/bulldozer giggsey/libphonenumber-for-php timber/timber satispress/wp-lemon:${version_constraints} --with-all-dependencies`, { silent: true });
161
168
 
162
169
  shell.exec(
163
170
  'composer require satispress/advanced-custom-fields-pro satispress/fluentformpro satispress/quartermaster satispress/wp-migrate-db-pro wpackagist-plugin/limit-login-attempts-reloaded log1x/acf-editor-palette wpackagist-plugin/fluentform wpackagist-plugin/seo-by-rank-math wpackagist-plugin/simple-custom-post-order wpackagist-plugin/worker wpackagist-plugin/fluent-smtp --with-all-dependencies',
@@ -205,7 +212,9 @@ program
205
212
  shell.echo('⏳ Downloading child theme.\n');
206
213
  shell.cd('web/app/themes/');
207
214
 
208
- shell.exec(`composer create-project --repository https://packagist.studiolemon.nl/satispress/ satispress/wp-lemon-child ${child_theme_folder} --no-dev`, { silent: true });
215
+ shell.exec(`composer create-project --repository https://packagist.studiolemon.nl/satispress/ satispress/wp-lemon-child:${version_constraints} ${child_theme_folder} --no-dev`, { silent: true });
216
+
217
+
209
218
 
210
219
  shell.cd(child_theme_folder);
211
220
  shell.rm('-rf', '.github');
@@ -358,7 +367,7 @@ function createDB() {
358
367
  function setupWordPress() {
359
368
  if (
360
369
  shell.exec(
361
- `wp core install --skip-email --url="http://${project_url}" --title="${project_name}" --admin_user="${username}" --admin_password="${password}" --admin_email="${email}"`,
370
+ `wp core install --skip-email --url='http://${project_url}' --title='${project_name}' --admin_user='${username}' --admin_password='${password}' --admin_email='${email}'`,
362
371
  { silent: true },
363
372
  ).code !== 0
364
373
  ) {
@@ -388,9 +397,10 @@ function setupWordPress() {
388
397
  shell.echo('✔️ Installed Dutch language.');
389
398
 
390
399
  // activate plugins
391
- shell.exec(`wp plugin activate wp plugin activate fluentform`, { silent: true });
392
- shell.exec(`wp plugin activate wp plugin activate fluentformpro`, { silent: true });
393
-
400
+ shell.exec(`wp plugin activate fluentform`, { silent: true });
401
+ shell.exec(`wp plugin activate fluentform`, { silent: true });
402
+ shell.exec(`wp plugin activate advanced-custom-fields-pro`, { silent: true });
403
+ shell.exec(`wp plugin activate quartermaster`, { silent: true });
394
404
  // set menu
395
405
  shell.exec(`wp menu create "Hoofdmenu"`, { silent: true });
396
406
  shell.exec(`wp menu item add-post Hoofdmenu 2`, { silent: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-lemon-create",
3
- "version": "1.9.2",
3
+ "version": "2.0.1",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Erik van der bas",