-
Notifications
You must be signed in to change notification settings - Fork 174
Modify the Programming Language
Thomas Tan edited this page May 10, 2021
·
8 revisions
By default, when you install cadet-frontend, npm uses the latest version of js-slang available here. However, you can change the programming language implementation that is used by the Frontend (for example, in the Playground), by giving it a different js-slang distribution, possibly one that you modified.
In order to run your own cadet-frontend development version using your own language implementation, do the following:
- Follow the cadet-frontend Installation README
- Change your frontend if needed; build the frontend if needed
- The app should use the current master copy of
js-slang, automatically put in thenode_modulesfolder/directory bynpm - To modify
js-slang, proceed to installyarn- this must be used to processjs-slanginto a proper TypeScript module - Install
js-slang- preferably in another folder/directory - Change your
js-slangif needed - Build
js-slangusingyarn build - Copy over folder
js-slang/disttocadet-frontend/node_modules/js-slang/dist(replace the old folder entirely)- If you know your way around your system, symlinks and hardlinks may work for you.
- Start frontend as per normal, using
npm start
To change the language implementation in your own production frontend, fork js-slang and use package.json in cadet-frontend to point to your fork.