qszhu / nim-leetcode-cmd

1 stars 0 forks source link

build

Warning

Experimental. USE AT YOUR OWN RISK.

在正式比赛中使用的风险未知.

Getting started

$ nlcc
Choose browser [firefox|chrome|edge] (chrome): [Enter]
Browser profile path (/Users/whoami/Library/Application Support/Google/Chrome/Default): [Enter]
Choose language [nimjs|nimwasm|python3]: python3[Enter]
第 132 场双周赛
Starts in: 0 days, 4 hours, 16 minutes, 12 seconds.

Browser profile paths

If you have only one browser profile, just accept the default profile path. Otherwise, find the profile path for the current profile:

Chrome

Edge

Firefox

Commands

$ nlcc help

Code templates

Code templates reside in respective folders in tmpl. Change the templates as needed (i.e. adding imports, code snippets, etc.), but leave the template variables intact.

Editor

Visual Studio Code is hard-coded as the code editor and diff tool at the moment. May be configurable in the future.

Local test (Experimental)

$ cd docker/python3
$ build.bat # windows
$ build.sh # others

Local debug (Experimental)

$ cd docker/python3
$ build.bat # windows
$ build.sh # others

Develop

New language support

Add new implementations of BaseProject to src/projects/. For example Python3Project. Pull requests are welcome.

Cross-compilation for windows

$ brew install zig # OSX
$ ./build.sh

TODO

Firefox Chrome Edge
Mac OS
Windows
Linux

Implementation details