theme-juice 0.28.1 → 0.28.2
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/theme-juice/commands/create.rb +23 -9
- data/lib/theme-juice/man/tj +6 -6
- data/lib/theme-juice/man/tj-deploy +1 -1
- data/lib/theme-juice/man/tj-deploy.txt +1 -1
- data/lib/theme-juice/man/tj.txt +28 -26
- data/lib/theme-juice/tasks/template.rb +8 -4
- data/lib/theme-juice/tasks/vm_update_box.rb +2 -2
- data/lib/theme-juice/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d3330b94b90b336c9ac48a2a0a37377ccddb7bb
|
|
4
|
+
data.tar.gz: 67f3c26154eeb10c53f33e4c6ac86191f47de21a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f12970fdd0a8e4fbdc74d8450de0727f6857971ca2cef7241fce1bd28cf8fff386cac1086360cbf50847e661d185901f49bd2135d2fdb073672704ba1fd764b6
|
|
7
|
+
data.tar.gz: 6b7b4bd22c1d21732e78df853a2d12d01a06606222cbe40245e5145eeeae176415edd1a0fd93d8700c403310c9e80aa2a896ef70a56a7763411059346de1e812
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Theme Juice CLI
|
|
2
2
|
[](https://rubygems.org/gems/theme-juice)
|
|
3
|
-
[](https://travis-ci.org/ezekg/tj)
|
|
4
4
|
[](https://codeclimate.com/github/ezekg/theme-juice-cli)
|
|
5
5
|
[](https://codeclimate.com/github/ezekg/theme-juice-cli)
|
|
6
6
|
[](https://gitter.im/ezekg/theme-juice-cli)
|
|
@@ -74,7 +74,7 @@ module ThemeJuice
|
|
|
74
74
|
@project.url = @opts.fetch("url") { url }
|
|
75
75
|
@project.xip_url = @opts.fetch("xip_url") { xip_url }
|
|
76
76
|
@project.template = @opts.fetch("template") { template }
|
|
77
|
-
@project.template_revision = @opts.fetch("template_revision") {
|
|
77
|
+
@project.template_revision = @opts.fetch("template_revision") { template_revision }
|
|
78
78
|
@project.repository = @opts.fetch("repository") { repository }
|
|
79
79
|
@project.db_host = @opts.fetch("db_host") { db_host }
|
|
80
80
|
@project.db_name = @opts.fetch("db_name") { db_name }
|
|
@@ -192,18 +192,18 @@ module ThemeJuice
|
|
|
192
192
|
choice = @io.choose "Which starter template would you like to use?", :blue, TEMPLATES.keys
|
|
193
193
|
|
|
194
194
|
case choice
|
|
195
|
-
when /
|
|
195
|
+
when /themejuice/i
|
|
196
196
|
@io.say "Awesome choice!", :color => :green, :icon => :success
|
|
197
|
-
when /
|
|
198
|
-
@project.wp_config_modify
|
|
199
|
-
@project.no_config
|
|
200
|
-
@project.no_wp_cli
|
|
201
|
-
@project.no_env
|
|
197
|
+
when /wordpress/i
|
|
198
|
+
@project.wp_config_modify = true
|
|
199
|
+
@project.no_config = true
|
|
200
|
+
@project.no_wp_cli = true
|
|
201
|
+
@project.no_env = true
|
|
202
202
|
@io.say "This is a stock WordPress install, so I'll go ahead and modify the 'wp-config' file for you.", {
|
|
203
203
|
:color => :yellow, :icon => :notice }
|
|
204
|
-
when /
|
|
204
|
+
when /other/i
|
|
205
205
|
TEMPLATES[choice] = @io.ask "What is the repository URL of the starter template that you would like to clone?"
|
|
206
|
-
when /
|
|
206
|
+
when /none/i
|
|
207
207
|
@project.bare = true
|
|
208
208
|
@io.say "Next time you need to create a project without a starter template, you can just run the 'setup' command instead.", {
|
|
209
209
|
:color => :yellow, :icon => :notice }
|
|
@@ -215,6 +215,20 @@ module ThemeJuice
|
|
|
215
215
|
template
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
+
def template_revision
|
|
219
|
+
return nil if @project.bare
|
|
220
|
+
|
|
221
|
+
revision = nil
|
|
222
|
+
|
|
223
|
+
case @project.template
|
|
224
|
+
when /wordpress/i
|
|
225
|
+
revision = @io.ask "Which version of WordPress would you like to use?", {
|
|
226
|
+
:default => "master" }
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
revision
|
|
230
|
+
end
|
|
231
|
+
|
|
218
232
|
def repository
|
|
219
233
|
return false if @project.skip_repo || @project.use_defaults
|
|
220
234
|
|
data/lib/theme-juice/man/tj
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
|
3
3
|
.
|
|
4
|
-
.TH "TJ" "1" "
|
|
4
|
+
.TH "TJ" "1" "September 2016" "" "Theme Juice Manual"
|
|
5
5
|
.
|
|
6
6
|
.SH "NAME"
|
|
7
7
|
\fBtj\fR \- WordPress development made easy
|
|
@@ -37,7 +37,7 @@ Run Juicefile(5) commands from the passed path instead of from the current direc
|
|
|
37
37
|
.
|
|
38
38
|
.TP
|
|
39
39
|
\fB\-\-from\-srv\fR, \fB\-\-in\-srv\fR=\fIpath\fR
|
|
40
|
-
Run Juicefile(5) commands from the passed srv path instead of from the current host directory\.
|
|
40
|
+
Run Juicefile(5) commands from the passed srv path instead of from the current host directory path when using the \fB\-\-inside\-vm\fR flag\.
|
|
41
41
|
.
|
|
42
42
|
.TP
|
|
43
43
|
\fB\-\-inside\-vm\fR, \fB\-\-in\-vm\fR
|
|
@@ -306,7 +306,7 @@ if those were the options chosen during a creation\. The following variables are
|
|
|
306
306
|
\fBvm_ip\fR: Virtual machine IP address
|
|
307
307
|
.
|
|
308
308
|
.IP "\(bu" 4
|
|
309
|
-
\fBvm_revision\fR Revision hash or branch
|
|
309
|
+
\fBvm_revision\fR Revision hash or branch of VM
|
|
310
310
|
.
|
|
311
311
|
.IP "\(bu" 4
|
|
312
312
|
\fBvm_path\fR: Virtual machine location on the host machine
|
|
@@ -349,12 +349,12 @@ Revision hash or branch to checkout for VM (default is master)
|
|
|
349
349
|
Force directory prefix for project in VM
|
|
350
350
|
.
|
|
351
351
|
.TP
|
|
352
|
-
\fBTJ_FROM_PATH\fR
|
|
352
|
+
\fBTJ_FROM_PATH\fR\fI=path\fR
|
|
353
353
|
Run Juicefile(5) commands from the passed path instead of from the current directory\.
|
|
354
354
|
.
|
|
355
355
|
.TP
|
|
356
|
-
\fBTJ_FROM_SRV\fR
|
|
357
|
-
Run Juicefile(5) commands from the passed srv path instead of from the current host directory path\.
|
|
356
|
+
\fBTJ_FROM_SRV\fR\fI=path\fR
|
|
357
|
+
Run Juicefile(5) commands from the passed srv path instead of from the current host directory path when \fBTJ_INSIDE_VM\fR is enabled\.
|
|
358
358
|
.
|
|
359
359
|
.TP
|
|
360
360
|
\fBTJ_INSIDE_VM\fR=\fIbool\fR
|
data/lib/theme-juice/man/tj.txt
CHANGED
|
@@ -30,14 +30,15 @@ GLOBAL OPTIONS
|
|
|
30
30
|
|
|
31
31
|
--from-srv, --in-srv=path
|
|
32
32
|
Run Juicefile(5) commands from the passed srv path instead of
|
|
33
|
-
from
|
|
33
|
+
from the current host directory path when using the --inside-vm
|
|
34
|
+
flag.
|
|
34
35
|
|
|
35
36
|
--inside-vm, --in-vm
|
|
36
|
-
Run
|
|
37
|
+
Run Juicefile(5) commands from inside of the virtual machine
|
|
37
38
|
instead of your host machine.
|
|
38
39
|
|
|
39
40
|
--yolo, --yes
|
|
40
|
-
Say
|
|
41
|
+
Say yes to anything and everything, and maybe even get a few
|
|
41
42
|
surprises
|
|
42
43
|
|
|
43
44
|
--boring
|
|
@@ -112,16 +113,16 @@ SECONDARY COMMANDS
|
|
|
112
113
|
List all projects
|
|
113
114
|
|
|
114
115
|
vm, vagrant, vvv=[command[,command]...]
|
|
115
|
-
Manage
|
|
116
|
-
proxied
|
|
116
|
+
Manage development environment via vagrant(1). Commands are
|
|
117
|
+
proxied to your Vagrant installation so that they can be run
|
|
117
118
|
from any directory.
|
|
118
119
|
|
|
119
120
|
CONFIG FILE
|
|
120
|
-
A
|
|
121
|
-
commonly
|
|
122
|
-
can
|
|
123
|
-
set
|
|
124
|
-
plan
|
|
121
|
+
A YAML configuration file called a Juicefile(5) can be used to store
|
|
122
|
+
commonly used build scripts, similar to npm(1) scripts. Each command
|
|
123
|
+
can be mapped to any build script you like, allowing you to define a
|
|
124
|
+
set of commands that can be used across all of your projects. If you
|
|
125
|
+
plan to deploy using tj, this file will also house your deploy(1) con-
|
|
125
126
|
figuration.
|
|
126
127
|
|
|
127
128
|
For reference, below is an example config:
|
|
@@ -173,8 +174,8 @@ CONFIG COMMANDS
|
|
|
173
174
|
dev, which will in turn run the command grunt.
|
|
174
175
|
|
|
175
176
|
If you noticed in the example above, there are a few commands that con-
|
|
176
|
-
tain
|
|
177
|
-
joining:
|
|
177
|
+
tain %args%; each command list is run within a single execution via
|
|
178
|
+
joining: cmd1 && cmd2 [&& cmd3...], with all %args%/%argN% being
|
|
178
179
|
replaced with the corresponding argument index, when available.
|
|
179
180
|
|
|
180
181
|
Here's a few example commands using placeholders:
|
|
@@ -191,16 +192,16 @@ CONFIG COMMANDS
|
|
|
191
192
|
|
|
192
193
|
|
|
193
194
|
|
|
194
|
-
To
|
|
195
|
-
dev
|
|
196
|
-
build;
|
|
195
|
+
To clarify a little bit more, we could run tj dev build, and since our
|
|
196
|
+
dev command contains %args%, that will in turn run the command grunt
|
|
197
|
+
build; if we run tj dev some:other task, that would be interpreted and
|
|
197
198
|
run as grunt some:other task.
|
|
198
199
|
|
|
199
|
-
You
|
|
200
|
-
ber
|
|
201
|
-
with
|
|
202
|
-
mand,
|
|
203
|
-
to
|
|
200
|
+
You can specify an unlimited number of commands with an unlimited num-
|
|
201
|
+
ber of arguments within your Juicefile; however, you should be careful
|
|
202
|
+
with how this is used. Don't go including sudo rm -rf %arg1% in a com-
|
|
203
|
+
mand, while passing / as an argument. Keep it simple. These are meant
|
|
204
|
+
to make your life easier by helping you manage build tools, not to do
|
|
204
205
|
fancy scripting.
|
|
205
206
|
|
|
206
207
|
CONFIG TEMPLATE STRINGS
|
|
@@ -258,7 +259,7 @@ CONFIG TEMPLATE STRINGS
|
|
|
258
259
|
|
|
259
260
|
o vm_ip: Virtual machine IP address
|
|
260
261
|
|
|
261
|
-
o vm_revision Revision hash or branch
|
|
262
|
+
o vm_revision Revision hash or branch of VM
|
|
262
263
|
|
|
263
264
|
o vm_path: Virtual machine location on the host machine
|
|
264
265
|
|
|
@@ -275,7 +276,7 @@ CONFIG TEMPLATE STRINGS
|
|
|
275
276
|
ENVIRONMENT
|
|
276
277
|
All of the global options have a corresponding ENV variable that can be
|
|
277
278
|
set to permanently use the specified value each time tj(1) is run. This
|
|
278
|
-
is
|
|
279
|
+
is useful if you're using an alternate vagrant(1) box, or if you need
|
|
279
280
|
to disable certain features due to limited support i.e. on Windows.
|
|
280
281
|
|
|
281
282
|
TJ_VM_BOX=repository
|
|
@@ -294,12 +295,13 @@ ENVIRONMENT
|
|
|
294
295
|
Force directory prefix for project in VM
|
|
295
296
|
|
|
296
297
|
TJ_FROM_PATH=path
|
|
297
|
-
Run
|
|
298
|
+
Run Juicefile(5) commands from the passed path instead of from
|
|
298
299
|
the current directory.
|
|
299
300
|
|
|
300
301
|
TJ_FROM_SRV=path
|
|
301
|
-
Run
|
|
302
|
-
from the
|
|
302
|
+
Run Juicefile(5) commands from the passed srv path instead of
|
|
303
|
+
from the current host directory path when TJ_INSIDE_VM is
|
|
304
|
+
enabled.
|
|
303
305
|
|
|
304
306
|
TJ_INSIDE_VM=bool
|
|
305
307
|
Run Juicefile(5) commands from inside of the virtual machine
|
|
@@ -345,4 +347,4 @@ ENVIRONMENT
|
|
|
345
347
|
|
|
346
348
|
|
|
347
349
|
|
|
348
|
-
|
|
350
|
+
September 2016 TJ(1)
|
|
@@ -12,8 +12,11 @@ module ThemeJuice
|
|
|
12
12
|
return unless @project.template
|
|
13
13
|
|
|
14
14
|
clone_template
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
if @config.exist?
|
|
17
|
+
render_template_config_erb
|
|
18
|
+
install_template
|
|
19
|
+
end
|
|
17
20
|
end
|
|
18
21
|
|
|
19
22
|
private
|
|
@@ -23,9 +26,10 @@ module ThemeJuice
|
|
|
23
26
|
@util.inside @project.location do
|
|
24
27
|
@util.run [], { :verbose => @env.verbose,
|
|
25
28
|
:capture => @env.quiet } do |cmds|
|
|
26
|
-
cmds << "git clone #{@project.template} ."
|
|
27
29
|
if @project.template_revision
|
|
28
|
-
cmds << "git
|
|
30
|
+
cmds << "git clone '#{@project.template}' --depth 1 --branch '#{@project.template_revision}' --single-branch ."
|
|
31
|
+
else
|
|
32
|
+
cmds << "git clone '#{@project.template}' --depth 1 ."
|
|
29
33
|
end
|
|
30
34
|
end
|
|
31
35
|
end
|
|
@@ -27,11 +27,11 @@ module ThemeJuice
|
|
|
27
27
|
:capture => @env.quiet } do |cmds|
|
|
28
28
|
cmds << "git fetch"
|
|
29
29
|
if @env.vm_revision
|
|
30
|
-
cmds << "git checkout #{@env.vm_revision}"
|
|
30
|
+
cmds << "git checkout '#{@env.vm_revision}'"
|
|
31
31
|
else
|
|
32
32
|
cmds << "git checkout master"
|
|
33
33
|
end
|
|
34
|
-
cmds << "git
|
|
34
|
+
cmds << "git reset --hard"
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
data/lib/theme-juice/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: theme-juice
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.28.
|
|
4
|
+
version: 0.28.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ezekiel Gabrielse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|