This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,490 additions
and
725 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
### Node template | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- | ||
node_modules | ||
|
||
|
||
### Composer template | ||
composer.phar | ||
vendor/ | ||
|
||
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
# composer.lock | ||
|
||
### Release | ||
release/ | ||
|
||
### Docs | ||
docs/ | ||
|
||
### Compiled translations | ||
*.mo | ||
|
||
### CI target | ||
wordpress/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
|
||
before_install: npm install -g grunt-cli | ||
install: npm install | ||
script: grunt test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
module.exports = function (grunt) { | ||
// Load tasks | ||
require('load-grunt-tasks')(grunt); | ||
|
||
// Display task timing | ||
require('time-grunt')(grunt); | ||
|
||
// Project configuration | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
paths: { | ||
// PHP assets | ||
php: { | ||
files_std: [ | ||
'*.php', | ||
'**/*.php', | ||
'!assets/**/*.php', | ||
'!docs/**/*.php', | ||
'!node_modules/**/*.php', | ||
'!release/**/*.php', | ||
'!vendor/**/*.php', | ||
'!wordpress/**/*.php' | ||
], // Standard file match | ||
files: '<%= paths.php.files_std %>', // Dynamic file match | ||
exclude: [ | ||
'assets/.*', | ||
'composer.json', | ||
'composer.lock', | ||
'CONTRIBUTING.md', | ||
'docs/.*', | ||
'.git/.*', | ||
'.gitignore', | ||
'.gitmodules', | ||
'Gruntfile.js', | ||
'node_modules/.*', | ||
'package.json', | ||
'README.md', | ||
'release/.*', | ||
'.sensiolabs.yml', | ||
'.travis.yml', | ||
'.tx', | ||
'vendor/.*', | ||
'wordpress/.*' | ||
] // PHP regex match | ||
} | ||
}, | ||
phpcs: { | ||
application: { | ||
dir: '<%= paths.php.files %>' | ||
}, | ||
options: { | ||
bin: 'vendor/bin/phpcs', | ||
standard: 'Wordpress-Extra' | ||
} | ||
}, | ||
phplint: { | ||
options: { | ||
phpArgs: { | ||
'-lf': null | ||
} | ||
}, | ||
all: { | ||
src: '<%= paths.php.files %>' | ||
} | ||
}, | ||
phpdoc: { | ||
target: { | ||
src: [ | ||
'doliwoo.php', | ||
'includes' | ||
], | ||
dest: 'docs' | ||
} | ||
}, | ||
makepot: { | ||
target: { | ||
options: { | ||
mainFile: 'doliwoo.php', | ||
exclude: '<%= paths.php.exclude %>', | ||
type: 'wp-plugin', | ||
potHeaders: { | ||
poedit: true, | ||
'report-msgid-bugs-to': 'https://github.com/GPCsolutions/doliwoo/issues' | ||
} | ||
} | ||
} | ||
}, | ||
po2mo: { | ||
files: { | ||
src: 'languages/*.po', | ||
expand: true | ||
} | ||
}, | ||
clean: { | ||
main: ['release/<%= pkg.version %>'] | ||
}, | ||
copy: { | ||
// Copy the plugin to a versioned release directory | ||
main: { | ||
src: [ | ||
'**', | ||
'!assets/**', | ||
'!wordpress/**', | ||
'!composer.json', | ||
'!composer.lock', | ||
'!CONTRIBUTING.md', | ||
'!docs/**', | ||
'!.git/**', | ||
'!.gitignore', | ||
'!.gitmodules', | ||
'!Gruntfile.js', | ||
'!node_modules/**', | ||
'!package.json', | ||
'!README.md', | ||
'!release/**', | ||
'!.sensiolabs.yml', | ||
'!.travis.yml', | ||
'!.tx', | ||
'!vendor/**' | ||
], | ||
dest: 'release/<%= pkg.version %>/' | ||
} | ||
}, | ||
compress: { | ||
main: { | ||
options: { | ||
mode: 'zip', | ||
archive: './release/doliwoo-v<%= pkg.version %>.zip' | ||
}, | ||
expand: true, | ||
cwd: 'release/<%= pkg.version %>/', | ||
src: ['**/*'], | ||
dest: 'doliwoo/' | ||
} | ||
}, | ||
exec: { | ||
txpush: { | ||
cmd: 'tx push -s' | ||
}, | ||
txpull: { | ||
cmd: 'tx pull -a' | ||
} | ||
}, | ||
wp_readme_to_markdown: { | ||
main: { | ||
files: { | ||
'README.md': 'readme.txt' | ||
} | ||
} | ||
}, | ||
checkwpversion: { | ||
check: { //Check plug-in version and stable tag match | ||
version1: 'plugin', | ||
version2: 'readme', | ||
compare: '>=' | ||
}, | ||
check2: { //Check plug-in version and package.json match | ||
version1: 'plugin', | ||
version2: '<%= pkg.version %>', | ||
compare: '==' | ||
} | ||
}, | ||
"sync-json": { | ||
options: { | ||
indent: 2, | ||
include: [ | ||
'description', | ||
'keywords', | ||
'homepage', | ||
'license' | ||
] | ||
}, | ||
composer: { | ||
files: { | ||
'composer.json': 'package.json' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.registerTask('default', [ | ||
'test', | ||
'sync-json', | ||
'wp_readme_to_markdown', | ||
'phpdoc' | ||
]); | ||
|
||
grunt.registerTask('test', [ | ||
'composer:update', | ||
'phpcs', | ||
'phplint', | ||
'checkwpversion' | ||
]); | ||
|
||
grunt.registerTask('potupdate', [ | ||
'makepot', | ||
'exec:txpush' | ||
]); | ||
|
||
grunt.registerTask('poupdate', [ | ||
'exec:txpull' | ||
]); | ||
|
||
grunt.registerTask('i18n', [ | ||
'potupdate', | ||
'poupdate', | ||
'po2mo' | ||
]); | ||
|
||
grunt.registerTask('release', [ | ||
'default', | ||
'i18n', | ||
'clean', | ||
'copy', | ||
'compress' | ||
]); | ||
|
||
}; |
Oops, something went wrong.