@let-value/translate-extract 1.0.6-beta.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/dist/bin/cli.cjs +19 -0
- package/dist/bin/cli.d.cts +2 -0
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +19 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/src/index.cjs +721 -0
- package/dist/src/index.d.cts +94 -0
- package/dist/src/index.d.cts.map +1 -0
- package/dist/src/index.d.ts +94 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +710 -0
- package/dist/src/index.js.map +1 -0
- package/package.json +45 -0
package/dist/bin/cli.cjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_chunk.__toESM(node_fs);
|
|
5
|
+
|
|
6
|
+
//#region bin/cli.ts
|
|
7
|
+
async function main() {
|
|
8
|
+
const [, , entry, locale = "en", out] = process.argv;
|
|
9
|
+
if (!entry) {
|
|
10
|
+
console.error("Usage: translate-extract <entry> [locale] [out]");
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const po = locale;
|
|
14
|
+
if (out) node_fs.default.writeFileSync(out, po);
|
|
15
|
+
else process.stdout.write(po);
|
|
16
|
+
}
|
|
17
|
+
main();
|
|
18
|
+
|
|
19
|
+
//#endregion
|
package/dist/bin/cli.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
|
|
4
|
+
//#region bin/cli.ts
|
|
5
|
+
async function main() {
|
|
6
|
+
const [, , entry, locale = "en", out] = process.argv;
|
|
7
|
+
if (!entry) {
|
|
8
|
+
console.error("Usage: translate-extract <entry> [locale] [out]");
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const po = locale;
|
|
12
|
+
if (out) fs.writeFileSync(out, po);
|
|
13
|
+
else process.stdout.write(po);
|
|
14
|
+
}
|
|
15
|
+
main();
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { };
|
|
19
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","names":[],"sources":["../../bin/cli.ts"],"sourcesContent":["#!/usr/bin/env node\nimport fs from \"node:fs\";\n\nasync function main() {\n const [, , entry, locale = \"en\", out] = process.argv;\n if (!entry) {\n console.error(\"Usage: translate-extract <entry> [locale] [out]\");\n process.exit(1);\n }\n\n const po = locale;\n if (out) {\n fs.writeFileSync(out, po);\n } else {\n process.stdout.write(po);\n }\n}\n\nvoid main();\n"],"mappings":";;;;AAGA,eAAe,OAAO;CAClB,MAAM,KAAK,OAAO,SAAS,MAAM,OAAO,QAAQ;AAChD,KAAI,CAAC,OAAO;AACR,UAAQ,MAAM;AACd,UAAQ,KAAK;;CAGjB,MAAM,KAAK;AACX,KAAI,IACA,IAAG,cAAc,KAAK;KAEtB,SAAQ,OAAO,MAAM;;AAIxB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
|
|
25
|
+
Object.defineProperty(exports, '__toESM', {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return __toESM;
|
|
29
|
+
}
|
|
30
|
+
});
|