Skip to content

Commit

Permalink
Ignore apigen and add grun task for it
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Mar 3, 2016
1 parent ae387b4 commit 23c4996
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -66,3 +66,4 @@ phpunit.xml

# General
NOTES.md
apigen/
46 changes: 29 additions & 17 deletions Gruntfile.js
Expand Up @@ -85,24 +85,15 @@ module.exports = function(grunt) {
'__ngettext_noop:1,2,3d',
'_c:1,2d',
'_nc:1,2,4c,5d'
]
},
files: {
src: [
'**/*.php', // Include all files
'!node_modules/**', // Exclude node_modules/
],
expand: true
}
},

exec: {
txpull: { // Pull Transifex translation - grunt exec:txpull
cmd: 'tx pull -a -f' // Change the percentage with --minimum-perc=yourvalue
},
txpush_s: { // Push pot to Transifex - grunt exec:txpush_s
cmd: 'tx push -s'
]
},
files: {
src: [
'**/*.php', // Include all files
'!node_modules/**', // Exclude node_modules/
],
expand: true
}
},

// concat: {
Expand Down Expand Up @@ -284,13 +275,34 @@ module.exports = function(grunt) {
}
},

exec: {
txpull: { // Pull Transifex translation - grunt exec:txpull
cmd: 'tx pull -a -f' // Change the percentage with --minimum-perc=yourvalue
},
txpush_s: { // Push pot to Transifex - grunt exec:txpush_s
cmd: 'tx push -s'
},
apigen: {
cmd: [
'rm -r ~/Sites/wpengine/api',
'echo "Old API docs removed"',
'apigen generate --config apigen/apigen.neon --debug',
'echo "Docs regenerated"',
'php apigen/hook-docs.php'
].join( '&&' )
}
},

});

grunt.registerTask('styles', ['sass', 'csscomb', 'cmq', 'cssjanus','cssmin']);
grunt.registerTask('js', ['asciify', 'jshint', 'uglify']);
grunt.registerTask('tests', ['asciify', 'jshint', 'phpunit']);
grunt.registerTask('default', ['styles', 'js', 'tests']);

// apigen
grunt.registerTask('apigen', ['exec:apigen']);

// Checktextdomain and makepot task(s)
grunt.registerTask('build:i18n', ['checktextdomain', 'makepot', 'newer:potomo']);

Expand Down

0 comments on commit 23c4996

Please sign in to comment.