theme-juice 0.7.8 → 0.7.9

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 +216 -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 +220 -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 -68
  11. data/lib/theme-juice/env.rb +25 -25
  12. data/lib/theme-juice/io.rb +295 -323
  13. data/lib/theme-juice/project.rb +35 -35
  14. data/lib/theme-juice/task.rb +43 -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 +63 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d82fa50ae168844be84fa86474178772f9e86fd4
4
- data.tar.gz: 1569d739cc51d4d40530c2f093c45fc119b89eb6
3
+ metadata.gz: 2dfb465928f5868b5f314eb9c6a861f5e71435f4
4
+ data.tar.gz: 69874779d8171b5d712ab88d1556fd8057e6bf31
5
5
  SHA512:
6
- metadata.gz: 55df4443c035be1a18d48ad012e7c13708d8168c877807f3740891dda762f253a59b6ab8962ce492889ace3e15228565886085e8cc7f0889a3551869f47dd236
7
- data.tar.gz: aec5503bbe763b7153523ac0f0f8876102e63fdc68763f6fe57e81bf20081aa58fcb9fc0bd6440d2ae4d7170d8b589b8fa6e8b24633d31ce6dabd09e7d6080fb
6
+ metadata.gz: 10523762f64caff5d7570acdf2d47b98bff9040fe0e83e58e1708d6bf738cd90a3ed2991aa24a4c22e24f5123eb015c6cda11c32c4b1932f7f06521013c5ea72
7
+ data.tar.gz: 752870d0c524c7479deb21129fa239724115a3c0248f727387b9b37b6a21bd347402495800d80856a7cd57915e40388c767496f54ddbc7421e5d4673de036b06
data/README.md CHANGED
@@ -1,204 +1,216 @@
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
2
+ [![Gem Version](http://img.shields.io/gem/v/theme-juice.svg)](https://rubygems.org/gems/theme-juice)
3
+ [![Travis](https://img.shields.io/travis/ezekg/theme-juice-cli.svg?style=flat-square)]()
4
+ [![Code Climate](https://img.shields.io/codeclimate/github/ezekg/theme-juice-cli.svg?style=flat-square)]()
5
+ [![Code Climate](https://img.shields.io/codeclimate/coverage/github/ezekg/theme-juice-cli.svg?style=flat-square)]()
6
+ [![GitHub license](https://img.shields.io/github/license/ezekg/theme-juice-cli.svg?style=flat-square)](https://github.com/ezekg/theme-juice-cli/blob/master/LICENSE)
7
+
8
+ 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.
9
+
10
+ ## Installation
11
+ * First, install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) for local development.
12
+ * Then, install [Composer](https://getcomposer.org/) and [WP-CLI](http://wp-cli.org/), and make sure they're executable.
13
+ * Finally, install with: `gem install theme-juice`
14
+ That`s it!
15
+
16
+ ## Windows users
17
+ 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.
18
+
19
+ This disables all unicode characters and colors from being output, and disables [Landrush](https://github.com/phinze/landrush), which isn't fully supported on Windows. To set these globally via the `ENV`, run:
20
+
21
+ ```bash
22
+ export TJ_BORING=true
23
+ export TJ_NO_LANDRUSH=true
24
+ ```
25
+
26
+ 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 to make sure things don't break. _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._
27
+
28
+ ## Config
29
+ 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.
30
+
31
+ 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):
32
+
33
+ ```yml
34
+ commands:
35
+ install:
36
+ - composer install
37
+ watch:
38
+ - grunt %args%
39
+ vendor:
40
+ - composer %args%
41
+ wp:
42
+ - wp ssh --host=vagrant %args%
43
+ backup:
44
+ - wp ssh --host=vagrant db export backup/$(date +'%Y-%m-%d-%H-%M-%S').sql
45
+ dist:
46
+ - tar -zcvf dist.tar.gz .
47
+ ```
48
+
49
+ Each list of commands is run within a single execution, with all `%args%`/`%argN%` being replaced by the passed command. Here's a few example scenarios:
50
+ ```bash
51
+ # Will contain all arguments stitched together by a space
52
+ cmd1 %args%
53
+ # Will contain each argument mapped to its respective index
54
+ cmd2 '%arg1% %arg2% %arg3%'
55
+ # Will only map argument 4, while ignoring 1-3
56
+ cmd3 "%arg4%"
57
+ ```
58
+
59
+ 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.
60
+
61
+ ## Usage
62
+
63
+ ### List available commands:
64
+ List all commands for `tj`.
65
+ ```bash
66
+ tj
67
+ ```
68
+
69
+ ### Print version:
70
+ This command will print the current version of `tj`.
71
+ ```bash
72
+ tj --version # Aliases: -v version
73
+ ```
74
+
75
+ ### Global flags:
76
+ | Flag | Type | Description |
77
+ |:---------------------- |:------ |:------------------------------------------ |
78
+ | `[--vm-path=PATH]` | Path | Force path to VM |
79
+ | `[--vm-ip=IP]` | String | Force IP address for VM |
80
+ | `[--vm-prefix=PREFIX]` | String | Force directory prefix for project in VM |
81
+ | `[--yolo]` | Bool | Say yes to anything and everything |
82
+ | `[--boring]` | Bool | Disable all the coolness |
83
+ | `[--no-unicode]` | Bool | Disable all unicode characters |
84
+ | `[--no-colors]` | Bool | Disable all colored output |
85
+ | `[--no-animations]` | Bool | Disable all animations |
86
+ | `[--no-landrush]` | Bool | Disable landrush for DNS |
87
+ | `[--verbose]` | Bool | Verbose output |
88
+ | `[--dryrun]` | Bool | Disable executing any commands |
89
+
90
+ _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`_
91
+
92
+ ### Creating a new development project:
93
+ 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.
94
+ ```bash
95
+ tj create # Aliases: mk make new add
96
+ ```
97
+
98
+ #### Option flags:
99
+ | Flag | Type | Description |
100
+ |:----------------------------------- |:------ |:------------------------------------------------ |
101
+ | `[-n, --name=NAME]` | String | Name of the project |
102
+ | `[-l, --location=LOCATION]` | Path | Location of the local project |
103
+ | `[-t, --theme=THEME]` | URL | Starter theme to install |
104
+ | `[-u, --url=URL]` | URL | Development URL for the project |
105
+ | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
106
+ | `[-i, --import-db=DB]` | Path | Import an existing database |
107
+ | `[--bare]` | Bool | Create a project without a starter theme |
108
+ | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
109
+ | `[--skip-db]` | Bool | Skip database prompts and use default settings |
110
+ | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
111
+ | `[--no-wp]` | Bool | New project is not a WordPress install |
112
+ | `[--no-db]` | Bool | New project does not need a database |
113
+
114
+ ### Setting up an existing project:
115
+ 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.
116
+ ```bash
117
+ tj setup # Aliases: up prep init
118
+ ```
119
+
120
+ #### Option flags:
121
+ | Flag | Type | Description |
122
+ |:----------------------------------- |:------ |:------------------------------------------------ |
123
+ | `[-n, --name=NAME]` | String | Name of the project |
124
+ | `[-l, --location=LOCATION]` | Path | Location of the local project |
125
+ | `[-u, --url=URL]` | URL | Development URL for the project |
126
+ | `[-r, --repository=REPO]` | URL | Initialize a new Git remote repository |
127
+ | `[-i, --import-db=DB]` | Path | Import an existing database |
128
+ | `[--skip-repo]` | Bool | Skip repository prompts and use default settings |
129
+ | `[--skip-db]` | Bool | Skip database prompts and use default settings |
130
+ | `[--use-defaults]` | Bool | Skip all prompts and use default settings |
131
+ | `[--no-wp]` | Bool | New project is not a WordPress install |
132
+ | `[--no-db]` | Bool | New project does not need a database |
133
+
134
+ ### Deleting a project from the VM:
135
+ 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._
136
+ ```bash
137
+ tj delete # Aliases: rm remove trash teardown
138
+ ```
139
+
140
+ #### Option flags:
141
+ | Flag | Type | Description |
142
+ |:------------------- |:------ |:------------------------------- |
143
+ | `[-n, --name=NAME]` | String | Name of the project |
144
+ | `[-u, --url=URL]` | URL | Development URL for the project |
145
+ | `[--db-drop]` | Bool | Drop project's database |
146
+ | `[--vm-restart]` | Bool | Restart VM after deletion |
147
+
148
+ ### Managing deployment and migration (coming soon):
149
+ 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.
150
+ ```bash
151
+ tj deploy # Aliases: deployer server remote
152
+ ```
153
+
154
+ ### Listing all `tj` projects in the VM:
155
+ Use this to list all projects within your VM that were generated by `tj`.
156
+ ```bash
157
+ tj list # Aliases: ls projects apps sites
158
+ ```
159
+
160
+ ### Managing development environment:
161
+ 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.
162
+ ```bash
163
+ tj vm # Aliases: vagrant vvv
164
+ ```
165
+
166
+ ### Running installation for project:
167
+ Uses `install` command within your config.
168
+ ```bash
169
+ tj install
170
+ ```
171
+
172
+ ### Watching and compiling assets:
173
+ 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.
174
+ ```bash
175
+ tj watch # Aliases: assets dev build
176
+ ```
177
+
178
+ ### Managing vendor dependencies:
179
+ Use this to easily manage your dependencies with [Composer](https://github.com/composer/composer), or whatever command you set within your config.
180
+ ```bash
181
+ tj vendor # Aliases: dependencies deps
182
+ ```
183
+
184
+ ### Locally executing WP-CLI inside your VM:
185
+ 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.
186
+ In order to do the same, it needs to be a dependency in your `composer.json`.
187
+ ```bash
188
+ tj wp # Aliases: wordpress
189
+ ```
190
+
191
+ ### Backing up your database:
192
+ Uses `backup` command within your config.
193
+ ```bash
194
+ tj backup # Aliases: bk
195
+ ```
196
+
197
+ ### Distributing a package of your project:
198
+ Uses `dist` command within your config.
199
+ ```bash
200
+ tj dist # Aliases: distrubute pack package
201
+ ```
202
+
203
+ ### Running your test suite:
204
+ Uses `test` command within your config.
205
+ ```bash
206
+ tj test # Aliases: tests spec specs
207
+ ```
208
+
209
+ ## Contributing
210
+
211
+ 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.
212
+ 1. [Fork the repository](https://github.com/ezekg/theme-juice-cli/fork).
213
+ 1. Create a new feature branch. (`git checkout -b my-new-feature`)
214
+ 1. Commit your changes. (`git commit -am 'add some feature'`)
215
+ 1. Push to the new branch. (`git push origin my-new-feature`)
216
+ 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