To start an ITypescript session in the Jupyter notebook, simply run:
its
This command will open the Jupyter dashboard in your default web browser.
The ITypescript kernel can be registered with Jupyter without opening the dashboard. To register the kernel for all users, run:
its --install=global
and for the current user only:
its --install=local
By default, the dashboard lists the notebooks in the current working folder. The
flag --notebook-dir=path/to/another/folder
can be used to open the dashboard
at a different folder:
its --notebook-dir=path/to/another/folder
Also by default, the ITypescript kernel runs a node.js
session in the current
working folder. The flag --ts-working-dir=path/to/another/folder
can be used
to run the node.js
session at a different folder.
It is possible to run one or more scripts at the startup of an ITypescript
session. This can be useful to preload an npm
package (e.g.
d3) or a custom
$$mimer$$
provided by IJavascript kernel.
To preload a script:
its --ts-startup-script=path/to/script.js
For convenience, it is also possible to preload all the Javascript files in a
folder. The execution order is determined by the alphabetical order of their
filenames; for example: 50-package-d3.js
, 60-mimer-d3.js
.
its --ts-startup-script=path/to/folder
Documentation on other flags can be found by running:
its --help
More examples of use can be found on the ITypescript website.