wp-lemon-create 1.3.0 → 1.3.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 +7 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ program
31
31
  var plugins_wpml = false;
32
32
  var is_spinup = false;
33
33
  var skipGit = false;
34
+ var branch = false;
34
35
 
35
36
  console.log(`Starting $${commandName} @${version}`);
36
37
 
@@ -101,6 +102,7 @@ program
101
102
  }
102
103
  } else if (projecttype == 'existing') {
103
104
  project_repository = prompt('Existing repository link in ssh format:');
105
+ branch = prompt('Branch to checkout (defaults to master):', 'master');
104
106
  } else {
105
107
  shell.echo('no valid command. Exiting.');
106
108
  shell.exit(1);
@@ -206,6 +208,11 @@ program
206
208
  shell.exit(1);
207
209
  }
208
210
 
211
+ if (branch) {
212
+ shell.echo(`Checking out branch: ${branch}`);
213
+ shell.exec(`git checkout ${branch}`);
214
+ }
215
+
209
216
  shell.cd('web/app/themes/');
210
217
  if (shell.cd(child_theme_folder).code !== 0) {
211
218
  shell.echo('Error: Child theme not found');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-lemon-create",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Bootstrap your wp-lemon project",
5
5
  "main": "index.js",
6
6
  "author": "Erik van der bas",