Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Sep 21, 2017
1 parent aff5100 commit c323bfd
Show file tree
Hide file tree
Showing 27 changed files with 308 additions and 520 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.DS_Store
.sass-cache/
npm-debug.log
/node_modules/
node_modules/
/resources/assets/
/vendor/
packages/
vendor/
*.sql
/bin/*.xml
release/
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
cache:
directories:
- node_modules
- vendor
- resources/vendor
- "$HOME/.composer/cache"
before_install:
- openssl aes-256-cbc -K $encrypted_73c066875ca0_key -iv $encrypted_73c066875ca0_iv -in .travis/github_deploy_key.enc -out .travis/github_deploy_key -d
Expand All @@ -34,7 +34,7 @@ before_script:
- 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
- ls -la resources/style.css resources/index.php resources/vendor/autoload.php
- composer test
- bash bin/create-release-branch.sh
after_success:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ themes/mimizuku
│ │ ├─ view # View templates
│ │ ├─ static # Static view templates
│ │ └─ widget # Templates for WP Awesome Widgets
│ ├─ vendor # Composer packages
│ ├─ style.css # Theme meta information
│ ├─ index.php
│ ├─ functions.php
Expand All @@ -75,15 +76,15 @@ themes/mimizuku

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

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

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

Expand Down
10 changes: 5 additions & 5 deletions bin/create-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [[ "master" != "$TRAVIS_BRANCH" ]]; then
exit
fi

if [[ "7" != "$TRAVIS_PHP_VERSION" ]]; then
if [[ "7.1" != "$TRAVIS_PHP_VERSION" ]]; then
echo "deploy only PHP 7"
exit
fi
Expand All @@ -22,13 +22,13 @@ cd release
ls | xargs rm -rf
ls -la
cd ../
rm -rf node_modules
yarn install
yarn run gulp release
rm -rf vendor
composer install --no-dev
cp -r resources/. release/
cd release
ls -la
yarn install
composer install --no-dev
rm -rf composer.json composer.lock package.json yarn.lock gulpfile.js node_modules .editorconfig .gitignore .travis.yml .travis
sed -i.org -e '/^node_modules/d' vendor/inc2734/wp-basis/.gitignore
echo node_modules/* >> vendor/inc2734/wp-basis/.gitignore
echo !node_modules/sass-basis >> vendor/inc2734/wp-basis/.gitignore
Expand Down
2 changes: 1 addition & 1 deletion bin/phpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -e /tmp/wordpress-tests-lib ]; then
fi

cd ${themedir};
vendor/bin/phpunit --configuration= ${themedir}/phpunit.xml
resources/vendor/bin/phpunit --configuration= ${themedir}/phpunit.xml
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion bin/wpphpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ -e ${themedir}/bin/install-wp-tests.sh ]; then
fi

bash "${themedir}/bin/install-wp-tests.sh" wordpress_test root '' localhost latest;
vendor/bin/phpunit --configuration= ${themedir}/phpunit.xml
resources/vendor/bin/phpunit --configuration= ${themedir}/phpunit.xml
else
echo "${themedir}/bin/install-wp-tests.sh not found."
fi;
2 changes: 1 addition & 1 deletion codesniffer.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<file>./resources</file>
<exclude-pattern>*/resources/assets/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/resources/vendor/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/release/*</exclude-pattern>
</ruleset>
15 changes: 8 additions & 7 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.1",
"version": "4.1.0",
"authors": [
{
"name": "Takashi Kitajima",
Expand All @@ -22,16 +22,17 @@
},
"require": {
"php": ">=5.6",
"inc2734/mimizuku-core": ">=0.5.2"
"inc2734/mimizuku-core": ">=0.6.0"
},
"config": {
"process-timeout": 0
"process-timeout": 0,
"vendor-dir": "resources/vendor"
},
"scripts" :{
"test": [
"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/",
"resources/vendor/bin/phpcs --config-set installed_paths resources/vendor/wp-coding-standards/wpcs",
"resources/vendor/bin/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php",
"resources/vendor/bin/phpmd ./ text phpmd.ruleset.xml --suffixes php --exclude /resources/vendor/,/tests/",
"bash bin/phpunit.sh"
],
"server": "bash bin/server.sh",
Expand All @@ -41,7 +42,7 @@
"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"
"cd resources/vendor/inc2734/wp-basis && yarn install && yarn upgrade && cd ../../../../ && yarn run gulp build"
],
"post-update-cmd": [
"composer run post-install-cmd"
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

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

29 changes: 0 additions & 29 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,35 +155,6 @@ gulp.task('browsersync', function() {
});
});

/**
* Creates directory for release branch.
* Copy needed source files and build on Travis CI.
*/
gulp.task('release', function(){
return gulp.src(
[
'**',
'!README.md',
'!tests',
'!tests/**',
'!node_modules',
'!node_modules/**',
'!vendor',
'!vendor/**',
'!bin',
'!bin/**',
'!release',
'!release/**',
'!codesniffer.ruleset.xml',
'!phpmd.ruleset.xml',
'!phpunit.xml',
'!mimizuku.zip'
],
{base: './'}
)
.pipe(gulp.dest('release'));
});

/**
* Creates the zip file
* This command must be build beforehand on Travis CI !!
Expand Down
2 changes: 1 addition & 1 deletion resources/app/setup/nav-menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
register_nav_menus( [
'global-nav' => esc_html__( 'Global Navigation (For PC)', 'mimizuku' ),
'drawer-nav' => esc_html__( 'Drawer Navigation (For Mobile)', 'mimizuku' ),
'social-nav' => esc_html__( 'Social Navigation', 'snow-monkey' ),
'social-nav' => esc_html__( 'Social Navigation', 'mimizuku' ),
] );
} );

Expand Down
2 changes: 1 addition & 1 deletion resources/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Uses composer autoloader
*/
require_once( get_theme_file_path( '/../vendor/autoload.php' ) );
require_once( get_theme_file_path( '/vendor/autoload.php' ) );

/**
* Make theme available for translation
Expand Down
Binary file modified resources/languages/ja.mo
Binary file not shown.
Loading

0 comments on commit c323bfd

Please sign in to comment.