diff --git a/Gruntfile.js b/Gruntfile.js index 32b32cbdb0c..0d421488f79 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -46,10 +46,10 @@ module.exports = function( grunt ) { command: 'cross-env BABEL_ENV=production webpack' }, pot_to_php: { - command: 'npm run pot-to-php' + command: 'npm run pot-to-php && php -l languages/amp-translations.php' }, makepot: { - command: 'wp i18n make-pot . languages/amp-js.pot --include="*.js"' + command: 'wp i18n make-pot . languages/amp-js.pot --include="*.js" --file-comment="*/null/*"' // The --file-comment is a temporary workaround for . }, create_build_zip: { command: 'if [ ! -e build ]; then echo "Run grunt build first."; exit 1; fi; if [ -e amp.zip ]; then rm amp.zip; fi; cd build; zip -r ../amp.zip .; cd ..; echo; echo "ZIP of build: $(pwd)/amp.zip"' diff --git a/package.json b/package.json index 8716042ad0e..9d2f4e51856 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "main": "blocks/index.js", "scripts": { "pot-to-php": "pot-to-php languages/amp-js.pot languages/amp-translations.php amp", - "build": "grunt build; grunt create-build-zip", + "build": "grunt build && grunt create-build-zip", "deploy": "grunt deploy", "dev": "cross-env BABEL_ENV=default webpack --watch" }