lenix 1.0.0 → 1.0.1
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { writeFile } from 'fs/promises';
|
|
2
|
+
const fxmanifest = Object.entries((await import('./fxmanifest.json')).default);
|
|
3
|
+
const generateContent = () => {
|
|
4
|
+
let defaultContent = '';
|
|
5
|
+
for (const [key, value] of fxmanifest) {
|
|
6
|
+
if (Array.isArray(value)) {
|
|
7
|
+
defaultContent +=
|
|
8
|
+
`${key} {
|
|
9
|
+
"${value}",
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
}
|
|
13
|
+
else if (typeof value === 'string') {
|
|
14
|
+
defaultContent +=
|
|
15
|
+
`${key} "${value}"
|
|
16
|
+
`;
|
|
17
|
+
}
|
|
18
|
+
else
|
|
19
|
+
throw new Error('Invalid value type');
|
|
20
|
+
}
|
|
21
|
+
return defaultContent;
|
|
22
|
+
};
|
|
23
|
+
const createFxmanifest = async (content) => await writeFile('fxmanifest.lua', content || generateContent());
|
|
24
|
+
export { createFxmanifest };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const fxmanifest = Object.entries((await import('./fxmanifest.json')).default);
|
|
3
|
-
const generateContent = () => {
|
|
4
|
-
let defaultContent = '';
|
|
5
|
-
for (const [key, value] of fxmanifest) {
|
|
6
|
-
if (Array.isArray(value)) {
|
|
7
|
-
defaultContent +=
|
|
8
|
-
`${key} {
|
|
9
|
-
"${value}",
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
}
|
|
13
|
-
else if (typeof value === 'string') {
|
|
14
|
-
defaultContent +=
|
|
15
|
-
`${key} "${value}"
|
|
16
|
-
`;
|
|
17
|
-
}
|
|
18
|
-
else
|
|
19
|
-
throw new Error('Invalid value type');
|
|
20
|
-
}
|
|
21
|
-
return defaultContent;
|
|
22
|
-
};
|
|
23
|
-
const createFxmanifest = async (content) => await writeFile('fxmanifest.lua', content || generateContent());
|
|
24
|
-
export { createFxmanifest };
|
|
1
|
+
export * from './fxmanifest';
|
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lenix",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Lenix",
|
|
6
|
+
"license": "GPL-3.0",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"lenix"
|
|
9
|
+
],
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/lenixdev/npm"
|
|
13
|
+
},
|
|
4
14
|
"main": "./dist/index.js",
|
|
5
15
|
"types": "./dist/index.d.ts",
|
|
6
|
-
"files": [
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
7
19
|
"scripts": {
|
|
8
|
-
"build": "tsc"
|
|
20
|
+
"build": "tsc -p src/fxmanifest/tsconfig.json"
|
|
9
21
|
},
|
|
10
22
|
"devDependencies": {
|
|
11
23
|
"typescript": "^5.3.3"
|
|
@@ -13,4 +25,4 @@
|
|
|
13
25
|
"dependencies": {
|
|
14
26
|
"@types/node": "^20.7.1"
|
|
15
27
|
}
|
|
16
|
-
}
|
|
28
|
+
}
|
|
File without changes
|