wp-lemon-create 1.2.0 → 1.2.4

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 +28 -5
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -127,8 +127,15 @@ program
127
127
  * Add composer packages
128
128
  */
129
129
  shell.echo('Installing plugins, master theme and packages. This may take a while\n');
130
- shell.exec('composer require highground/bulldozer log1x/acf-editor-palette satispress/advanced-custom-fields-pro satispress/fluentformpro satispress/lemon-blocks satispress/quartermaster satispress/wp-lemon satispress/wp-migrate-db-pro satispress/wp-migrate-db-pro-media-files wpackagist-plugin/limit-login-attempts-reloaded timber/timber wpackagist-plugin/cookie-law-info wpackagist-plugin/fluentform wpackagist-plugin/seo-by-rank-math wpackagist-plugin/simple-custom-post-order wpackagist-plugin/worker wpackagist-plugin/wp-mail-smtp --with-all-dependencies', { silent: true });
131
-
130
+
131
+ shell.exec('require composer/installers ~1.0', { silent: true });
132
+
133
+ // Add libraries and parent theme
134
+ shell.exec('composer require highground/bulldozer timber/timber satispress/wp-lemon --with-all-dependencies', { silent: true });
135
+
136
+ shell.exec('composer require satispress/advanced-custom-fields-pro satispress/fluentformpro satispress/lemon-blocks satispress/quartermaster satispress/wp-migrate-db-pro satispress/wp-migrate-db-pro-media-files wpackagist-plugin/limit-login-attempts-reloaded log1x/acf-editor-palette wpackagist-plugin/cookie-law-info wpackagist-plugin/fluentform wpackagist-plugin/seo-by-rank-math wpackagist-plugin/simple-custom-post-order wpackagist-plugin/worker wpackagist-plugin/wp-mail-smtp --with-all-dependencies', { silent: true });
137
+
138
+ shell.exec('composer remove squizlabs/php_codesnifferes roave/security-advisories', { silent: true });
132
139
 
133
140
  if (is_spinup == 'yes') {
134
141
  shell.exec('composer require wpackagist-plugin/spinupwp', { silent: true });
@@ -263,6 +270,7 @@ program
263
270
  shell.echo('✔️ Installing WordPress succesful.');
264
271
  shell.exec(`wp rewrite structure '/%postname%/'`, { silent: true });
265
272
  shell.echo('✔️ Setting permalink structure.');
273
+
266
274
  shell.exec(`wp theme activate ${projectname}`, { silent: true });
267
275
  shell.echo(`✔️ Activating child theme ${projectname}`);
268
276
 
@@ -283,11 +291,26 @@ program
283
291
  shell.exec(`wp menu location assign Hoofdmenu primary_navigation`, { silent: true });
284
292
  shell.echo('✔️ Created primary menu.');
285
293
 
294
+ } else {
295
+ shell.echo('Creating Database.\n');
296
+
297
+ if (shell.exec(`wp db create`, { silent: true }).code !== 0) {
298
+ shell.echo('Database creation failed.');
299
+ } else {
300
+ shell.echo('✔️ Database created.');
301
+ }
302
+
303
+
304
+ /**
305
+ * Wait until user adds site and presses a key.
306
+ */
307
+ shell.echo('You can import your database by placing the .sql dump in the project root and run wp db import databasename.sql.');
308
+ prompt('Please import your database and uploads. After that press enter to continue.');
309
+
310
+ // Flush rewrite rules
311
+ shell.exec(`wp rewrite flush`);
286
312
  }
287
313
 
288
- // Flush rewrite rules
289
- shell.exec(`wp rewrite flush`, { silent: true });
290
-
291
314
  shell.echo(`\n`);
292
315
  shell.echo(`🎉 All done! Happy developing!`);
293
316
  shell.echo(`🌐 You can now navigate to http://${projectname + tld}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-lemon-create",
3
- "version": "1.2.0",
3
+ "version": "1.2.4",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Erik van der bas",
@@ -9,8 +9,8 @@
9
9
  "wp-lemon-create": "./index.js"
10
10
  },
11
11
  "dependencies": {
12
- "commander": "^8.3.0",
12
+ "commander": "^9.0.0",
13
13
  "prompt-sync": "^4.2.0",
14
- "shelljs": "^0.8.4"
14
+ "shelljs": "^0.8.5"
15
15
  }
16
16
  }