diff --git a/README.md b/README.md index ec85abc..05e1034 100644 --- a/README.md +++ b/README.md @@ -7,29 +7,51 @@ This repository contains the lecture materials for Stanford's Language Modeling These are named `lecture_XX.py`. ### Setup - - uv sync - git clone https://github.com/percyliang/edtrace - +``` shell +uv sync +source .venv/bin/activate +``` You can compile a lecture by running: - python execute.py -m lecture_01 +``` shell +python -m edtrace.execute -m lecture_01.py +``` which generates a `var/traces/lecture_01.json` and caches any images as appropriate. -To view it locally: +## To view it locally: + +> [!NOTE] +> The next step assumes you already have Node installed on your the system + +``` shell +# first clone the edtrace repo +git clone https://github.com/percyliang/edtrace + +# install the dependencies for edtrace +npm install --prefix=edtrace/frontend +``` +if you see warnings for vulnerabilities, please run + +``` shell +npm audit fix +``` Load a local server to view at `http://localhost:5173?trace=var/traces/sample.json`: - npm run --prefix=edtrace/frontend dev +``` shell +npm run --prefix=edtrace/frontend dev +``` Deploy to the main website: - - npm run --prefix=edtrace/frontend build - git add assets - git ci -am "" - git push +``` shell +git clone https://github.com/percyliang/edtrace +npm run --prefix=edtrace/frontend build +git add assets +git ci -am "" +git push +``` ## Non-executable lectures diff --git a/package.json b/package.json index 0509904..905968f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "vite": "^8.0.3" + "vite": "^8.0.16" } }