theme-juice 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +204 -204
  3. data/bin/tj +15 -15
  4. data/lib/theme-juice.rb +46 -46
  5. data/lib/theme-juice/cli.rb +248 -248
  6. data/lib/theme-juice/command.rb +20 -20
  7. data/lib/theme-juice/commands/create.rb +221 -221
  8. data/lib/theme-juice/commands/delete.rb +51 -51
  9. data/lib/theme-juice/commands/deploy.rb +20 -20
  10. data/lib/theme-juice/config.rb +68 -70
  11. data/lib/theme-juice/env.rb +25 -25
  12. data/lib/theme-juice/io.rb +323 -323
  13. data/lib/theme-juice/project.rb +35 -35
  14. data/lib/theme-juice/task.rb +42 -42
  15. data/lib/theme-juice/tasks/create_confirm.rb +33 -33
  16. data/lib/theme-juice/tasks/create_success.rb +42 -42
  17. data/lib/theme-juice/tasks/database.rb +50 -50
  18. data/lib/theme-juice/tasks/delete_confirm.rb +24 -24
  19. data/lib/theme-juice/tasks/delete_success.rb +31 -31
  20. data/lib/theme-juice/tasks/dns.rb +45 -45
  21. data/lib/theme-juice/tasks/dot_env.rb +53 -53
  22. data/lib/theme-juice/tasks/entry.rb +50 -50
  23. data/lib/theme-juice/tasks/hosts.rb +43 -43
  24. data/lib/theme-juice/tasks/import_database.rb +28 -28
  25. data/lib/theme-juice/tasks/landrush.rb +33 -33
  26. data/lib/theme-juice/tasks/list.rb +50 -50
  27. data/lib/theme-juice/tasks/location.rb +23 -23
  28. data/lib/theme-juice/tasks/nginx.rb +51 -51
  29. data/lib/theme-juice/tasks/repo.rb +49 -49
  30. data/lib/theme-juice/tasks/synced_folder.rb +30 -30
  31. data/lib/theme-juice/tasks/theme.rb +34 -34
  32. data/lib/theme-juice/tasks/vm.rb +30 -30
  33. data/lib/theme-juice/tasks/vm_customfile.rb +42 -42
  34. data/lib/theme-juice/tasks/vm_location.rb +32 -32
  35. data/lib/theme-juice/tasks/vm_plugins.rb +32 -32
  36. data/lib/theme-juice/tasks/vm_provision.rb +39 -39
  37. data/lib/theme-juice/tasks/vm_restart.rb +25 -25
  38. data/lib/theme-juice/tasks/wp_cli.rb +52 -52
  39. data/lib/theme-juice/util.rb +45 -45
  40. data/lib/theme-juice/version.rb +5 -5
  41. metadata +6 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b205b3fc677c63ee8edc2a0c13f77278ef8b6bf
4
- data.tar.gz: 3d8b2f995129d7fb25720a519f249e10b4402116
3
+ metadata.gz: d82fa50ae168844be84fa86474178772f9e86fd4
4
+ data.tar.gz: 1569d739cc51d4d40530c2f093c45fc119b89eb6
5
5
  SHA512:
