You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6bcf4ef
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+28-25Lines changed: 28 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,46 +17,48 @@
17
17
</h3>
18
18
19
19
## What
20
-
> **Have you ever got lost in a big or unknown codebase?** This tool will help you to solve that, as well as increase your development speed and quality of application architecture you build.
20
+
> **Have you ever got lost in a big or unknown codebase?** This tool will help you to solve that. Also, it will increase your development speed and give more knowledge about your application architecture.
21
21
>
22
-
>**How it works?** You run `codecrumbs` command for a codebase, it analyzes source code and build its visual representation. Put a codecrumb-comment and codebase state will be reflected by visual client in browser on the fly.
22
+
>**How it works?** You run `codecrumbs` command for a codebase, it analyzes source code and build its visual representation. Write down a codecrumb-comment and codebase state will be reflected by visual client in browser on the fly.
23
23
>
24
24
>-[@bliashenko](https://twitter.com/bliashenko)
25
25
26
26
## Demo
27
-
Check out [**standalone version running here**](https://codecrumbs.io/) with defined trail of codecrumbs.
27
+
Check out the example of [**standalone version running here**](https://codecrumbs.io/).
>Pre-condition: update/install `NodeJS` version to be >= *8.11.1*
34
34
35
-
Install ```codecrumbs``` globally or in ```devDependencies```:
36
-
```yarn add codecrumbs -D```
35
+
1) Install ```codecrumbs```*globally* (```yarn global codecrumbs```) or to *devDependencies* (```yarn add codecrumbs -D```)
36
+
2) Run ```codecrumbs -d project-src-dir -e project-src-dir/index.js```. Change parameters to match your project:```-d``` is *directory with source code*, ```-e``` is *entry point file* .
37
+
3) Go to [http://localhost:2018](http://localhost:2018/#) in the browser to check it out.
37
38
38
-
Add command with **entry file** and **source directory** to ```scripts``` section in your ```package.json```. Change ```-e``` (entry point file), ```-d``` (directory) params to match paths inside your project.
39
-
```javascript
40
-
// package.json
41
-
...
42
-
"scripts": {
43
-
"start:cc":"codecrumbs -e src/index.js -d src"
44
-
}
45
-
46
-
```
47
-
48
-
Run ```yarn start:cc``` from the terminal. Go to [http://localhost:2018/#](http://localhost:2018/#) in the browser to check it out.
49
39
#### CLI
50
-
-- TBD --
40
+
Parameter | Description | Example
41
+
--- | --- | ---
42
+
```-e```, ```--entry``` | Path to project source entry point file | ```-e src/app.js```
```-p```, ```--port``` | Port for Codecrumbs client (optional, default *2018*) | ```-p 2019```
45
+
```-n```, ```--projectName``` | Project name alias (optional, default same as ```-d``` value) | ```-n my-hello-world```
46
+
```-f```, ```--parserFallback``` | AST parser fallback, applicable only for JavaScript project, use it when @babel-parse fails (optional, default *false*) | ```-f true```
51
47
52
48
## Features
53
-
#### Breadcrumbs
54
-
Write ```//cc:here is breadcrumb``` to put a simple breadcrumb in the code. ```cc``` (stands for "codecrumb") is the prefix which used by the parser, and ```here is breadcrumb``` is a title of our first breadcrumb.
55
-
> Note: current version supports single line comments only.
49
+
#### Breadcrumbs and trail of breadcrumbs
50
+
Leave breadcrumb in code by writing down a comment: ```//cc:[parameters;]```.
51
+
52
+
```cc``` (stands for "CodeCrumb") is a prefix which used by the parser; check example of parameters in the table below:
53
+
54
+
Example | Description | Use case
55
+
--- | --- | ---
56
+
```//cc:remember place``` | simple breadcrumb, ```remember place``` is a title of our first breadcrumb | Mark an important place to not forget where it was
57
+
```//cc:here is bug;well, seems like a bug in logic``` | simple breadcrumb, ```well, seems like a bug in logic``` is details for breadcrumb, separated by ```;``` | Add extra information, will be rendered in popups
58
+
```//cc:signin#3;enable route``` | trail of breadcrumbs,```signin``` is the **trail ID**, ```#3``` is order **number of step**, ```enable route``` is a title describing the step. | A sequence of codecrumbs, use to describe some data flow (e.g. user login, or form submit, etc.).
59
+
```//cc:signin#1;firebase sign in;+2;do call to firebase with credentials``` | trail of breadcrumbs,```+2``` is number of lines to highlight, separated by ```;``` | Use number of lines to highlight the code related to breadcrumb
56
60
57
-
#### Trail of breadcrumbs
58
-
Also, you can create “trail of breadcrumbs” — basically, a sequence of codecrumbs which follow some data flow (e.g. user login, or form submit, etc.).
59
-
To create a codecrumb as part of a trail you write: ```//cc:signin#3;enable route``` where ```signin``` is the **trail ID**, ```#3``` is order **number of step**, ```enable route``` is a title describing the step.
61
+
> Note: current version supports single line comments only.
60
62
61
63
<imgsrc="/docs/live-changes.gif"width="800"/>
62
64
@@ -80,12 +82,12 @@ So let’s say you put together some trail of codecrumbs describing some importa
80
82
The tool (codecrumbs) allows us to learn, document and explain a codebase much faster. The ultimate goal is to have many case studies hosting at [https://codecrumbs.io](https://codecrumbs.io/). **The library of projects "explained with codecrumbs", the place for collaborative learning**. More features around that coming soon, stay tuned.
81
83
82
84
## Support
83
-
Any support is very much appreciated! 👍 😘 ❤️
84
-
85
85
**Sponsors**: contact me if you want to become a sponsor ☺️
86
86
87
87
**Friends**: if you like this project, please, put a :star: or tweet about it. Thanks!
88
88
89
+
Any support is very much appreciated! 👍 😘 ❤️
90
+
89
91
## Contribute
90
92
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the [owner](https://github.com/Bogdan-Lyashenko/) of this repository before making a change. Ideas and suggestions are welcome.
91
93
To start development environment, clone the repo & run:
@@ -96,4 +98,5 @@ yarn && yarn start
96
98
## WIP
97
99
Next features are developing:
98
100
-**eject codecrumbs** - ability to remove all "breadcrumbs" from source code in "one click"
101
+
-**data transferring between cc trail steps**
99
102
-**VS Code extension** - some neat features right inside the code editor. Checkout [the repo here](https://github.com/Bogdan-Lyashenko/vs-code-codecrumbs).
0 commit comments