i18nexus-cli 3.8.2 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -73,14 +73,25 @@ If your i18nexus project is set to **`react-intl`**:
73
73
 
74
74
  ```
75
75
  .
76
- └── messages
77
- └── locales
76
+ └── src
77
+ └── messages
78
78
  ├── en
79
79
  | └── common.json
80
80
  └── de
81
81
  └── common.json
82
82
  ```
83
83
 
84
+ If your i18nexus project is set to **`react-intl`** and a `src` directory does not exist:
85
+
86
+ ```
87
+ .
88
+ └── messages
89
+ ├── en
90
+ | └── common.json
91
+ └── de
92
+ └── common.json
93
+ ```
94
+
84
95
  If you wish to download your files to a different directory, you can use the `--path` option to specify your download destination. See all options below:
85
96
 
86
97
  ### Options
package/commands/pull.js CHANGED
@@ -59,6 +59,12 @@ const pull = async (opt, internalOptions = {}) => {
59
59
  } else {
60
60
  path = `${process.cwd()}/public/locales`;
61
61
  }
62
+ } else if (projectLibrary === 'react-intl') {
63
+ const hasSrcDir = fs.existsSync(`${process.cwd()}/src`);
64
+
65
+ path = hasSrcDir
66
+ ? `${process.cwd()}/src/messages`
67
+ : `${process.cwd()}/messages`;
62
68
  } else {
63
69
  path = `${process.cwd()}/messages`;
64
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18nexus-cli",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "Command line interface (CLI) for accessing the i18nexus API",
5
5
  "main": "index.js",
6
6
  "bin": {