Skip to content

Commit

Permalink
Merge 527c253 into e9b1839
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Dec 9, 2018
2 parents e9b1839 + 527c253 commit f519b3b
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .distignore
@@ -1,3 +1,4 @@
.*
/tests
/vendor
/node_modules
Expand All @@ -11,4 +12,5 @@ phpcs.xml
phpunit.xml
readme.md
readme.txt.md
.*
Vagrantfile
Homestead.yaml
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
/dist
/node_modules
/vendor
/.vagrant
/composer.lock
/package-lock.json
.DS_Store
21 changes: 21 additions & 0 deletions Homestead.yaml
@@ -0,0 +1,21 @@
provider: virtualbox
name: widgetcontext
hostname: widgetcontext

folders:
- map: vendor/wordpress/wordpress
to: /home/vagrant/code

- map: ./
to: /home/vagrant/code/wp-content/plugins/widget-context

variables:
- key: WP_CLI_CONFIG_PATH
value: /home/vagrant/code/wp-content/plugins/widget-context/wp-cli.yaml

sites:
- map: widgetcontext.local
to: /home/vagrant/code

databases:
- homestead
23 changes: 23 additions & 0 deletions Vagrantfile
@@ -0,0 +1,23 @@
require 'yaml'

confDir = File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__))
homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__))

require File.expand_path(confDir + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.9.0'

Vagrant.configure("2") do |config|
settings = YAML::load(File.read(homesteadYamlPath))

Homestead.configure(config, settings)

# Download and setup our WP site; wp-cli provided out of the box.
config.vm.provision "shell",
inline: "wp config create",
privileged: false

if defined? VagrantPlugins::HostsUpdater
config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] }
end
end
17 changes: 16 additions & 1 deletion composer.json
Expand Up @@ -14,10 +14,25 @@
"issues": "https://github.com/kasparsd/widget-context-wporg/issues",
"source": "https://github.com/kasparsd/widget-context-wporg"
},
"repositories": [
{
"type": "package",
"package": {
"name": "wordpress/wordpress",
"version": "5.0",
"dist": {
"url": "https://wordpress.org/wordpress-5.0.zip",
"type": "zip"
}
}
}
],
"require-dev": {
"wp-coding-standards/wpcs": "^1.2.0",
"phpunit/phpunit": "^5",
"php-coveralls/php-coveralls": "^2.1.0"
"php-coveralls/php-coveralls": "^2.1.0",
"laravel/homestead": "^7.19",
"wordpress/wordpress": "^5.0"
},
"autoload": {
"classmap": [
Expand Down
6 changes: 6 additions & 0 deletions wp-cli.yaml
@@ -0,0 +1,6 @@
path: /home/vagrant/code

config create:
dbname: homestead
dbuser: homestead
dbpass: secret

0 comments on commit f519b3b

Please sign in to comment.