Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around syntax error caused by the pot-to-php script #1427

Merged
merged 4 commits into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/Automattic/amp-wp/issues/1416>.
},
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"'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down