wp-lemon-create 2.0.4 → 2.0.6

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 +23 -20
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -276,21 +276,6 @@ program
276
276
  */
277
277
  shell.cd('../../../../');
278
278
 
279
- shell.exec(`touch workspace.code-workspace`);
280
- shell.exec(`echo '{
281
- "folders": [
282
- {
283
- "name": "root",
284
- "path": "."
285
- },
286
- {
287
- "name": "${project_name}",
288
- "path": "web/app/themes/${project_name}"
289
- }
290
- ]
291
- }' >> workspace.code-workspace`);
292
- shell.echo('✔️ .code-workspace file created.\n');
293
-
294
279
 
295
280
  /**
296
281
  * reload host file so browsersync works without a restart.
@@ -320,6 +305,21 @@ program
320
305
  if (project_type == 'new') {
321
306
  shell.echo('⏳ Installing WordPress.\n');
322
307
 
308
+ shell.exec(`touch workspace.code-workspace`);
309
+ shell.exec(`echo '{
310
+ "folders": [
311
+ {
312
+ "name": "root",
313
+ "path": "."
314
+ },
315
+ {
316
+ "name": "${project_name}",
317
+ "path": "web/app/themes/${project_name}"
318
+ }
319
+ ]
320
+ }' >> workspace.code-workspace`);
321
+ shell.echo('✔️ .code-workspace file created.\n');
322
+
323
323
  if (shell.exec(`wp db create`, { silent: true }).code !== 0) {
324
324
  prompt('Database creation failed. Please make sure your server is running. Press enter to continue.');
325
325
  createDB();
@@ -382,12 +382,20 @@ function setupWordPress() {
382
382
  shell.exec(`wp rewrite structure '/%postname%/'`, { silent: true });
383
383
  shell.echo('✔️ Setting permalink structure.');
384
384
 
385
+
386
+ // Set language
387
+ shell.exec(`wp language core install nl_NL`, { silent: true });
388
+ shell.exec(`wp language core activate nl_NL`, { silent: true });
389
+ shell.exec(`wp language plugin install nl_NL --all`, { silent: true });
390
+ shell.echo('✔️ Installed Dutch language.');
391
+
385
392
  // activate plugins
386
393
  shell.exec(`wp plugin activate fluentform`, { silent: true });
387
394
  shell.exec(`wp plugin activate fluentformpro`, { silent: true });
388
395
  shell.exec(`wp plugin activate advanced-custom-fields-pro`, { silent: true });
389
396
  shell.exec(`wp plugin activate quartermaster`, { silent: true });
390
397
 
398
+
391
399
  shell.exec(`wp theme activate ${child_theme_folder}`, { silent: true });
392
400
  shell.echo(`✔️ Activating child theme ${child_theme_folder}`);
393
401
 
@@ -399,11 +407,6 @@ function setupWordPress() {
399
407
  shell.exec(`wp comment delete 1 --force`, { silent: true });
400
408
  shell.echo('✔️ Create homepage and set as front-page.');
401
409
 
402
- // Set language
403
- shell.exec(`wp language core install nl_NL`, { silent: true });
404
- shell.exec(`wp language plugin install nl_NL --all`, { silent: true });
405
- shell.exec(`wp language core activate nl_NL`, { silent: true });
406
- shell.echo('✔️ Installed Dutch language.');
407
410
 
408
411
  // set menu
409
412
  shell.exec(`wp menu create "Hoofdmenu"`, { silent: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-lemon-create",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Studio Lemon <erik@studiolemon.nl>",