xlf-translate-auto 1.1.0 → 1.1.2
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/PUBLISHING.md +67 -0
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/application_fr.xlf +9247 -0
- package/src/application_frout.xlf +8767 -0
- package/src/translate.js +6 -1
package/PUBLISHING.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Publishing to npm
|
|
2
|
+
|
|
3
|
+
This guide explains how to publish a new version of `xlf-translate-auto` to the npm registry.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
1. **npm account**: You must have an account on [npmjs.com](https://www.npmjs.com/).
|
|
8
|
+
2. **Permissions**: You must be an owner or have publishing permissions for the `xlf-translate-auto` package.
|
|
9
|
+
3. **Clean state**: Ensure all your changes are committed and your working directory is clean.
|
|
10
|
+
|
|
11
|
+
## Publishing Steps
|
|
12
|
+
|
|
13
|
+
### 1. Run Tests
|
|
14
|
+
|
|
15
|
+
Before publishing, always ensure that all tests pass:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm test
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### 2. Increment Version
|
|
22
|
+
|
|
23
|
+
Use `npm version` to increment the version number in `package.json`. This command also creates a git commit and a tag for the new version.
|
|
24
|
+
|
|
25
|
+
- For a patch release (e.g., 1.1.1 -> 1.1.2):
|
|
26
|
+
```bash
|
|
27
|
+
npm version patch
|
|
28
|
+
```
|
|
29
|
+
- For a minor release (e.g., 1.1.1 -> 1.2.0):
|
|
30
|
+
```bash
|
|
31
|
+
npm version minor
|
|
32
|
+
```
|
|
33
|
+
- For a major release (e.g., 1.1.1 -> 2.0.0):
|
|
34
|
+
```bash
|
|
35
|
+
npm version major
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 3. Publish to npm
|
|
39
|
+
|
|
40
|
+
Log in to your npm account if you haven't already:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm login
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then, publish the package:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm publish
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 4. Push to GitHub
|
|
53
|
+
|
|
54
|
+
Push the new commit and the newly created tag to GitHub:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git push origin master --tags
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
*(Note: Replace `master` with your default branch name if it's different, e.g., `main`.)*
|
|
61
|
+
|
|
62
|
+
## Summary Checklist
|
|
63
|
+
|
|
64
|
+
- [ ] Tests passed (`npm test`)
|
|
65
|
+
- [ ] Version incremented (`npm version <type>`)
|
|
66
|
+
- [ ] Published to npm (`npm publish`)
|
|
67
|
+
- [ ] Pushed to GitHub (`git push --tags`)
|
package/README.md
CHANGED
|
@@ -110,6 +110,8 @@ The easiest way to develop on this module is to use test-driven development.
|
|
|
110
110
|
|
|
111
111
|
Unit tests can be run with `npm test`. To automatically re-run the tests when you make changes to the files, run `npm run test:watch`.
|
|
112
112
|
|
|
113
|
+
For instructions on how to publish a new version to npm, see [PUBLISHING.md](./PUBLISHING.md).
|
|
114
|
+
|
|
113
115
|
## Translation
|
|
114
116
|
|
|
115
117
|
This utility uses Google Translate's online API for its translations using this NPM package: https://www.npmjs.com/package/@k3rn31p4nic/google-translate-api
|