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
* update js-slang imports, and use null for empty list
* pass tests
* pass tests
* format all external libraries with prettier
* Update README.md
* update js-slang to version 0.2.0
* update acorn, fix order of imports
* update readme
* unbump enzyme
* just adding compatability with js slang debugger
* overlooked something minor
* pulled in upgrades from wkk
* added primitive inspector features
* enabled the execution of commands in the REPL
* polished inspector output table
now filters builtins, and formats into individual frames
* changed icons according to feedback
* added alert animation for sidecontent icons
* fixed some small issue with alerted icons not turning off
* added multiple features:
1. Breakpoints can now be set from the gutter. 2. When the debugger hits a breakpoint, the last statement to be executed will be highlighted. This will require the modified js-slang from the debugger branch to work.
* minor fix to pass test
* changed highlighting to match new slang
also fixed minor compile blocker that was somehow overlooked
* Basic ENV visualizer integration
* Removed working "console.log"
* added minor cosmetic tweaks
* changed which line was highlighted to suit new model
* filtered some noise from the inspector
also updated to work with newest slang
* updated readme
* moving env visualizer to its own branch
also changed draw_list to draw_data
* Fixed repl error with executing while paused, enabled pausing arbitrarily in any program.
also removed useless files from git mergetool
* prevent inspector dying from undefined context
* fix highlighting issue
* use official js-slang
* fixed spurious output in inspector for things like lists
* fix prettier
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,29 @@ Note that this copies your files over, any future changes will not be reflected.
49
49
50
50
You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af) for a smoother experience.
51
51
52
+
## Inspector
53
+
This requires the use of the `debugger` branch of js-slang to work. Clone both the frontend and the `debugger` slang to the same directory. You would want to `yarn build` the slang you just obtained and then `yarn && sudo yarn start` in the frontend and it should just work. The merge over there is still ongoing. Meanwhile, please try to break this.
54
+
55
+
The mental model we are using is: A breakpoint means that the interpreter will stop right before it. Whatever is highlighted is going to be evaluated next. If you meet any inconsistencies with this, also please raise it up for discussion.
56
+
57
+
### What you can do
58
+
- Set breakpoints by clicking on the gutter
59
+
-`debugger;` just like ECMAScript
60
+
- Inspect!
61
+
- Run stuff in the context of the paused program!
62
+
63
+
### Usage
64
+
Here's what happens: After you click run, if there the interpreter meets a breakpoint, the first thing you're going to notice is that the REPL feedbacks to you it hit a breakpoint, the line is highlighted, and one of the icons on the right pane is going to start blinking. If you click on the icon, it reveals the inspector. All the variables in every frame is exposed here. The REPL is also now in the context of where ever you are. So you can evaluate anything you would normally be able to in the REPL. It is all quite simple really.
65
+
66
+
### Note
67
+
Because we use a local version of `js-slang`, the CI just breaks all the time.
68
+
69
+
## For Editing And Creating New Local XML Missions
70
+
71
+
1. Use the branch 'mission-editing' in cadet-frontend
72
+
2. Run in browser with npm start
73
+
2. Go to Incubator tab.
74
+
52
75
## Application Structure
53
76
54
77
1.`actions` contains action creators, one file per reducer, combined in index.
@@ -64,4 +87,4 @@ You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94
64
87
65
88
## TypeScript Coding Conventions
66
89
67
-
We reference [this guide](https://github.com/piotrwitek/react-redux-typescript-guide).
90
+
We reference [this guide](https://github.com/piotrwitek/react-redux-typescript-guide).
1. Install a stable version of NodeJS (tested: Node 10.15.0).
9
+
2. Run `npm install` to install dependencies.
10
+
3. Copy the `.env.example` file as `.env` and set the variable `REACT_APP_IVLE_KEY`
11
+
to contain your IVLE Lapi key.
12
+
4. Run `npm start` to start the server at `localhost:80`. Admin permissions may
13
+
be required for your OS to serve at port 80.
14
+
5. If running cadet without ngix, `npm run cors-proxy` to solve CORS problems.
15
+
16
+
## IVLE LAPI Key
17
+
For NUS students, you can access your IVLE LAPI key [here](https://ivle.nus.edu.sg/LAPI/default.aspx).
18
+
19
+
## For Windows Users
20
+
21
+
### Running cadet-frontend
22
+
Run `npm run win-start`
23
+
24
+
### Dealing with hooks
25
+
In package.json, change line 28:\
26
+
"pre-push": "bash scripts/test.sh",\
27
+
to an empty line.
28
+
29
+
Please note that doing this will disable the test suite, so you will need to run the tests manually instead. Using Git Bash (or any other UNIX-based command line), run the following:\
30
+
cd scripts\
31
+
bash test.sh
32
+
33
+
## js-slang
34
+
35
+
Currently using a version of js-slang with native and verbose errors.
1. Follow the instructions on the js-slang repository to transpile your own copy
44
+
2. Edit line 41 of package.json in this project to link to the directory of your js-slang and then run `npm install`:
45
+
46
+
`"js-slang": "file:path/to/js-slang",`
47
+
48
+
Note that this copies your files over, any future changes will not be reflected.
49
+
50
+
You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af) for a smoother experience.
51
+
52
+
<<<<<<< HEAD
53
+
## Inspector
54
+
This requires the use of the `debugger` branch of js-slang to work. Clone both the frontend and the `debugger` slang to the same directory. You would want to `yarn build` the slang you just obtained and then `yarn && sudo yarn start` in the frontend and it should just work. The merge over there is still ongoing. Meanwhile, please try to break this.
55
+
56
+
The mental model we are using is: A breakpoint means that the interpreter will stop right before it. Whatever is highlighted is going to be evaluated next. If you meet any inconsistencies with this, also please raise it up for discussion.
57
+
58
+
### What you can do
59
+
- Set breakpoints by clicking on the gutter
60
+
- `debugger;` just like ECMAScript
61
+
- Inspect!
62
+
- Run stuff in the context of the paused program!
63
+
64
+
### Usage
65
+
Here's what happens: After you click run, if there the interpreter meets a breakpoint, the first thing you're going to notice is that the REPL feedbacks to you it hit a breakpoint, the line is highlighted, and one of the icons on the right pane is going to start blinking. If you click on the icon, it reveals the inspector. All the variables in every frame is exposed here. The REPL is also now in the context of where ever you are. So you can evaluate anything you would normally be able to in the REPL. It is all quite simple really.
66
+
67
+
### Note
68
+
Because we use a local version of `js-slang`, the CI just breaks all the time.
69
+
70
+
## For Editing And Creating New Local XML Missions
71
+
72
+
1. Use the branch 'mission-editing' in cadet-frontend
73
+
2. Run in browser with npm start
74
+
2. Go to Incubator tab.
75
+
76
+
=======
77
+
>>>>>>> master
78
+
## Application Structure
79
+
80
+
1. `actions` contains action creators, one file per reducer, combined in index.
81
+
2. `assets` contains static assets.
82
+
3. `components` contains all react components.
83
+
4. `containers` contains HOC that inject react components with Redux state.
84
+
5. `mocks` contains mock data structures for testing
85
+
6. `reducers` contains all Redux reducers and their state, combined in index.
86
+
7. `sagas` contains all Redux sagas, combined in index.
87
+
8. `slang` contains the source interpreter.
88
+
9. `styles` contains all SCSS styles.
89
+
10. `utils` contains utility modules.
90
+
91
+
## TypeScript Coding Conventions
92
+
93
+
We reference [this guide](https://github.com/piotrwitek/react-redux-typescript-guide).
0 commit comments