aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-03-24 23:41:52 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-03-24 23:41:52 +0100
commitc05da87ec1039278ae77d3e3b53432614398d8a8 (patch)
tree452c60b09eb00b9738f4673833c5e88215c9539e /doc
parent4425cb797baf29c106922f4d46e9a154f95d3050 (diff)
downloadfietsboek-c05da87ec1039278ae77d3e3b53432614398d8a8.tar.gz
fietsboek-c05da87ec1039278ae77d3e3b53432614398d8a8.tar.bz2
fietsboek-c05da87ec1039278ae77d3e3b53432614398d8a8.zip
move (most of the) JavaScript code to TypeScript
Yay, types! (And a lot of escape hatches)
Diffstat (limited to 'doc')
-rw-r--r--doc/developer/js-css.rst18
1 files changed, 16 insertions, 2 deletions
diff --git a/doc/developer/js-css.rst b/doc/developer/js-css.rst
index 016dab1..3193d58 100644
--- a/doc/developer/js-css.rst
+++ b/doc/developer/js-css.rst
@@ -56,5 +56,19 @@ compile the right SASS files::
Compiling TypeScript
--------------------
-Fietsboek does not *yet* use TypeScript. The JavaScript file
-:file:`fietsboek/static/fietsboek.js` can be edited by hand.
+The TypeScript source is located in :file:`asset-sources`. The
+:file:`tsconfig.json` contains the necessary settings for the TypeScript
+compiler, as such you can simply run ``tsc`` to compile the sources:
+
+.. code-block:: bash
+
+ npx tsc
+ # Alternatively, keep watching for file changes:
+ npx tsc -w
+
+To complement the ``just compile-sass`` command, a ``just compile-typescript``
+command also exists as an alias for ``npx tsc``.
+
+When changing the TypeScript code, you should also run ``eslint``::
+
+ npx eslint asset-sources/fietsboek.ts