repomap
v0.0.3
Published
Building a better repository map with tree sitter
Downloads
5
Readme
repomap
Building a better repository map with tree sitter
install
$ npm install repomap -g
usage
$ repomap --help
Usage: treer [options]
Options:
-h, --help output usage information
-V, --version output the version number
-d, --directory [dir] Please specify a directory to generate structure tree
example:
$ repomap
examples/snake/food.py:
⋮...
│class Food:
│ def __init__(self, screen, snake):
│ """
│ 初始化食物
│ :param screen: 游戏窗口
│ :param snake: 蛇对象
│ """
│ self.screen = screen
│ self.snake = snake
│ self.width = 10
│ self.height = 10
⋮...
│ def generate(self):
⋮...
│ def draw(self):
⋮...
examples/snake/settings.py
examples/snake/snake.py:
⋮...
│class Snake:
│ def __init__(self, screen):
│ """
│ 初始化贪吃蛇
│ :param screen: 游戏窗口
│ """
│ self.screen = screen
│ self.width = 10
│ self.height = 10
│ self.color = (255, 0, 0) # 蛇的颜色
│ self.speed = SNAKE_SPEED # 蛇的速度
⋮...
│ def move(self):
⋮...
│ def draw(self):
⋮...
test
$ node src/index.js -d examples/web
$ node src/index.js -d examples/java
$ node src/index.js -d examples/python
$ node src/index.js -d examples/typescript