Skip to content

Commit 6af76e2

Browse files
committed
Update README.md and scripts-info, Add ./templates to jest search path
1 parent 64e0ba1 commit 6af76e2

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,31 @@ See wiki for details: https://github.com/source-academy/modules/wiki
1010

1111
1. Install a stable version of [NodeJS](https://nodejs.org/en/). The active LTS or current version should work fine.
1212
2. Install a stable version of [Yarn](https://yarnpkg.com/).
13+
1314
```
1415
$ npm install -g yarn
1516
```
17+
1618
3. Clone this repository and navigate to it in your command line or shell tool.
19+
1720
```
1821
$ git clone https://github.com/source-academy/modules.git
1922
$ cd modules
2023
```
24+
2125
4. Run `yarn install` to install dependencies.
2226

2327
### Serving the Modules' JavaScript Files
2428

2529
1. Run `yarn run build` to transpile the modules' files from `src` folder into `build` folder.
26-
2. Run `yarn serve` to start the http-server on http://localhost:8022 to serve the `.js` files in `build` folder.
30+
2. Run `yarn serve` to start the http-server on http://localhost:8022 to serve all files in the `build` folder with the same directory structure.
2731

2832
### Using with Cadet Frontend
2933

3034
1. Follow the [setup](https://github.com/source-academy/cadet-frontend#getting-started) instructions on Cadet Frontend.
31-
2. When [setting up](https://github.com/source-academy/cadet-frontend#getting-started) the backend configuration of Cadet Frontend, ensure that `REACT_APP_MODULE_BACKEND_URL=http://localhost:8022` from the subsection above.
32-
3. Ensure that you are serving the modules' javascript files in a local server. Refer to the subsection above for instructions.
33-
4. [Start up](https://github.com/source-academy/cadet-frontend#getting-started) the Cadet Frontend local development server to use the served modules.
35+
2. When [setting up](https://github.com/source-academy/cadet-frontend#getting-started) the backend configuration of Cadet Frontend, ensure that `REACT_APP_MODULE_BACKEND_URL=http://localhost:8022` from the subsection above.
36+
3. Ensure that you are serving the modules' javascript files in a local server. Refer to the subsection above for instructions.
37+
4. [Start up](https://github.com/source-academy/cadet-frontend#getting-started) the Cadet Frontend local development server to use the served modules.
3438

3539
## License
3640

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "Check code for errors",
1010
"lint:fix": "Automatically fix lint errors",
1111
"build": "Transpile modules' files from src folder to build folder",
12-
"serve": "Start the http-server to serve .js files in build folder",
12+
"serve": "Start the http-server to serve all files in the build folder with the same directory structure",
1313
"prepare": "Enable git hooks",
1414
"test": "Run unit tests",
1515
"test:watch": "Watch files for changes and rerun tests related to changed files"
@@ -77,8 +77,9 @@
7777
},
7878
"jest": {
7979
"roots": [
80-
"src/bundles",
81-
"src/tabs"
80+
"<rootDir>/src/bundles",
81+
"<rootDir>/src/tabs",
82+
"<rootDir>/templates"
8283
]
8384
}
8485
}

0 commit comments

Comments
 (0)