forked from cross-seed/cross-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Writing code | ||
|
||
1. Download VS Code. it has typescript support out of the box, but any ide will | ||
do. recommend downloading a typescript plugin if needed | ||
2. clone repo | ||
3. open repo in vs code | ||
4. run npm install | ||
5. start coding :) | ||
|
||
the code is in /src cmd.js is the entrypoint pipeline.js is the interesting high | ||
level functions (doRss, etc...) | ||
|
||
# Build and Run | ||
|
||
`npm run build` will compile the typescript files into javascript files in /dist | ||
`npm run watch` will compile, then incrementally compile when files change the | ||
`cross-seed` command is an alias for `node dist/cmd.js`, as in | ||
`node dist/cmd.js daemon` but it's annoying to use the cross-seed alias while | ||
developing so i use a lot of ctrl-R with fzf | ||
|
||
# Testing | ||
|
||
I keep a `config.js` that points to | ||
`{ torrentDir: "./input", outputDir: "./output" }` and put some torrent files in | ||
`./input` I usually run in search mode because it's the simplest form of | ||
cross-seed and most work applies to it. | ||
|
||
## testing daemon mode | ||
|
||
have three terminals open, one for npm run watch, one for keeping the cross-seed | ||
daemon open, and one for curling to localhost:2468 | ||
|
||
## testing direct injection | ||
|
||
mostly i stick with `--save` (the default i think) usually i use docker to run | ||
whichever client. you could install it yourself though I have a gitignored | ||
docker_compose.yml that keeps track of all of the clients but i only run them | ||
one at a time |