diff options
Diffstat (limited to 'doc/developer/js-css.rst')
-rw-r--r-- | doc/developer/js-css.rst | 18 |
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 |