wp-lemon-create 1.2.0 → 1.2.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 +12 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -128,7 +128,7 @@ program
128
128
  */
129
129
  shell.echo('Installing plugins, master theme and packages. This may take a while\n');
130
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
-
131
+ shell.exec('composer remove squizlabs/php_codesnifferes roave/security-advisories', { silent: true });
132
132
 
133
133
  if (is_spinup == 'yes') {
134
134
  shell.exec('composer require wpackagist-plugin/spinupwp', { silent: true });
@@ -263,6 +263,7 @@ program
263
263
  shell.echo('✔️ Installing WordPress succesful.');
264
264
  shell.exec(`wp rewrite structure '/%postname%/'`, { silent: true });
265
265
  shell.echo('✔️ Setting permalink structure.');
266
+
266
267
  shell.exec(`wp theme activate ${projectname}`, { silent: true });
267
268
  shell.echo(`✔️ Activating child theme ${projectname}`);
268
269
 
@@ -283,11 +284,18 @@ program
283
284
  shell.exec(`wp menu location assign Hoofdmenu primary_navigation`, { silent: true });
284
285
  shell.echo('✔️ Created primary menu.');
285
286
 
287
+ } else {
288
+ // Flush rewrite rules
289
+ shell.exec(`wp rewrite flush`);
290
+ shell.echo('Creating Database.\n');
291
+
292
+ if (shell.exec(`wp db create`, { silent: true }).code !== 0) {
293
+ shell.echo('Database creation failed.');
294
+ } else {
295
+ shell.echo('✔️ Database created, make sure to import database and uploads.');
296
+ }
286
297
  }
287
298
 
288
- // Flush rewrite rules
289
- shell.exec(`wp rewrite flush`, { silent: true });
290
-
291
299
  shell.echo(`\n`);
292
300
  shell.echo(`🎉 All done! Happy developing!`);
293
301
  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.1",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Erik van der bas",