Skip to content

Commit 5bcc208

Browse files
committed
site create sub-command
1 parent ee0d059 commit 5bcc208

9 files changed

+607
-0
lines changed

.distignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.DS_Store
2+
.git
3+
.gitignore
4+
.gitlab-ci.yml
5+
.editorconfig
6+
.travis.yml
7+
behat.yml
8+
circle.yml
9+
bin/
10+
features/
11+
utils/
12+
*.zip
13+
*.tar.gz
14+
*.swp
15+
*.txt
16+
*.log

.editorconfig

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
# WordPress Coding Standards
5+
# https://make.wordpress.org/core/handbook/coding-standards/
6+
7+
root = true
8+
9+
[*]
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
indent_style = tab
15+
16+
[{.jshintrc,*.json,*.yml,*.feature}]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[{*.txt,wp-config-sample.php}]
21+
end_of_line = crlf
22+
23+
[composer.json]
24+
indent_style = space
25+
indent_size = 4

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
wp-cli.local.yml
3+
node_modules/
4+
vendor/
5+
*.zip
6+
*.tar.gz
7+
*.swp
8+
*.txt
9+
*.log
10+
composer.lock
11+
.idea
12+
*.db

.travis.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
sudo: false
2+
dist: trusty
3+
4+
language: php
5+
6+
notifications:
7+
email:
8+
on_success: never
9+
on_failure: change
10+
11+
branches:
12+
only:
13+
- master
14+
15+
cache:
16+
directories:
17+
- $HOME/.composer/cache
18+
19+
env:
20+
global:
21+
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
22+
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"
23+
24+
matrix:
25+
include:
26+
- php: 7.2
27+
env: WP_VERSION=latest
28+
- php: 7.1
29+
env: WP_VERSION=latest
30+
- php: 7.0
31+
env: WP_VERSION=latest
32+
- php: 5.6
33+
env: WP_VERSION=latest
34+
- php: 5.6
35+
env: WP_VERSION=3.7.11
36+
- php: 5.6
37+
env: WP_VERSION=trunk
38+
- php: 5.3
39+
dist: precise
40+
env: WP_VERSION=latest
41+
42+
before_install:
43+
- |
44+
# Remove Xdebug for a huge performance increase:
45+
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
46+
phpenv config-rm xdebug.ini
47+
else
48+
echo "xdebug.ini does not exist"
49+
fi
50+
51+
install:
52+
- composer require wp-cli/wp-cli:dev-master
53+
- composer install
54+
- bash bin/install-package-tests.sh
55+
56+
before_script:
57+
- composer validate
58+
59+
script:
60+
- bash bin/test.sh

CONTRIBUTING.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Contributing
2+
============
3+
4+
We appreciate you taking the initiative to contribute to this project.
5+
6+
Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.
7+
8+
For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

composer.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "ee/site-command",
3+
"description": "",
4+
"type": "wp-cli-package",
5+
"homepage": "https://github.com/ee/site",
6+
"license": "MIT",
7+
"authors": [],
8+
"minimum-stability": "dev",
9+
"prefer-stable": true,
10+
"autoload": {
11+
"psr-4": {
12+
"": "src/"
13+
},
14+
"files": [ "site-command.php" ]
15+
},
16+
"extra": {
17+
"branch-alias": {
18+
"dev-master": "1.x-dev"
19+
},
20+
"bundled": true,
21+
"commands": [
22+
"site",
23+
"site create"
24+
]
25+
}
26+
}

site-command.php

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
if ( ! class_exists( 'EE' ) ) {
4+
return;
5+
}
6+
7+
$autoload = dirname( __FILE__ ) . '/vendor/autoload.php';
8+
if ( file_exists( $autoload ) ) {
9+
require_once $autoload;
10+
}
11+
12+
EE::add_command( 'site', 'Site_Command' );

0 commit comments

Comments
 (0)