@discord/babel-plugin-transform-discord-intl 0.15.0 → 0.16.0
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 +24 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# babel-plugin-transform-discord-intl
|
|
2
|
+
|
|
3
|
+
A Babel plugin for transforming intl message _usages_ to obfuscated, minified strings, saving on bundle size and allowing for complete anonymity of string names.
|
|
4
|
+
|
|
5
|
+
# Development
|
|
6
|
+
|
|
7
|
+
This package is plain CommonJS with JSDoc types that requires no compilation. It can be tested locally by using `file:` or `link:` references from another project. No build step is required.
|
|
8
|
+
|
|
9
|
+
# Usage
|
|
10
|
+
|
|
11
|
+
This plugin is usable with Babel 7+. There is minimal configuration other than `extraImports` for adding additional names to check and transform usages for.
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
[
|
|
15
|
+
[
|
|
16
|
+
require('@discord/babel-plugin-transform-discord-intl'),
|
|
17
|
+
{
|
|
18
|
+
extraImports: {
|
|
19
|
+
[path.resolve('some/source/file')]: ['t', 'otherMessagesName'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
];
|
|
24
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@discord/babel-plugin-transform-discord-intl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"description": "Babel plugin for transforming message accesses and definitions",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@typescript-eslint/scope-manager": "^8.8.1",
|
|
18
|
-
"@discord/intl-loader-core": "0.
|
|
18
|
+
"@discord/intl-loader-core": "0.16.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@babel/types": "^7.24.9",
|