114 Commits

Author SHA1 Message Date
Bogdan Lyashenko
58b6765a71 fix: remove height limit for cc details 2019-05-01 10:33:14 +02:00
Bogdan Lyashenko
bf28e81613 fix: switch namespace on file select 2019-04-21 12:37:04 +02:00
Bogdan Lyashenko
c862b5f657 1.2.13 2019-04-19 18:43:37 +02:00
Bogdan Lyashenko
a4cb4b0107 fix: add selected flow to download list 2019-04-19 18:43:30 +02:00
Bogdan Lyashenko
78221abba4 1.2.12 2019-04-19 18:06:58 +02:00
Bogdan Lyashenko
b37663d17e fix: add blank to links 2019-04-19 18:06:47 +02:00
Bogdan Lyashenko
e063ba4b65 1.2.11 2019-04-19 17:48:22 +02:00
Bogdan Lyashenko
458fbc836b fix: show next added flow 2019-04-19 17:48:18 +02:00
Bogdan Lyashenko
fcedde96bb fix: update link in readme 2019-04-14 20:36:55 +02:00
Bogdan Lyashenko
4cb8f3fc66 Merge branch 'master' of https://github.com/Bogdan-Lyashenko/codecrumbs 2019-04-14 14:07:08 +02:00
Bogdan Lyashenko
eca8898d3b fix: add unique key 2019-04-14 14:06:54 +02:00
Bohdan Liashenko
4e770b7aec Update README.md 2019-04-06 06:29:18 +02:00
Bohdan Liashenko
0a3dea0edb Update README.md 2019-04-06 06:27:08 +02:00
Bogdan Lyashenko
69ccaf85be feat: add dependencies support to TS 2019-04-04 19:56:29 +02:00
Bohdan Liashenko
40ed8505ed Merge pull request #51 from jbcam/add-ts-dependancies-support
feat: added ts dependencies support
2019-04-04 19:54:29 +02:00
Jean Baptiste Camaret
1c8bf6d539 merge master 2019-04-04 15:21:50 +02:00
Jean Baptiste Camaret
fa4712aa34 update post review 2019-04-04 15:08:37 +02:00
Jean Baptiste Camaret
662291458f feat: added ts dependencies support 2019-04-02 08:33:05 +02:00
Bogdan Lyashenko
e8ca1f927b fix: add decorator plugin to ast parser 2019-03-30 20:28:40 +01:00
Bogdan Lyashenko
017d83c060 fix: update version 2019-03-30 20:17:29 +01:00
Bogdan Lyashenko
528fe8bdf1 fix: add decorator plugin to ast parser 2019-03-30 20:16:59 +01:00
Bogdan Lyashenko
c54a1b7abc fix: add decorator plugin to ast parser 2019-03-30 20:07:15 +01:00
Bogdan Lyashenko
b978a7f64e feat: add feature to open file in codeeditor 2019-03-30 11:05:30 +01:00
Bogdan Lyashenko
2ac23c86ea feat: add haskell support 2019-03-26 20:17:37 +01:00
Bogdan Lyashenko
6b56945eb0 fix: languages regex 2019-03-26 20:05:44 +01:00
Bogdan Lyashenko
aca83fae6d fix: update readme 2019-03-25 19:23:48 +01:00
Bogdan Lyashenko
5850ff923f feat: add conenct client on fly 2019-03-24 18:40:29 +01:00
Bogdan Lyashenko
2329d24ce3 feat: add cc filtered in sidebar 2019-03-24 18:07:51 +01:00
Bogdan Lyashenko
8b0cf0b6cf feat: add select of external edge flow 2019-03-24 10:15:39 +01:00
Bogdan Lyashenko
128f88c99d feat: add x flag to cli 2019-03-23 19:13:42 +01:00
Bogdan Lyashenko
261d06cf5a feat: add cc flow edge select 2019-03-23 11:38:44 +01:00
Bogdan Lyashenko
856fd37297 Merge branch 'master' of https://github.com/Bogdan-Lyashenko/codecrumbs 2019-03-21 19:48:46 +01:00
Bogdan Lyashenko
e2a3e6bf05 feat: sort files tree by cc flow 2019-03-21 19:45:38 +01:00
Bohdan Liashenko
0732382216 Merge pull request #44 from pyjarrett/master
Clarifies required usage of relative paths as arguments.
2019-03-14 07:45:58 +01:00
Paul Jarrett
0ae080130b Clarifies required usage of relative paths as arguments. 2019-03-13 21:40:47 -04:00
Bogdan Lyashenko
fe12874400 fix: calc scroll position 2019-03-13 18:18:58 +01:00
Bogdan Lyashenko
4e6aa1dc93 build: version update 2019-03-10 18:28:54 +01:00
Bogdan Lyashenko
20fbd97b01 feat: hide unsupported features per lanaguage 2019-03-10 17:50:57 +01:00
Bogdan Lyashenko
94eea071b6 fix: update readme 2019-02-27 19:30:14 +01:00
Bogdan Lyashenko
d9e50dc4f9 feat: add fortran support 2019-02-27 19:26:15 +01:00
Bogdan Lyashenko
3b29dd616c fix: increase socket msg size 2019-02-26 19:54:47 +01:00
Bogdan Lyashenko
1a61830d7a fix: update readme 2019-02-25 21:03:18 +01:00
Bogdan Lyashenko
7c3f88c2bf feat: add csharp, kotlin, ruby 2019-02-25 21:00:27 +01:00
Bogdan Lyashenko
50da3e9504 feat: add setup logs 2019-02-25 20:17:17 +01:00
Bogdan Lyashenko
772010458c fix: change cli readme 2019-02-23 19:46:35 +01:00
Bogdan Lyashenko
6205c26675 fix: filter node_module, change parser for js 2019-02-23 09:52:58 +01:00
Bohdan Liashenko
6712ea9ad8 Add backers 2019-02-20 20:30:21 +01:00
Bohdan Liashenko
41ece67739 Merge pull request #23 from 0xflotus/patch-1
fixed yarn command
2019-02-20 07:47:25 +01:00
0xflotus
268837a62f fixed yarn command 2019-02-20 03:22:55 +01:00
Bohdan Liashenko
512c3ae318 Update README.md 2019-02-19 19:58:42 +01:00
Bogdan Lyashenko
27d1ef6c9b feat: add image for dev 2019-02-18 21:38:18 +01:00
Bogdan Lyashenko
18fe23f92f Merge branch 'master' of https://github.com/Bogdan-Lyashenko/codecrumbs 2019-02-18 20:48:53 +01:00
Bogdan Lyashenko
8f7676a36c fix: readme chanegs 2019-02-18 20:48:35 +01:00
Bohdan Liashenko
e4be7ef344 Update README.md 2019-02-17 21:51:25 +01:00
Bogdan Lyashenko
aa518b9eab feat: version update 2019-02-16 19:57:05 +01:00
Bogdan Lyashenko
0155b855de fix: add flow to readme 2019-02-16 19:47:02 +01:00
Bogdan Lyashenko
1af5427db4 feat: case studies 2019-02-16 16:54:18 +01:00
Bogdan Lyashenko
9ac59e5e72 feat: add dep ui 2019-02-16 16:46:58 +01:00
Bogdan Lyashenko
c43caa8a00 fix: cc ui explained 2019-02-16 16:24:45 +01:00
Bogdan Lyashenko
aff1da2fe4 fix: cc ui explained 2019-02-16 16:24:40 +01:00
Bogdan Lyashenko
e8f5d8a663 fix: add donate to readme 2019-02-16 15:59:22 +01:00
Bohdan Liashenko
f3bd318635 Update README.md 2019-02-16 14:55:14 +01:00
Bogdan Lyashenko
9e965e1799 fix: twitter url 2019-02-16 09:39:07 +01:00
Bogdan Lyashenko
9b5a6191d6 fix: twitter url 2019-02-16 09:30:09 +01:00
Bogdan Lyashenko
8f2939d958 feat: add logo 2019-02-16 09:25:16 +01:00
Bogdan Lyashenko
33b484a405 feat: add logo 2019-02-16 09:07:16 +01:00
Bogdan Lyashenko
62ffdc3ab6 fix: metadata for download feat 2019-02-15 19:45:48 +01:00
Bogdan Lyashenko
7373e083a1 fix: path starting from rel symbols 2019-02-15 19:27:15 +01:00
Bogdan Lyashenko
57e7da6068 fix: version update 2019-02-15 18:25:22 +01:00
Bogdan Lyashenko
b34aca68ec fix: pth separator 2019-02-15 18:24:31 +01:00
Bogdan Lyashenko
3c65ba210f fix: readme 2019-02-13 20:45:27 +01:00
Bogdan Lyashenko
fb0974b0ff fix: readme 2019-02-13 20:42:01 +01:00
Bogdan Lyashenko
6bcf4ef96e fix: readme 2019-02-13 20:28:20 +01:00
Bogdan Lyashenko
aab750f93b fix: standalone json 2019-02-12 20:39:31 +01:00
Bogdan Lyashenko
167f119163 feat: add path validation 2019-02-12 20:15:11 +01:00
Bogdan Lyashenko
e1b9dd6dc6 fix: font for cross platform 2019-02-12 19:52:34 +01:00
Bogdan Lyashenko
3d581e6ed2 fix: dep paths for windows 2019-02-12 19:21:23 +01:00
Bogdan Lyashenko
95651a9d12 fix: empty path fail 2019-02-11 20:27:29 +01:00
Bogdan Lyashenko
7490bf3ea1 fix: separator per platform for paths 2019-02-11 20:15:41 +01:00
Bogdan Lyashenko
3c2a6f76cc fix: update readme 2019-02-10 20:30:46 +01:00
Bohdan Liashenko
62a0deba57 Update readme 2019-02-10 19:06:46 +01:00
Bogdan Lyashenko
bcb581af03 fix: hide menu for mobile 2019-02-10 15:52:19 +01:00
Bogdan Lyashenko
78da65706d feat: add parsr fallbacl for js 2019-02-10 15:35:59 +01:00
Bogdan Lyashenko
8155ed3207 feat: finish multi lnaguage support 2019-02-09 21:13:41 +01:00
Bogdan Lyashenko
eed383522b fix: icons per file 2019-02-09 10:36:09 +01:00
Bogdan Lyashenko
55068ca6ca feat: pass language to code components 2019-02-08 21:38:04 +01:00
Bogdan Lyashenko
0fee30ab26 feat: add multi language parse, python case 2019-02-08 20:58:56 +01:00
Bogdan Lyashenko
f820124db9 fix: loading position for tree diagrams 2019-02-07 20:27:41 +01:00
Bogdan Lyashenko
0428ba5e5c feat: multy language support 2019-02-07 20:20:19 +01:00
Bogdan Lyashenko
3ff09c65fc feat: add details renderinf for cc 2019-02-04 20:28:05 +01:00
Bogdan Lyashenko
b09c41c353 fix: dependencies file code load 2019-02-03 11:24:46 +01:00
Bogdan Lyashenko
d9f48330f2 fix: standalone file code 2019-02-03 10:56:00 +01:00
Bogdan Lyashenko
c97c2e93c6 fix: reset databus on upload store 2019-02-02 19:25:09 +01:00
Bogdan Lyashenko
205176caab fix: path for client 2019-02-02 18:53:26 +01:00
Bogdan Lyashenko
c62cb76347 feat: version update 2019-02-02 18:19:18 +01:00
Bogdan Lyashenko
a85eba776a fix: add multi-codebase to readme 2019-02-02 18:06:35 +01:00
Bogdan Lyashenko
95282552a5 feat: add footer info 2019-02-02 17:36:30 +01:00
Bogdan Lyashenko
93c584efc7 fix: multiple file changes, replace watcher 2019-02-02 17:03:22 +01:00
Bogdan Lyashenko
b7f16f31d9 feat: add external edges for codecrumbs 2019-02-02 11:40:51 +01:00
Bogdan Lyashenko
012d8c81f5 fix: pretty print server example 2019-01-29 20:44:36 +01:00
Bogdan Lyashenko
b4c03fc922 fix: upload gif 2019-01-29 20:39:48 +01:00
Bogdan Lyashenko
3d2ff24531 feat: add standalone placeholder 2019-01-29 20:36:58 +01:00
Bogdan Lyashenko
9d56f4a1b2 feat: update readme 2019-01-29 19:30:07 +01:00
Bogdan Lyashenko
fcc726046b feat: update readme 2019-01-29 19:29:44 +01:00
Bogdan Lyashenko
a0f06ac704 feat: update readme 2019-01-29 19:28:36 +01:00
Bogdan Lyashenko
4542021a34 feat: update readme 2019-01-29 19:27:19 +01:00
Bogdan Lyashenko
b32cb1eede feat: update readme 2019-01-28 20:29:19 +01:00
Bogdan Lyashenko
b41d1b1309 feat: update readme 2019-01-28 20:28:31 +01:00
Bogdan Lyashenko
fe9bda3ab0 feat: update readme 2019-01-28 20:26:34 +01:00
Bogdan Lyashenko
6cc5f311fc fix: layout 2019-01-26 17:43:18 +01:00
Bogdan Lyashenko
4d6529d6d1 feat: add second namespace 2019-01-26 17:19:19 +01:00
Bogdan Lyashenko
97fa10fc55 fix: set active folders on select node 2019-01-26 16:24:30 +01:00
Bogdan Lyashenko
e0adf39626 feat: add scrollable container for namespaces 2019-01-26 15:49:56 +01:00
Bogdan Lyashenko
d4b27cf545 feat: add multiple diagrams 2019-01-25 18:20:03 +01:00
219 changed files with 6545 additions and 49562 deletions