6
- metadata.gz: e3478fc683ad1dba3a8ef25314187bb40c47f80fee4240c7c95fa3d956b640daf694497018f20360b793fda7f7c01aac3ea1a0ffe58e8820c540633bdaf4ebea
7
- data.tar.gz: 1c44dc8d3def277761857fa77a62fb035fa0ec8f29375d8a205152a306f0e1f6241ca3d55e71b4fd389116f2c76137ffe8501783a46b561f02ef390a2e45c63d
6
+ metadata.gz: 55df4443c035be1a18d48ad012e7c13708d8168c877807f3740891dda762f253a59b6ab8962ce492889ace3e15228565886085e8cc7f0889a3551869f47dd236
7
+ data.tar.gz: aec5503bbe763b7153523ac0f0f8876102e63fdc68763f6fe57e81bf20081aa58fcb9fc0bd6440d2ae4d7170d8b589b8fa6e8b24633d31ce6dabd09e7d6080fb
data/README.md CHANGED
@@ -1,204 +1,204 @@
1
- # Theme Juice [![Gem Version](http://img.shields.io/gem/v/theme-juice.svg)](https://rubygems.org/gems/theme-juice)
2
- What is it? Theme Juice is a WordPress development command line utility that allows you to scaffold out entire Vagrant development environments in seconds (using [VVV](https://github.com/Varying-Vagrant-Vagrants/VVV) as the VM), manage dependencies and build tools, and even handle deployments.
3
-
4
- ## Installation
5
- * First, install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) for local development.
6
- * Then, install [Composer](https://getcomposer.org/) and [WP-CLI](http://wp-cli.org/), and make sure they're executable.
7
- * Finally, install with: `gem install theme-juice`
8
- That`s it!
9
-
10
- ## Windows users
11
- Since Windows doesn't support UTF-8 characters inside of the terminal, and is picky about colors, you'll have to run `tj` with a couple flags. What has worked for me on my Windows machine at home is to run all commands through [git-scm](http://git-scm.com/downloads) with the `--boring --no-landrush` flags.
12
-
13
- This disables all unicode characters and colors from being output, and disables [Landrush](https://github.com/phinze/landrush), which isn't supported fully on Windows. To set these globally via the `ENV`, run:
14
-
15
- ```bash
16
- export TJ_BORING=true
17
- export TJ_NO_LANDRUSH=true
18
- ```
19
-
20
- In addition to that, `tj` uses the [OS gem](https://github.com/rdp/os) to sniff out your OS and adjusts a few things accordingly. Windows users won't see any fancy select menus or anything like that to avoid crashing (since Windows doesn't support `stty`, which is what is used).
21
-
22
- _I don't regularly develop on Windows, so if you encounter any bugs, please let me know through a **well-documented** issue and I'll try my best to get it resolved._
23
-
24
- ## Config
25
- Because everybody likes to use different tools, you can create a `Juicefile` or `tj.yaml` config (with an optional preceding `.`) that will house all of your theme-specific commands. This allows you to use a streamlined set of commands that will act as aliases to your per-project configuration, as well as starter-theme specific information, such as deployment configuration, etc. For right now, we'll just stick to the `commands` section.
26
-
27
- If you're into [Grunt](https://github.com/gruntjs/grunt), then use it. Prefer [Guard](https://github.com/guard/guard)? Go right ahead. This is obviously relative to the starter theme you use, since you can't exactly use Grunt with a project that doesn't support it. Below is the config that comes baked into [our starter theme](https://github.com/ezekg/theme-juice-starter):
28
-
29
- ```yml
30
- commands:
31
- install:
32
- - composer install
33
- watch:
34
- - grunt %args%
35
- vendor:
36
- - composer %args%
37
- wp:
38
- - wp ssh --host=vagrant %args%
39
- backup:
40
- - wp ssh --host=vagrant db export backup/$(date +'%Y-%m-%d-%H-%M-%S').sql
41
- dist:
42
- - tar -zcvf dist.tar.gz .
43
- ```
44
-
45
- Each list of commands is run within a single execution, with all `%args%`/`%argN%` being replaced by the passed command; i.e. `cmd1 %args%; cmd2 %arg1% %arg2% %arg3%; cmd3 "%arg4%"`.
46
-
47
- You can specify an unlimited number of commands with an unlimited number of arguments; however, should be careful with how this is used. Don't do something like including `sudo rm -rf %arg1%` in a command, and then passing `/` as an argument. Keep it simple. These are meant to make your life easier by managing build tools, not to do fancy scripting.
48
-
49
- ## Usage
50
-
51
- ### List available commands:
52
- List all commands for `tj`.
53
- ```bash
54
- tj
55
- ```
56
-
57
- ### Print version:
58
- This command will print the current version of `tj`.
59
- ```bash
60
- tj --version # Aliases: -v version
61
- ```
62
-
63
- ### Global flags:
64
- | Flag | Type | Description |
65
- |:---------------------- |:------ |:------------------------------------------ |
66
- | `[--vm-path=PATH]` | Path | Force path to VM |
67
- | `[--vm-ip=IP]` | String | Force IP address for VM |
68
- | `[--vm-prefix=PREFIX]` | String | Force directory prefix for project in VM |
69
- | `[--yolo]` | Bool | Say yes to anything and everything |
70
- | `[--boring]` | Bool | Disable all the coolness |
71
- | `[--no-unicode]` | Bool | Disable all unicode characters |
72
- | `[--no-colors]` | Bool | Disable all colored output |
73
- | `[--no-animations]` | Bool | Disable all animations |
74
- | `[--no-landrush]` | Bool | Disable landrush for DNS |
75
- | `[--verbose]` | Bool | Verbose output |
76
- | `[--dryrun]` | Bool | Disable running all commands |
77
-
78
- _Use `ENV` variables to set global flags. For example, by running `export TJ_VM_PATH=~/vagrant-vvv`, the `ENV` variable will be used instead of the default `vm-path` from then on. You can remove global flags with `unset TJ_VM_PATH`_
79
-
80
- ### Creating a new development project:
81
- Use this to create a new project. It will automagically set up your VM, including a local development site at `http://<url>.dev` with WordPress installed and a fresh WP database. It will sync up your local site installation with the Vagrant VM, so you can organize your projects however you want. This task will also install VVV into your `vm-path` directory if it has not already been installed.
82
- ```bash
83
- tj create # Aliases: mk make new add
84
- ```
85
-
86
- #### Option flags:
87
- | Flag | Type | Description |
88
- |:----------------------------------- |:------ |:------------------------------------------------ |
89
- | `[-n, --name=NAME]` | String | Name of the project |
90
- | `[-l, --location=LOCATION]` | Path | Location of the local project |
91
- | `[-t, --theme=THEME]` | URL | Starter theme to install |
92
- | `[-u, --url=URL]` | URL | Development URL for the project |
93
- | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
94
- | `[-i, --import-db=DB]` | Path | Import an existing database |
95
- | `[--bare]` | Bool | Create a project without a starter theme |
96
- | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
97
- | `[--skip-db]` | Bool | Skip database prompts and use default settings |
98
- | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
99
- | `[--no-wp]` | Bool | New project is not a WordPress install |
100
- | `[--no-db]` | Bool | New project does not need a database |
101
-
102
- ### Setting up an existing project:
103
- Use this to setup an existing local project within the development environment. You will go through the setup process to create the necessary files for the VM, including `vvv-hosts`, `vvv-nginx.conf`, DNS settings, and a fresh database (unless one already exists by the name chosen). This is essentially an alias for `create`, but with a few options being skipped.
104
- ```bash
105
- tj setup # Aliases: up prep init
106
- ```
107
-
108
- #### Option flags:
109
- | Flag | Type | Description |
110
- |:----------------------------------- |:------ |:------------------------------------------------ |
111
- | `[-n, --name=NAME]` | String | Name of the project |
112
- | `[-l, --location=LOCATION]` | Path | Location of the local project |
113
- | `[-u, --url=URL]` | URL | Development URL for the project |
114
- | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
115
- | `[-i, --import-db=DB]` | Path | Import an existing database |
116
- | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
117
- | `[--skip-db]` | Bool | Skip database prompts and use default settings |
118
- | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
119
- | `[--no-wp]` | Bool | New project is not a WordPress install |
120
- | `[--no-db]` | Bool | New project does not need a database |
121
-
122
- ### Deleting a project from the VM:
123
- Use this to remove a project from your development environment. This will only remove files that were generated by `tj`. including the database setup, development url, and shared directories. _It will not touch your local folders that were synced to the VM._
124
- ```bash
125
- tj delete # Aliases: rm remove trash teardown
126
- ```
127
-
128
- #### Option flags:
129
- | Flag | Type | Description |
130
- |:------------------- |:------ |:------------------------------- |
131
- | `[-n, --name=NAME]` | String | Name of the project |
132
- | `[-u, --url=URL]` | URL | Development URL for the project |
133
- | `[--db-drop]` | Bool | Drop project's database |
134
- | `[--vm-restart]` | Bool | Restart VM after deletion |
135
-
136
- ### Managing deployment and migration (coming soon):
137
- Use this to easily manage your deployment and migration with [Capistrano](https://github.com/capistrano/capistrano) or whatever command is in your config. This is just a wrapper for your chosen command.
138
- ```bash
139
- tj deploy # Aliases: deployer server remote
140
- ```
141
-
142
- ### Listing all `tj` projects in the VM:
143
- Use this to list all projects within your VM that were generated by `tj`.
144
- ```bash
145
- tj list # Aliases: ls projects apps sites
146
- ```
147
-
148
- ### Managing development environment:
149
- Use this to easily manage your [Varying Vagrant Vagrants](https://github.com/Varying-Vagrant-Vagrants/VVV) VM. This is a wrapper for Vagrant commands executed within your VM path.
150
- ```bash
151
- tj vm # Aliases: vagrant vvv
152
- ```
153
-
154
- ### Running installation for project:
155
- Uses `install` command within your config.
156
- ```bash
157
- tj install
158
- ```
159
-
160
- ### Watching and compiling assets:
161
- Use this to watch and compile assets with your preferred build tool, whether that be [Grunt](https://github.com/gruntjs/grunt), [Gulp](https://github.com/gulpjs/gulp), [Guard](https://github.com/guard/guard), or whatever. This is simply a wrapper for whatever command is in your config file.
162
- ```bash
163
- tj watch # Aliases: assets dev build
164
- ```
165
-
166
- ### Managing vendor dependencies:
167
- Use this to easily manage your dependencies with [Composer](https://github.com/composer/composer), or whatever command you set within your config.
168
- ```bash
169
- tj vendor # Aliases: dependencies deps
170
- ```
171
-
172
- ### Locally executing WP-CLI inside your VM:
173
- Upon setup, an `ssh` block for the VM is automatically added to the `wp-cli.local.yml` file with all of your VM paths. In our starter theme, we use [wp-cli-ssh](https://github.com/xwp/wp-cli-ssh) to run `wp` commands locally.
174
- In order to do the same, it needs to be a dependency in your `composer.json`.
175
- ```bash
176
- tj wp # Aliases: wordpress
177
- ```
178
-
179
- ### Backing up your database:
180
- Uses `backup` command within your config.
181
- ```bash
182
- tj backup # Aliases: bk
183
- ```
184
-
185
- ### Distributing a package of your project:
186
- Uses `dist` command within your config.
187
- ```bash
188
- tj dist # Aliases: distrubute pack package
189
- ```
190
-
191
- ### Running your test suite:
192
- Uses `test` command within your config.
193
- ```bash
194
- tj test # Aliases: tests spec specs
195
- ```
196
-
197
- ## Contributing
198
-
199
- 1. First, create an [issue](https://github.com/ezekg/theme-juice-cli/issues) for your proposed feature. If it's a bug fix, go right to step 2.
200
- 1. [Fork the repository](https://github.com/ezekg/theme-juice-cli/fork).
201
- 1. Create a new feature branch. (`git checkout -b my-new-feature`)
202
- 1. Commit your changes. (`git commit -am 'add some feature'`)
203
- 1. Push to the new branch. (`git push origin my-new-feature`)
204
- 1. Create a new Pull Request.
1
+ # Theme Juice [![Gem Version](http://img.shields.io/gem/v/theme-juice.svg)](https://rubygems.org/gems/theme-juice)
2
+ What is it? Theme Juice is a WordPress development command line utility that allows you to scaffold out entire Vagrant development environments in seconds (using [VVV](https://github.com/Varying-Vagrant-Vagrants/VVV) as the VM), manage dependencies and build tools, and even handle deployments.
3
+
4
+ ## Installation
5
+ * First, install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) for local development.
6
+ * Then, install [Composer](https://getcomposer.org/) and [WP-CLI](http://wp-cli.org/), and make sure they're executable.
7
+ * Finally, install with: `gem install theme-juice`
8
+ That`s it!
9
+
10
+ ## Windows users
11
+ Since Windows doesn't support UTF-8 characters inside of the terminal, and is picky about colors, you'll have to run `tj` with a couple flags. What has worked for me on my Windows machine at home is to run all commands through [git-scm](http://git-scm.com/downloads) with the `--boring --no-landrush` flags.
12
+
13
+ This disables all unicode characters and colors from being output, and disables [Landrush](https://github.com/phinze/landrush), which isn't supported fully on Windows. To set these globally via the `ENV`, run:
14
+
15
+ ```bash
16
+ export TJ_BORING=true
17
+ export TJ_NO_LANDRUSH=true
18
+ ```
19
+
20
+ In addition to that, `tj` uses the [OS gem](https://github.com/rdp/os) to sniff out your OS and adjusts a few things accordingly. Windows users won't see any fancy select menus or anything like that to avoid crashing (since Windows doesn't support `stty`, which is what is used).
21
+
22
+ _I don't regularly develop on Windows, so if you encounter any bugs, please let me know through a **well-documented** issue and I'll try my best to get it resolved._
23
+
24
+ ## Config
25
+ Because everybody likes to use different tools, you can create a `Juicefile` or `tj.yaml` config (with an optional preceding `.`) that will house all of your theme-specific commands. This allows you to use a streamlined set of commands that will act as aliases to your per-project configuration, as well as starter-theme specific information, such as deployment configuration, etc. For right now, we'll just stick to the `commands` section.
26
+
27
+ If you're into [Grunt](https://github.com/gruntjs/grunt), then use it. Prefer [Guard](https://github.com/guard/guard)? Go right ahead. This is obviously relative to the starter theme you use, since you can't exactly use Grunt with a project that doesn't support it. Below is the config that comes baked into [our starter theme](https://github.com/ezekg/theme-juice-starter):
28
+
29
+ ```yml
30
+ commands:
31
+ install:
32
+ - composer install
33
+ watch:
34
+ - grunt %args%
35
+ vendor:
36
+ - composer %args%
37
+ wp:
38
+ - wp ssh --host=vagrant %args%
39
+ backup:
40
+ - wp ssh --host=vagrant db export backup/$(date +'%Y-%m-%d-%H-%M-%S').sql
41
+ dist:
42
+ - tar -zcvf dist.tar.gz .
43
+ ```
44
+
45
+ Each list of commands is run within a single execution, with all `%args%`/`%argN%` being replaced by the passed command; i.e. `cmd1 %args%; cmd2 %arg1% %arg2% %arg3%; cmd3 "%arg4%"`.
46
+
47
+ You can specify an unlimited number of commands with an unlimited number of arguments; however, should be careful with how this is used. Don't do something like including `sudo rm -rf %arg1%` in a command, and then passing `/` as an argument. Keep it simple. These are meant to make your life easier by managing build tools, not to do fancy scripting.
48
+
49
+ ## Usage
50
+
51
+ ### List available commands:
52
+ List all commands for `tj`.
53
+ ```bash
54
+ tj
55
+ ```
56
+
57
+ ### Print version:
58
+ This command will print the current version of `tj`.
59
+ ```bash
60
+ tj --version # Aliases: -v version
61
+ ```
62
+
63
+ ### Global flags:
64
+ | Flag | Type | Description |
65
+ |:---------------------- |:------ |:------------------------------------------ |
66
+ | `[--vm-path=PATH]` | Path | Force path to VM |
67
+ | `[--vm-ip=IP]` | String | Force IP address for VM |
68
+ | `[--vm-prefix=PREFIX]` | String | Force directory prefix for project in VM |
69
+ | `[--yolo]` | Bool | Say yes to anything and everything |
70
+ | `[--boring]` | Bool | Disable all the coolness |
71
+ | `[--no-unicode]` | Bool | Disable all unicode characters |
72
+ | `[--no-colors]` | Bool | Disable all colored output |
73
+ | `[--no-animations]` | Bool | Disable all animations |
74
+ | `[--no-landrush]` | Bool | Disable landrush for DNS |
75
+ | `[--verbose]` | Bool | Verbose output |
76
+ | `[--dryrun]` | Bool | Disable running all commands |
77
+
78
+ _Use `ENV` variables to set global flags. For example, by running `export TJ_VM_PATH=~/vagrant-vvv`, the `ENV` variable will be used instead of the default `vm-path` from then on. You can remove global flags with `unset TJ_VM_PATH`_
79
+
80
+ ### Creating a new development project:
81
+ Use this to create a new project. It will automagically set up your VM, including a local development site at `http://<url>.dev` with WordPress installed and a fresh WP database. It will sync up your local site installation with the Vagrant VM, so you can organize your projects however you want. This task will also install VVV into your `vm-path` directory if it has not already been installed.
82
+ ```bash
83
+ tj create # Aliases: mk make new add
84
+ ```
85
+
86
+ #### Option flags:
87
+ | Flag | Type | Description |
88
+ |:----------------------------------- |:------ |:------------------------------------------------ |
89
+ | `[-n, --name=NAME]` | String | Name of the project |
90
+ | `[-l, --location=LOCATION]` | Path | Location of the local project |
91
+ | `[-t, --theme=THEME]` | URL | Starter theme to install |
92
+ | `[-u, --url=URL]` | URL | Development URL for the project |
93
+ | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
94
+ | `[-i, --import-db=DB]` | Path | Import an existing database |
95
+ | `[--bare]` | Bool | Create a project without a starter theme |
96
+ | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
97
+ | `[--skip-db]` | Bool | Skip database prompts and use default settings |
98
+ | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
99
+ | `[--no-wp]` | Bool | New project is not a WordPress install |
100
+ | `[--no-db]` | Bool | New project does not need a database |
101
+
102
+ ### Setting up an existing project:
103
+ Use this to setup an existing local project within the development environment. You will go through the setup process to create the necessary files for the VM, including `vvv-hosts`, `vvv-nginx.conf`, DNS settings, and a fresh database (unless one already exists by the name chosen). This is essentially an alias for `create`, but with a few options being skipped.
104
+ ```bash
105
+ tj setup # Aliases: up prep init
106
+ ```
107
+
108
+ #### Option flags:
109
+ | Flag | Type | Description |
110
+ |:----------------------------------- |:------ |:------------------------------------------------ |
111
+ | `[-n, --name=NAME]` | String | Name of the project |
112
+ | `[-l, --location=LOCATION]` | Path | Location of the local project |
113
+ | `[-u, --url=URL]` | URL | Development URL for the project |
114
+ | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
115
+ | `[-i, --import-db=DB]` | Path | Import an existing database |
116
+ | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
117
+ | `[--skip-db]` | Bool | Skip database prompts and use default settings |
118
+ | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
119
+ | `[--no-wp]` | Bool | New project is not a WordPress install |
120
+ | `[--no-db]` | Bool | New project does not need a database |
121
+
122
+ ### Deleting a project from the VM:
123
+ Use this to remove a project from your development environment. This will only remove files that were generated by `tj`. including the database setup, development url, and shared directories. _It will not touch your local folders that were synced to the VM._
124
+ ```bash
125
+ tj delete # Aliases: rm remove trash teardown
126
+ ```
127
+
128
+ #### Option flags:
129
+ | Flag | Type | Description |
130
+ |:------------------- |:------ |:------------------------------- |
131
+ | `[-n, --name=NAME]` | String | Name of the project |
132
+ | `[-u, --url=URL]` | URL | Development URL for the project |
133
+ | `[--db-drop]` | Bool | Drop project's database |
134
+ | `[--vm-restart]` | Bool | Restart VM after deletion |
135
+
136
+ ### Managing deployment and migration (coming soon):
137
+ Use this to easily manage your deployment and migration with [Capistrano](https://github.com/capistrano/capistrano) or whatever command is in your config. This is just a wrapper for your chosen command.
138
+ ```bash
139
+ tj deploy # Aliases: deployer server remote
140
+ ```
141
+
142
+ ### Listing all `tj` projects in the VM:
143
+ Use this to list all projects within your VM that were generated by `tj`.
144
+ ```bash
145
+ tj list # Aliases: ls projects apps sites
146
+ ```
147
+
148
+ ### Managing development environment:
149
+ Use this to easily manage your [Varying Vagrant Vagrants](https://github.com/Varying-Vagrant-Vagrants/VVV) VM. This is a wrapper for Vagrant commands executed within your VM path.
150
+ ```bash
151
+ tj vm # Aliases: vagrant vvv
152
+ ```
153
+
154
+ ### Running installation for project:
155
+ Uses `install` command within your config.
156
+ ```bash
157
+ tj install
158
+ ```
159
+
160
+ ### Watching and compiling assets:
161
+ Use this to watch and compile assets with your preferred build tool, whether that be [Grunt](https://github.com/gruntjs/grunt), [Gulp](https://github.com/gulpjs/gulp), [Guard](https://github.com/guard/guard), or whatever. This is simply a wrapper for whatever command is in your config file.
162
+ ```bash
163
+ tj watch # Aliases: assets dev build
164
+ ```
165
+
166
+ ### Managing vendor dependencies:
167
+ Use this to easily manage your dependencies with [Composer](https://github.com/composer/composer), or whatever command you set within your config.
168
+ ```bash
169
+ tj vendor # Aliases: dependencies deps
170
+ ```
171
+
172
+ ### Locally executing WP-CLI inside your VM:
173
+ Upon setup, an `ssh` block for the VM is automatically added to the `wp-cli.local.yml` file with all of your VM paths. In our starter theme, we use [wp-cli-ssh](https://github.com/xwp/wp-cli-ssh) to run `wp` commands locally.
174
+ In order to do the same, it needs to be a dependency in your `composer.json`.
175
+ ```bash
176
+ tj wp # Aliases: wordpress
177
+ ```
178
+
179
+ ### Backing up your database:
180
+ Uses `backup` command within your config.
181
+ ```bash
182
+ tj backup # Aliases: bk
183
+ ```
184
+
185
+ ### Distributing a package of your project:
186
+ Uses `dist` command within your config.
187
+ ```bash
188
+ tj dist # Aliases: distrubute pack package
189
+ ```
190
+
191
+ ### Running your test suite:
192
+ Uses `test` command within your config.
193
+ ```bash
194
+ tj test # Aliases: tests spec specs
195
+ ```
196
+
197
+ ## Contributing
198
+
199
+ 1. First, create an [issue](https://github.com/ezekg/theme-juice-cli/issues) for your proposed feature. If it's a bug fix, go right to step 2.
200
+ 1. [Fork the repository](https://github.com/ezekg/theme-juice-cli/fork).
201
+ 1. Create a new feature branch. (`git checkout -b my-new-feature`)
202
+ 1. Commit your changes. (`git commit -am 'add some feature'`)
203
+ 1. Push to the new branch. (`git push origin my-new-feature`)
204
+ 1. Create a new Pull Request.
data/bin/tj CHANGED
@@ -1,15 +1,15 @@
1
- #!/usr/bin/env ruby
2
- # encoding: UTF-8
3
-
4
- begin
5
- require_relative "../lib/theme-juice"
6
- rescue LoadError => err
7
- warn err
8
- exit 1
9
- end
10
-
11
- Signal.trap "INT" do
12
- ThemeJuice::IO.goodbye
13
- end
14
-
15
- ThemeJuice::CLI.start
1
+ #!/usr/bin/env ruby
2
+ # encoding: UTF-8
3
+
4
+ begin
5
+ require_relative "../lib/theme-juice"
6
+ rescue LoadError => err
7
+ warn err
8
+ exit 1
9
+ end
10
+
11
+ Signal.trap "INT" do
12
+ ThemeJuice::IO.goodbye
13
+ end
14
+
15
+ ThemeJuice::CLI.start