gaesup-world 0.9.60 → 0.9.62
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/gaesup/tools/teleport/index.tsx +5 -1
- package/dist/index.ts +1 -1
- package/index.py +81 -0
- package/package.json +2 -3
|
@@ -3,7 +3,11 @@ import { useTeleport } from "../../hooks/useTeleport";
|
|
|
3
3
|
import * as S from "./style.css";
|
|
4
4
|
import { teleportType } from "./type.ts";
|
|
5
5
|
|
|
6
|
-
export function
|
|
6
|
+
export function TeleportPortal({
|
|
7
|
+
text,
|
|
8
|
+
position,
|
|
9
|
+
teleportStyle,
|
|
10
|
+
}: teleportType) {
|
|
7
11
|
const { Teleport } = useTeleport();
|
|
8
12
|
|
|
9
13
|
return (
|
package/dist/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { Clicker } from "./gaesup/tools/clicker";
|
|
|
9
9
|
export { GamePad } from "./gaesup/tools/gamepad";
|
|
10
10
|
export { MiniMap } from "./gaesup/tools/minimap";
|
|
11
11
|
export { Rideable } from "./gaesup/tools/rideable";
|
|
12
|
-
export {
|
|
12
|
+
export { TeleportPortal } from "./gaesup/tools/teleport";
|
|
13
13
|
export { InnerHtml } from "./gaesup/utils/innerHtml";
|
|
14
14
|
export { Elr, Qt, V3, V30, V31 } from "./gaesup/utils/vector";
|
|
15
15
|
export { GaesupWorld } from "./gaesup/world";
|
package/index.py
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
def get_language(extension):
|
|
4
|
+
"""
|
|
5
|
+
파일 확장자에 따라 코드 블록의 언어를 반환합니다.
|
|
6
|
+
"""
|
|
7
|
+
mapping = {
|
|
8
|
+
'.ts': 'typescript',
|
|
9
|
+
'.tsx': 'tsx',
|
|
10
|
+
'.css.ts': 'typescript', # CSS-in-JS 로직을 고려하여 'typescript'로 지정
|
|
11
|
+
}
|
|
12
|
+
return mapping.get(extension, '')
|
|
13
|
+
|
|
14
|
+
def extract_code_separated(folder_path, output_md, supported_extensions):
|
|
15
|
+
"""
|
|
16
|
+
지정된 폴더 내의 특정 확장자를 가진 파일들을 확장자별로 그룹화하여 Markdown 파일로 저장합니다.
|
|
17
|
+
"""
|
|
18
|
+
# 확장자별 파일 목록 초기화
|
|
19
|
+
files_by_extension = {ext: [] for ext in supported_extensions}
|
|
20
|
+
|
|
21
|
+
# 폴더를 재귀적으로 탐색하여 파일 분류
|
|
22
|
+
for root, dirs, files in os.walk(folder_path):
|
|
23
|
+
for file in files:
|
|
24
|
+
for ext in supported_extensions:
|
|
25
|
+
if file.endswith(ext):
|
|
26
|
+
relative_path = os.path.relpath(os.path.join(root, file), folder_path)
|
|
27
|
+
files_by_extension[ext].append(relative_path)
|
|
28
|
+
break
|
|
29
|
+
|
|
30
|
+
# Markdown 파일 열기
|
|
31
|
+
with open(output_md, 'w', encoding='utf-8') as md_file:
|
|
32
|
+
md_file.write('# 코드 추출 결과\n\n')
|
|
33
|
+
|
|
34
|
+
for ext in supported_extensions:
|
|
35
|
+
if files_by_extension[ext]:
|
|
36
|
+
# 섹션 제목 작성
|
|
37
|
+
if ext == '.ts':
|
|
38
|
+
section_title = '## TypeScript Files (.ts)'
|
|
39
|
+
elif ext == '.tsx':
|
|
40
|
+
section_title = '## TypeScript React Files (.tsx)'
|
|
41
|
+
elif ext == '.css.ts':
|
|
42
|
+
section_title = '## CSS TypeScript Files (.css.ts)'
|
|
43
|
+
else:
|
|
44
|
+
section_title = f'## {ext} Files'
|
|
45
|
+
|
|
46
|
+
md_file.write(f'{section_title}\n\n')
|
|
47
|
+
|
|
48
|
+
for relative_path in files_by_extension[ext]:
|
|
49
|
+
file_path = os.path.join(folder_path, relative_path)
|
|
50
|
+
language = get_language(ext)
|
|
51
|
+
|
|
52
|
+
# 파일 내용 읽기
|
|
53
|
+
try:
|
|
54
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
55
|
+
code = f.read()
|
|
56
|
+
except Exception as e:
|
|
57
|
+
print(f"파일을 읽는 중 오류 발생: {file_path}\n오류 내용: {e}")
|
|
58
|
+
continue
|
|
59
|
+
|
|
60
|
+
# 파일명을 소제목으로 추가
|
|
61
|
+
md_file.write(f'### {relative_path}\n\n')
|
|
62
|
+
|
|
63
|
+
# 코드 블록 추가
|
|
64
|
+
md_file.write(f'```{language}\n{code}\n```\n\n')
|
|
65
|
+
|
|
66
|
+
print(f"코드 추출이 완료되었습니다. 출력 파일: {output_md}")
|
|
67
|
+
|
|
68
|
+
if __name__ == "__main__":
|
|
69
|
+
# 파일 확장자를 리스트로 지정
|
|
70
|
+
supported_extensions = [".css.ts"] # 필요에 따라 확장자 추가
|
|
71
|
+
|
|
72
|
+
# 폴더 경로와 출력 Markdown 파일 경로 설정
|
|
73
|
+
folder_path = './src' # 코드 추출할 폴더 경로
|
|
74
|
+
output_md = './output.md' # 출력할 Markdown 파일 경로
|
|
75
|
+
|
|
76
|
+
# 폴더 존재 여부 확인
|
|
77
|
+
if not os.path.isdir(folder_path):
|
|
78
|
+
print(f"에러: 지정된 폴더가 존재하지 않습니다: {folder_path}")
|
|
79
|
+
exit(1)
|
|
80
|
+
|
|
81
|
+
extract_code_separated(folder_path, output_md, supported_extensions)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaesup-world",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"prepare": "yarn clean && tsc -p tsconfig.build.json && yarn copy-files",
|
|
16
16
|
"predeploy": "yarn build",
|
|
17
17
|
"deploy": "gh-pages -d dist",
|
|
18
|
-
"test": "jest"
|
|
19
|
-
"publish": "yarn prepare && yarn npm publish --access public"
|
|
18
|
+
"test": "jest"
|
|
20
19
|
},
|
|
21
20
|
"dependencies": {
|
|
22
21
|
"@dimforge/rapier3d": "^0.14.0",
|