wp-lemon-create 2.0.6 → 2.1.0

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 +7 -6
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -25,6 +25,9 @@ let is_spinup = false;
25
25
  let skipGit = false;
26
26
  let branch = false;
27
27
  let version_constraints = '*';
28
+ let has_package_manager = false;
29
+ const hasYarn = shell.which('yarn');
30
+ const hasNpm = shell.which('npm');
28
31
 
29
32
  program
30
33
  .name(commandName)
@@ -56,18 +59,16 @@ program
56
59
 
57
60
  if (!shell.which('composer')) {
58
61
  shell.echo('Sorry, this script requires composer');
59
- shell.exit(1);
60
62
  }
61
63
  {
62
64
  shell.echo('✔️ Composer installed');
63
65
  }
64
66
 
65
- if (!shell.which('yarn')) {
66
- shell.echo('Sorry, this script requires yarn');
67
+ if (!hasYarn && !hasNpm) {
68
+ shell.echo('Yarn or npm not found.');
67
69
  shell.exit(1);
68
- }
69
- {
70
- shell.echo('✔️ Yarn installed');
70
+ } else {
71
+ shell.echo(`✔️ ${hasYarn ? 'Yarn' : 'Npm'} installed`);
71
72
  }
72
73
 
73
74
  if (!shell.which('wp')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-lemon-create",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Studio Lemon <erik@studiolemon.nl>",