Improve README

This commit is contained in:
Tissevert 2022-09-24 21:07:23 +02:00
parent 69a8184f10
commit bc385510f6
1 changed files with 23 additions and 9 deletions

View File

@ -1,5 +1,11 @@
# SJW
- [Usage](#usage)
- Install
+ [How *not* to install](#how-not-to-install)
+ [How to install](#how-to-install)
- [Contributing](#contributing)
The Simple Javascript Wrench is a tool made to "compile" a set of independant
Javascript modules into a single "executable" Javascript file which can then be
loaded and executed by a browser to animate your web pages. Since no conversion
@ -59,7 +65,7 @@ This can be overridden as usual in compilers by using the `-o` (long form
`--output`) option to set the path of the file to create.
```sh
sjw dome/src/ -o main.js
sjw demo/src/ -o main.js
```
Since the web application `SJW` compiles is an executable script, it needs an
@ -68,7 +74,7 @@ of the web application (as is the case in the demo project). The name of the
main module can be set with the `-m` (`--main-is`) option like this:
```sh
sjw demo/src/ -m MyCustomMain.js
sjw demo/src/ -m MyCustomMain
```
Libraries don't require any compilation, they are merely copied until being
@ -231,13 +237,13 @@ $ cabal new-update
$ cabal new-install SJW
```
In that case, since `guix` won't be there to handle your `SJW` libraries
either, you have to handle your libraries yourself. Since no action is needed
on them before compiling a web application, this can be done simply with the
usual shell commands such as `ls`, `cp` or `rm`. Make sure you copy the name
folder and not the modules folder to `~/.sjw` (or `$SJW_PACKAGE_DB`). If for
instance the `myLib` above was distributed in a repository with the following
structure:
As in that case `guix` won't be there to take care of your `SJW` libraries
either, you'll have to handle them yourself. But since no special action is
needed on them before compiling a web application, this requires only the most
simple file-management tools available from your usual shell such as `ls`, `cp`
or `rm`. Make sure you copy the name folder and not the modules folder to
`~/.sjw` (or `$SJW_PACKAGE_DB`). If for instance the `myLib` package above was
distributed in a repository with the following structure:
```sh
ls path/to/myLib
@ -251,3 +257,11 @@ Then in this case `myLib` is simply installed by doing:
```sh
cp -R path/to/myLib/src ~/.sjw/myLib
```
## Contributing
Your contribution is welcome ! Since this is a private forge where you don't
have an account, just send a git patch (see [`git
format-patch`](https://git-scm.com/docs/git-format-patch)) to my email address
(look at the author's address of the first commit in the history from your
local clone of this repos).