173
README.md
View File

@@ -1,48 +1,155 @@
# codecrumbs [active development phase, stay tuned!] [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Leave%20breadcrumbs%20in%20source%20code%20with%20codecrumbs%20tool%20&url=https://github.com/Bogdan-Lyashenko/codecrumbs&via=bliashenko&hashtags=javascript,code)
[![npm version](https://badge.fury.io/js/codecrumbs.svg)](https://badge.fury.io/js/codecrumbs) [![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) [<img src="https://img.shields.io/twitter/follow/bliashenko.svg?label=Stay%20Tuned&style=social">](https://twitter.com/bliashenko)
[![npm version](https://badge.fury.io/js/codecrumbs.svg)](https://badge.fury.io/js/codecrumbs)
<p align="center">
<img src="/docs/logo-sm.png" width="250"/>
</p>
Leave "breadcrumbs" in source code via comments to find your way out from code maze.
> Still much work to do, but the basic features are already implemented and are ready to use. Give it a try while I am finishing a few more big features. Ideas and improvements are welcome. Thanks.
<h3 align="center">
<a href="#what">What</a>
<span> · </span>
<a href="#demo">Demo</a>
<span> · </span>
<a href="#get-started">Get started</a>
<span> · </span>
<a href="#features">Features</a>
<span> · </span>
<a href="#case-studies">Case studies</a>
<span> · </span>
<a href="#support">Support</a>
</h3>
## [Demo](https://codecrumbs.io/)
Check out [**standalone version here**](https://codecrumbs.io/) with defined trail of codecrumbs.
## What
> **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.
>
>**How it works?** You run `codecrumbs` command for a codebase, it analyzes source code and builds its visual representation. Write down a codecrumb-comment and codebase state will be reflected by visual client in browser on the fly.
>
>-[@bliashenko](https://twitter.com/bliashenko)
## Demo
Check out the example of [**standalone version running here**](https://codecrumbs.io/#showcase=todo-react-redux).
[<img src="/docs/codecrumbs-ui.png" width="800">](https://codecrumbs.io/)
<img src="/docs/main-ui-2.png" width="100%"/>
## Get started
Install ```codecrumbs``` globally or in ```devDependencies```:
```yarn add codecrumbs -D```
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.
```javascript
// package.json
...
"scripts": {
"start:cc": "codecrumbs -e src/index.js -d src"
}
```
Run ```yarn start:cc``` from the terminal. Go to [http://localhost:2018/#](http://localhost:2018/#) in the browser to check it out.
## Breadcrumbs
> Leave breadcrumbs by simply putting a comment in code, diagram wil be updated on the fly!
### Install and run
>Pre-condition: update/install `NodeJS` version to be >= *8.11.1*
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.
1) Install ```codecrumbs``` globally (```yarn global add codecrumbs```)
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* .
3) Go to [http://localhost:2018](http://localhost:2018/#) in the browser to check it out.
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.).
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.
### CLI
Parameter | Description | Example
--- | --- | ---
```-d```, ```--dir``` | Relative path to project source code directory | ```-d src```
```-e```, ```--entry``` | Relative path to project source entry point file (must be inside ```dir```) | ```-e src/app.js```
```-x```, ```--excludeDir``` | Relative path(or paths separated by ```,```) to directories for exclusion | ```-x src/doc,src/thirdparty```
```-p```, ```--port``` | Port for Codecrumbs client (optional, default *2018*) | ```-p 2019```
```-n```, ```--projectName``` | Project name alias (optional, default same as ```-d``` value) | ```-n my-hello-world```
## Features
### Breadcrumbs and trails
<img src="/docs/cc-ui-2.png" width="750"/>
UI explained:
- enable "Codecrumbs" switch to have codecrumbs tree on the scheme (drop-down contains extra configuration)
- choose "current" codecrumbs trail to display (can be either trail or all other "simple" codecrumbs)
- select connection between two steps (code for two codecrumbs will be opened in "Sidebar" under "Crumbs" tab)
- set other options in dropdowns to configure behaviour of the diagram
**How to get there?**
Leave breadcrumb in code by writing down a comment: ```//cc:[parameters;]```.
```cc``` (stands for "CodeCrumb") is a prefix which used by the parser; check example of parameters in the table below:
<img src="/docs/live-changes.gif" width="800">
Example | Description | Use case
--- | --- | ---
```//cc:remember place``` | simple breadcrumb, ```remember place``` is a title of our first breadcrumb | Mark an important place to not forget where it was
```//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
```//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.).
```//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
Check out [the introduction article here](https://itnext.io/how-to-navigate-the-maze-of-javascript-code-541250447cbb) for more details.
> Note: current version supports single line comments only.
### Multi-codebase integration
You might be interested to study connections between several codebases (sub-modules), codecrumbs supports that.
Simply start codecrumbs multiple times (once for each codebase), it all **will be synced in one picture** inside the browser tab. To control a diagram UI - select it by clicking on it.
## Learn and share your knowledge
So lets say you put together some trail of codecrumbs describing some important flow inside the project. How you can share it with others? Simply download the json file of codecrumbs store, send it to the friend, he/she uploads it to the codecrumbs and can see same you just saw!
<img src="/docs/share-knowledge.gif" width="800">
E.g. for client-server application, go to the source directory for your server code and run `codecrumbs -e your-server-src/index.py -d your-server-src`, same for client `codecrumbs -e src-client/index.js -d src-client`.
> **Note:** codebases can be located wherever you want (**no** need to have them like mono-repo, etc.), simply run `codecrumbs` for directory you need.
<img src="/docs/multi-codebase-cc.png" width="100%"/>
### Multi-language support
Current version supports next programming languages:
- `JavaScript`
- `TypeScript`
- `Python`
- `Ruby`
- `PHP`
- `Java`
- `Kotlin`
- `C++`
- `C#`
- `Fortran`
- `Haskell`
Please file an issue to support other language you would like to have.
### Download & Upload (learn andshare your knowledge)
You can take a snapshot of application state at any point of time and share it with others. Simply download the json file of codecrumbs store (*top-right corner, "setup -> download"*). This json file can be then uploaded to codecrumbs (*top-right corner, "setup -> upload"*) to represent exactly same picture, even without having that project locally!
<img src="/docs/upload-feature-2.gif" width="100%"/>
### Dependencies
> Note: In current version only [JavaScript, TypeScript] offer this feature
<img src="/docs/dep-ui-2.png" width="100%"/>
UI explained:
- enable "Dependencies" switch
- select connection between modules (all involved files will be opened in "Sidebar", so you can see “what is imported” and “its implementation”)
### Flowchart
> Note: In current version only JavaScript offers this feature
<img src="/docs/flow-ui.png" width="100%"/>
[js2flowchart](https://github.com/Bogdan-Lyashenko/js-code-to-svg-flowchart) is used in the sidebar to draw flowchart for the selected file code.
## Case studies
The tool (codecrumbs) allows us to learn, document and explain a codebase much faster. Also, with *Download & Upload* feature it becomes super easy to collect and share your "investigation results".
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.
## Support
Any support is very much appreciated! 👍 😘 ❤️
If you like this project, please, **put a :star: and tweet about it**. Thanks!
If you like this project and believe it makes sense, please, put a :star: or tweet about it - it will show your support and motivate me :punch:. Thanks!
Please, consider [making financial donation](https://opencollective.com/codecrumbs), it will help further development of more cool features! We'll thank you by including your name/company logo here ☺️. Feel free to [ping me](https://www.linkedin.com/in/bohdan-liashenko-bb365854/) for discussion.
<a href="https://opencollective.com/codecrumbs/donate" target="_blank">
<img src="https://opencollective.com/codecrumbs/donate/button@2x.png?color=blue" width=300 />
</a>
#### Backers
<a href="https://opencollective.com/codecrumbs/backer/0/website" target="_blank"><img src="https://opencollective.com/codecrumbs/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/codecrumbs/backer/1/website" target="_blank"><img src="https://opencollective.com/codecrumbs/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/codecrumbs/sponsor/0/website" target="_blank"><img src="https://opencollective.com/codecrumbs/sponsor/0/avatar.svg"></a>
## Contribute
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.
To start development environment, clone the repo & run:
```javascript
yarn && yarn start
```
## WIP
Next features are developing:
- **eject codecrumbs** - ability to remove all "breadcrumbs" from source code in "one click"
- **data transferring between cc trail steps**
- **VS Code extension** - some neat features right inside the code editor. Checkout [the repo here](https://github.com/Bogdan-Lyashenko/vs-code-codecrumbs).

View File

@@ -6,16 +6,22 @@ const colors = require('colors');
const server = require('../src/server');
program
.option('-e, --entry [entryFile]', 'Specify path to entry point file. E.g. `./src/app.js`')
.option('-d, --dir [projectDir]', 'Specify path to project source code directory. E.g. `./src`')
.option('-e, --entry [entryFile]', 'Specify path to entry point file. E.g. `src/app.js`')
.option(
'-d, --dir [projectDir]',
'Specify path to project source code directory. E.g. `src`',
''
)
.option(
'-w, --webpack [webpackConfigFile]',
'Specify path to webpack config file. E.g. ./webpack.config.js'
'Specify path to webpack config file. E.g. webpack.config.js'
)
.option('-p, --port [defaultPort]', 'Specify port for Codecrumbs client. E.g. 3333', 2018)
.option('-x, --excludeDir [excludeDirectories]', 'Exclude directories')
.option('-n, --projectName [projectNameAlias]', 'Project name alias')
.parse(process.argv);
if (!program.entry && !program.dir) {
if (!program.entry || !program.dir) {
console.log(
colors.magenta(
'Please specify `entry` and `dir` params. E.g. `codecrumbs -e src/app.js -d src`'
@@ -26,11 +32,12 @@ if (!program.entry && !program.dir) {
server.setup(
{
projectNameAlias: undefined, // TODO: add param for this
projectNameAlias: program.projectName,
entryPoint: program.entry,
projectDir: program.dir,
webpackConfigPath: program.webpack,
clientPort: program.port
clientPort: program.port,
excludeDir: program.excludeDir
},
false
);

BIN
docs/cc-ui-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

BIN
docs/dep-ui-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
docs/dev.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
docs/flow-ui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

BIN
docs/logo-sm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
docs/main-ui-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
docs/multi-codebase-cc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

BIN
docs/upload-feature-2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

@@ -0,0 +1 @@
//cc:debug#0;step 0

View File

@@ -0,0 +1 @@
//cc:debug#2;step 2

View File

@@ -0,0 +1,3 @@
//cc:debug#4;step 4
//cc:debug#1;step 1

View File

@@ -0,0 +1 @@
//cc:debug#3;step 3

View File

View File

View File

View File

@@ -0,0 +1,9 @@
#include <iostream>
using namespace std;
// cc:main function
int main()
{
cout << "Hello, World!";
return 0;
}

View File

@@ -0,0 +1,16 @@
// cc:main function
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
}
}

View File

@@ -0,0 +1,4 @@
! cc: main function
program hello
print *, "Hello World!"
end program hello

View File

@@ -0,0 +1,2 @@
-- cc:main function
putStrLn "Hello, world!"

View File

@@ -0,0 +1,9 @@
public class HelloWorld {
// cc: main function
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}

View File

@@ -0,0 +1,4 @@
// cc:main function
function greeting() {
console.log('Hello world!');
}

View File

@@ -0,0 +1,5 @@
// cc:main function
fun main(args : Array<String>) {
println("Hello, World!")
}

View File

@@ -0,0 +1,5 @@
<?php
// cc:main function
echo "Hello World!";
echo "PHP is so easy!";
?>

View File

@@ -0,0 +1,10 @@
import sys
# cc:main function
def main(argv=None):
if argv is None:
argv = sys.argv
print "Hello, world"
return

View File

@@ -0,0 +1,3 @@
# cc:main function
puts 'Hello, world!'

View File

@@ -0,0 +1,4 @@
// cc:main function
function greeting() {
console.log('Hello world!');
}

View File

@@ -10,7 +10,7 @@ import {
function authenticate(provider) {
return dispatch => {
//cc:signin#1;firebase sign in;+2
//cc:signin#1;firebase sign in;+2;call to firebase with auth provider, proceed if success response
firebaseAuth.signInWithPopup(provider)
.then(result => dispatch(signInSuccess(result)))
.catch(error => dispatch(signInError(error)));

View File

@@ -13,7 +13,7 @@ export function authReducer(state = new AuthState(), {payload, type}) {
case INIT_AUTH:
case SIGN_IN_SUCCESS:
return state.merge({
authenticated: !!payload, // cc:signin#2;toggle 'authenticated' flag
authenticated: !!payload, // cc:signin#5;toggle 'authenticated' flag
id: payload ? payload.uid : null
});

View File

@@ -1,3 +1,4 @@
//cc:firebase config
export const firebaseConfig = {
apiKey: 'AIzaSyBsVVpEDrlNPEmshLcmOuE0FxhjPn0AqMg',
authDomain: 'todo-react-redux.firebaseapp.com',

View File

@@ -15,7 +15,7 @@ import App from './views/app';
const store = configureStore();
const rootElement = document.getElementById('root');
//cc:layout#0;start;provider
//cc:layout#0;start
function render(Component) {
ReactDOM.render(
<Provider store={store}>

View File

@@ -1,7 +1,7 @@
import React from 'react';
import { Route, Redirect } from 'react-router-dom'
//cc:signin#3;enable route;+6
//cc:signin#6;enable route;+6
const RequireAuthRoute = ({component: Component, authenticated, ...rest}) => (
<Route
{...rest}

View File

@@ -33,7 +33,7 @@ SignInPage.propTypes = {
//-------------------------------------
const mapDispatchToProps = {
signInWithGithub: authActions.signInWithGithub, //cc:signin#0;dispatch action
signInWithGithub: authActions.signInWithGithub, //cc:signin#0;dispatch action;start signin with github
signInWithGoogle: authActions.signInWithGoogle,
signInWithTwitter: authActions.signInWithTwitter
};

View File

@@ -0,0 +1 @@
code();

View File

Some files were not shown because too many files have changed in this diff Show More