Skip to content

Commit a346275

Browse files
authored
Merge pull request #96 from fabianrios/master
add language a string to been able to use it on graphql and use cross-env for the prepare script
2 parents 7979b05 + ed43c80 commit a346275

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@babel/cli": "^7.4.4",
1919
"@babel/core": "^7.4.5",
2020
"babel-preset-gatsby-package": "^0.2.0",
21+
"cross-env": "^7.0.0",
2122
"jest": "^24.9.0",
2223
"prettier": "^1.18.2",
2324
"rimraf": "^2.6.3"
@@ -39,7 +40,7 @@
3940
"repository": "https://github.com/wiziple/gatsby-plugin-intl",
4041
"scripts": {
4142
"build": "babel src --out-dir . --ignore **/__tests__",
42-
"prepare": "NODE_ENV=production npm run build",
43+
"prepare": "cross-env NODE_ENV=production npm run build",
4344
"watch": "babel -w src --out-dir . --ignore **/__tests__",
4445
"format": "prettier --write {src,__tests__}/**/*.{js,jsx}",
4546
"test": "jest",

src/gatsby-node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ exports.onCreatePage = async ({ page, actions }, pluginOptions) => {
7777
path: newPath,
7878
context: {
7979
...page.context,
80+
language,
8081
intl: {
8182
language,
8283
languages,

yarn.lock

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,13 @@ core-util-is@1.0.2, core-util-is@~1.0.0:
15831583
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
15841584
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
15851585

1586+
cross-env@^7.0.0:
1587+
version "7.0.0"
1588+
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.0.tgz#5a3b2ddce51ec713ea58f2fb79ce22e65b4f5479"
1589+
integrity sha512-rV6M9ldNgmwP7bx5u6rZsTbYidzwvrwIYZnT08hSGLcQCcggofgFW+sNe7IhA1SRauPS0QuLbbX+wdNtpqE5CQ==
1590+
dependencies:
1591+
cross-spawn "^7.0.1"
1592+
15861593
cross-spawn@^6.0.0:
15871594
version "6.0.5"
15881595
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
@@ -1594,6 +1601,15 @@ cross-spawn@^6.0.0:
15941601
shebang-command "^1.2.0"
15951602
which "^1.2.9"
15961603

1604+
cross-spawn@^7.0.1:
1605+
version "7.0.1"
1606+
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14"
1607+
integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==
1608+
dependencies:
1609+
path-key "^3.1.0"
1610+
shebang-command "^2.0.0"
1611+
which "^2.0.1"
1612+
15971613
cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
15981614
version "0.3.8"
15991615
resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
@@ -3520,6 +3536,11 @@ path-key@^2.0.0, path-key@^2.0.1:
35203536
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
35213537
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
35223538

3539+
path-key@^3.1.0:
3540+
version "3.1.1"
3541+
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
3542+
integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
3543+
35233544
path-parse@^1.0.6:
35243545
version "1.0.6"
35253546
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
@@ -3963,11 +3984,23 @@ shebang-command@^1.2.0:
39633984
dependencies:
39643985
shebang-regex "^1.0.0"
39653986

3987+
shebang-command@^2.0.0:
3988+
version "2.0.0"
3989+
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
3990+
integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
3991+
dependencies:
3992+
shebang-regex "^3.0.0"
3993+
39663994
shebang-regex@^1.0.0:
39673995
version "1.0.0"
39683996
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
39693997
integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
39703998

3999+
shebang-regex@^3.0.0:
4000+
version "3.0.0"
4001+
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
4002+
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
4003+
39714004
shellwords@^0.1.1:
39724005
version "0.1.1"
39734006
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
@@ -4502,6 +4535,13 @@ which@^1.2.9, which@^1.3.0:
45024535
dependencies:
45034536
isexe "^2.0.0"
45044537

4538+
which@^2.0.1:
4539+
version "2.0.2"
4540+
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
4541+
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
4542+
dependencies:
4543+
isexe "^2.0.0"
4544+
45054545
wide-align@^1.1.0:
45064546
version "1.1.3"
45074547
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"

0 commit comments

Comments
 (0)