Skip to content

Commit

Permalink
Refactoring with inc2734/mimizuku-core
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Aug 14, 2017
1 parent 8afc8e2 commit 4094b59
Show file tree
Hide file tree
Showing 48 changed files with 110 additions and 529 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ install:
- npm rebuild node-sass
- composer install
before_script:
- bash core/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- # yarn run gulp build # Because Mimizuku builded after composer install
- ls -la resources/style.css resources/index.php vendor/autoload.php
- composer test
- bash core/bin/create-release-branch.sh
- bash bin/create-release-branch.sh
after_success:
- pwd
- ls -al
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Mimizuku is a WordPress starter theme or theme framework for child themes development.

<img src="https://cdn.rawgit.com/inc2734/mimizuku/develop/core/mimizuku.svg" alt="Mimizuku" width="96px">
<img src="https://cdn.rawgit.com/inc2734/mimizuku/develop/mimizuku.svg" alt="Mimizuku" width="96px">

* GitHub: https://github.com/inc2734/mimizuku/
* Packagist: https://packagist.org/packages/inc2734/mimizuku
Expand Down Expand Up @@ -85,16 +85,15 @@ themes/mimizuku

### Template hierarchical
#### Layout templates
1. /core/templates/\*\*/\*.php
1. /vendor/inc2734/mimizuku-core/src/view/templates/\*\*/\*.php
2. /resources/templates/\*\*/\*.php

#### Custo page templates
1. /core/page-templates/\*.php
2. /resources/page-templates/\*.php
3. /page-templats/\*.php
1. /resources/page-templates/\*.php
2. /page-templats/\*.php

#### Base templates
1. /core/\*.php
1. /vendor/inc2734/mimizuku-core/src/view/\*.php
2. /resources/\*.php
3. /\*.php

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions core/bin/scaffold-tests.sh → bin/scaffold-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ else
exit 1;
fi

phar extract -f $(which wp) "$themedir/core/bin/wp.phar">/dev/null 2>&1
wpclidir="$themedir/core/bin/wp.phar$(which wp)"
phar extract -f $(which wp) "$themedir/bin/wp.phar">/dev/null 2>&1
wpclidir="$themedir/bin/wp.phar$(which wp)"

if [ ! -e "$themedir/core/bin" ]; then
echo "$themedir/core/bin is not exsists."
if [ ! -e "$themedir/bin" ]; then
echo "$themedir/bin is not exsists."
exit 1;
fi

cp -f "$wpclidir/templates/install-wp-tests.sh" "$themedir/core/bin/install-wp-tests.sh"
cp -f "$wpclidir/templates/install-wp-tests.sh" "$themedir/bin/install-wp-tests.sh"

cp -f "$wpclidir/templates/phpunit.xml.dist" "$themedir/phpunit.xml"

Expand All @@ -51,5 +51,5 @@ else
echo "$themedir/tests/test-sample.php is alerady exsists."
fi

rm -rf "$themedir/core/bin/wp.phar"
rm -rf "$themedir/bin/wp.phar"
echo "done!"
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions core/bin/wpphpunit.sh → bin/wpphpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi

cd ${themedir}

if [ -e ${themedir}/core/bin/install-wp-tests.sh ]; then
if [ -e ${themedir}/bin/install-wp-tests.sh ]; then
echo 'DROP DATABASE IF EXISTS wordpress_test;' | mysql -u root

if [ -e /tmp/wordpress ]; then
Expand All @@ -22,8 +22,8 @@ if [ -e ${themedir}/core/bin/install-wp-tests.sh ]; then
rm -fr /tmp/wordpress-tests-lib
fi

bash "${themedir}/core/bin/install-wp-tests.sh" wordpress_test root '' localhost latest;
bash "${themedir}/bin/install-wp-tests.sh" wordpress_test root '' localhost latest;
vendor/bin/phpunit --configuration= ${themedir}/phpunit.xml
else
echo "${themedir}/core/bin/install-wp-tests.sh not found."
echo "${themedir}/bin/install-wp-tests.sh not found."
fi;
34 changes: 12 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Mimizuku is a WordPress starter theme or theme framework for child themes development.",
"type": "wordpress-theme",
"license": "GPL-2.0+",
"version": "4.0.0",
"version": "4.0.1",
"authors": [
{
"name": "Takashi Kitajima",
Expand All @@ -19,6 +19,10 @@
"doctrine/instantiator": "1.0.4",
"phpunit/php-token-stream": "1.4.11"
},
"require": {
"php": ">=5.6",
"inc2734/mimizuku-core": "^0.1.0"
},
"config": {
"process-timeout": 0
},
Expand All @@ -27,14 +31,14 @@
"vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"vendor/bin/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php",
"vendor/bin/phpmd ./ text phpmd.ruleset.xml --suffixes php --exclude /vendor/,/tests/",
"bash core/bin/phpunit.sh"
"bash bin/phpunit.sh"
],
"server": "bash core/bin/server.sh",
"scaffold-tests": "bash core/bin/scaffold-tests.sh",
"theme-unit-test": "bash core/bin/theme-unit-test.sh",
"theme-unit-test-ja": "bash core/bin/theme-unit-test-ja.sh",
"wpphpunit": "bash core/bin/wpphpunit.sh",
"phpunit": "bash core/bin/phpunit.sh",
"server": "bash bin/server.sh",
"scaffold-tests": "bash bin/scaffold-tests.sh",
"theme-unit-test": "bash bin/theme-unit-test.sh",
"theme-unit-test-ja": "bash bin/theme-unit-test-ja.sh",
"wpphpunit": "bash bin/wpphpunit.sh",
"phpunit": "bash bin/phpunit.sh",
"post-install-cmd": [
"cd vendor/inc2734/wp-basis && yarn install && yarn upgrade && cd ../../../ && yarn run gulp build"
],
Expand All @@ -46,19 +50,5 @@
"psr-4": {
"Mimizuku\\": ""
}
},
"require": {
"php": ">=5.6",
"inc2734/wp-breadcrumbs": "~0.3.1",
"inc2734/wp-oembed-blog-card": "~0.2.4",
"inc2734/wp-view-controller": "~2.1.2",
"inc2734/wp-basis": "~0.4.1",
"inc2734/wp-customizer-framework": "~2.0.4",
"inc2734/wp-github-theme-updater": "~0.1.0",
"inc2734/wp-share-buttons": "~0.5.0",
"inc2734/wp-seo": "~0.3.1",
"inc2734/wp-like-me-box": "~0.1.0",
"inc2734/wp-pure-css-gallery": "~0.1.0",
"inc2734/wp-awesome-widgets": "~0.2.0"
}
}
54 changes: 52 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions core/404.php

This file was deleted.

82 changes: 0 additions & 82 deletions core/app/bootstrap.php

This file was deleted.

26 changes: 0 additions & 26 deletions core/app/controller/controller.php

This file was deleted.

18 changes: 0 additions & 18 deletions core/app/setup/front-page.php

This file was deleted.

22 changes: 0 additions & 22 deletions core/app/setup/head.php

This file was deleted.

Loading

0 comments on commit 4094b59

Please sign in to comment.