Skip to content

Commit 0315c64

Browse files
committed
Merge branch 'source-academy-master'
2 parents c61779d + b7251af commit 0315c64

30 files changed

+4284
-14833
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@ terraform*
2222
.env.production.local
2323

2424
npm-debug.log*
25-
yarn-debug.log*
26-
yarn-error.log*

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
language: node_js
22
node_js:
33
- 9
4-
cache: yarn
54
branches:
65
except:
76
- /^no-ci.*$/
87
script:
9-
- yarn format:ci
10-
- yarn build-css
11-
- yarn tslint -p .
12-
- yarn test-coveralls
8+
- npm run format:ci
9+
- npm run build
10+
- npm run tslint
11+
- npm run test-coveralls

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,55 @@
55

66
## Development Setup
77

8-
1. Install a stable version of Yarn and NodeJS (use node version 4-9 with nvm).
9-
2. Run `yarn` to install dependencies.
8+
1. Install a stable version of NodeJS (tested: Node 10.15.0).
9+
2. Run `npm install` to install dependencies.
1010
3. Copy the `.env.example` file as `.env` and set the variable `REACT_APP_IVLE_KEY`
1111
to contain your IVLE Lapi key.
12-
4. Run `yarn start` to start the server at `localhost:80`. Admin permissions may
12+
4. Run `npm start` to start the server at `localhost:80`. Admin permissions may
1313
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.
1415

1516
## IVLE LAPI Key
1617
For NUS students, you can access your IVLE LAPI key [here](https://ivle.nus.edu.sg/LAPI/default.aspx).
1718

1819
## For Windows Users
19-
In package.json, change line 19:\
20-
"start-js": "rm -r coverage; BROWSER=none PORT=80 react-scripts-ts start",\
21-
to:\
22-
"start-js": "set PORT=80 & react-scripts-ts start",\
2320

24-
## For Testing of js-slang
21+
### Running cadet-frontend
22+
Run `npm run win-start`
2523

26-
### Alpha version
24+
### Dealing with hooks
25+
In package.json, change line 28:\
26+
"pre-push": "bash scripts/test.sh",\
27+
to an empty line.
2728

28-
Use branch js-slang-alpha-preview to see the new changes (native and verbose errors).
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
2932

30-
Have `"enable verbose";` as the first line of your program to activate verbose messages.
33+
## js-slang
34+
35+
Currently using a version of js-slang with native and verbose errors.
3136

3237
Edit https://github.com/source-academy/cadet-frontend/blob/57ba44f6b55c214d0f20339cd45bece57f24f48c/src/sagas/index.ts#L260
3338

34-
to toggle native.
39+
to toggle native (default is native enabled).
3540

3641
### To run local copy of js-slang
3742

3843
1. Follow the instructions on the js-slang repository to transpile your own copy
39-
2. Edit line 41 of package.json in this project to link to the directory of your js-slang and then run `yarn`:
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`:
4045

4146
`"js-slang": "file:path/to/js-slang",`
4247

4348
Note that this copies your files over, any future changes will not be reflected.
4449

4550
You may try [this](https://medium.com/@alexishevia/the-magic-behind-npm-link-d94dcb3a81af) for a smoother experience.
4651

47-
## For Previewing Local XML Missions Only
52+
## For Editing And Creating New Local XML Missions
4853

49-
1. Use the branch 'mission-testing' in cadet-frontend
50-
2. Run in browser with yarn start
51-
2. Go to Missions page, and upload xml file to preview
54+
1. Use the branch 'mission-editing' in cadet-frontend
55+
2. Run in browser with npm start
56+
2. Go to Incubator tab.
5257

5358
## Application Structure
5459

0 commit comments

Comments
 (0)