Skip to:
Content

bbPress.org

Changeset 5295


Ignore:
Timestamp:
02/26/2014 12:56:33 AM (10 years ago)
Author:
netweb
Message:

More Grunt: Switch from grunt-pot to grunt-wp-i18n

  • Remove grunt-pot from package.json
  • Add grunt-wp-i18n to package.json
  • Adds grunt task grunt makebot to grunt build and grunt build-release
  • Creates bbpress.pot in /build
  • Requires fresh npm install to update dependencies
  • Props netweb. See #2542
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r5294 r5295  
    191191            }
    192192        },
    193         pot:{
    194             options: {
    195                 text_domain: 'bbpress',
    196                 package_name: 'bbpress',
    197                 dest: BUILD_DIR,
    198                 keywords: [
    199                     '__',
    200                     '_e',
    201                     '_x',
    202                     '_n',
    203                     '_ex',
    204                     '_nx',
    205                     'esc_attr__',
    206                     'esc_attr_e',
    207                     'esc_attr_x',
    208                     'esc_html__',
    209                     'esc_html_e',
    210                     'esc_html_x',
    211                     '_n_noop',
    212                     '_nx_noop'
    213                 ]
    214             },
    215             files: {
    216                 src: SOURCE_DIR + '**/*.php',
    217                 expand: true
     193        makepot: {
     194            target: {
     195                options: {
     196                    cwd: BUILD_DIR,
     197                    domainPath: '.',
     198                    mainFile: 'bbpress.php',
     199                    potFilename: 'bbpress.pot',
     200                    type: 'wp-plugin'
     201                }
    218202            }
    219203        },
     
    293277
    294278    // Build tasks.
    295     grunt.registerTask( 'build',         [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'pot' ] );
    296     grunt.registerTask( 'build-release', [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'checktextdomain', 'pot', 'phpunit' ] );
     279    grunt.registerTask( 'build',         [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'makepot' ] );
     280    grunt.registerTask( 'build-release', [ 'clean:all', 'copy:files', 'colors', 'cssjanus:core', 'cssmin:ltr', 'cssmin:rtl', 'uglify:core', 'jsvalidate:build', 'checktextdomain', 'makepot', 'phpunit' ] );
    297281
    298282    // Testing tasks.
  • trunk/package.json

    r5293 r5295  
    1717    "grunt-phpunit": "~0.3.2",
    1818    "grunt-jsvalidate": "~0.2.2",
    19     "grunt-pot": "~0.1.2",
     19    "grunt-wp-i18n": "~0.4.0",
    2020    "grunt-checktextdomain": "~0.1.1",
    2121    "matchdep": "~0.3.0",
Note: See TracChangeset for help on using the changeset viewer.