Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoursenaud committed Mar 5, 2015
2 parents 4bde606 + 05c8ccb commit a9d5310
Show file tree
Hide file tree
Showing 26 changed files with 2,490 additions and 725 deletions.
49 changes: 49 additions & 0 deletions .gitignore
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/
9 changes: 9 additions & 0 deletions .travis.yml
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
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ We'll integrate your contributions a few weeks before release.

Documentation
-------------
The documentation is maintained on the [Wiki](https://github.com/GPCsolutions/doliwoo/wiki).
The main documentation is maintained on the [Wiki](https://github.com/GPCsolutions/doliwoo/wiki).

Access is currently restricted but you can suggest edits in the [Issues](https://github.com/GPCsolutions/doliwoo/issues).

Code documentation can be generated with ```grunt phpdoc``` and is output into the ./docs subdirectory.
218 changes: 218 additions & 0 deletions Gruntfile.js
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'
]);

};
Loading

0 comments on commit a9d5310

Please sign in to comment.