Skip to content

Commit

Permalink
Build: Include string extraction in production build (#5308)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored Mar 2, 2018
1 parent 328a859 commit 68394ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ status "Installing dependencies..."
npm install
status "Generating build..."
npm run build
status "Generating translation messages..."
npm run gettext-strings
status "Generating PHP file for wordpress.org to parse translations..."
npm run pot-to-php

Expand Down
2 changes: 1 addition & 1 deletion languages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Languages
The generated POT template file is not included in this repository. To create this file locally, follow instructions from [CONTRIBUTING.md](https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md) to install the project, then run the following command:

```
npm run gettext-strings
npm run build
```

After the build completes, you'll find a `gutenberg.pot` strings file in this directory.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"@wordpress/default"
],
"env": {
"gettext": {
"production": {
"plugins": [
[
"./i18n/babel-plugin",
Expand Down Expand Up @@ -137,13 +137,12 @@
},
"scripts": {
"prebuild": "check-node-version --package",
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
"gettext-strings": "cross-env BABEL_ENV=gettext webpack",
"build": "cross-env NODE_ENV=production webpack",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint-php": "docker-compose run --rm composer run-script lint",
"predev": "check-node-version --package",
"dev": "cross-env BABEL_ENV=default webpack --watch",
"dev": "cross-env webpack --watch",
"test": "npm run lint && npm run test-unit",
"test-php": "npm run lint-php && npm run test-unit-php",
"ci": "concurrently \"npm run lint && npm run build\" \"npm run test-unit:coverage-ci\"",
Expand Down

0 comments on commit 68394ce

Please sign in to comment.