From de5883d0a039390b1f7376e9d943ac15a8666116 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 18 Oct 2016 09:03:46 -0400 Subject: [PATCH] switch to typescript --- build-js.sh | 10 +++++----- contrib/js/neochan/.gitignore | 2 +- contrib/js/neochan/init.coffee.js | 5 ----- contrib/js/neochan/{init.coffee => postform.ts} | 0 contrib/templates/neochan/postform.mustache | 14 +++----------- 5 files changed, 9 insertions(+), 22 deletions(-) delete mode 100644 contrib/js/neochan/init.coffee.js rename contrib/js/neochan/{init.coffee => postform.ts} (100%) diff --git a/build-js.sh b/build-js.sh index c24b0cb..ab7940c 100755 --- a/build-js.sh +++ b/build-js.sh @@ -85,7 +85,7 @@ done if [ "$neochan" == "yes" ] ; then set +e - for exe in lessc coffee ; do + for exe in lessc tsc ; do which $exe &> /dev/null if [ "$?" != "0" ] ; then echo "$exe not installed"; @@ -98,10 +98,10 @@ if [ "$neochan" == "yes" ] ; then echo initfile "$neochan_js_outfile" - for f in ./contrib/js/neochan/*.coffee ; do - echo "compile $f" - coffee -cs < "$f" > "$f.js" - done + + echo "compile typescript" + tsc ./contrib/js/neochan/*.ts + for f in ./contrib/js/neochan/*.js ; do mini "$f" "$neochan_js_outfile" done diff --git a/contrib/js/neochan/.gitignore b/contrib/js/neochan/.gitignore index 5e8935c..4c43fe6 100644 --- a/contrib/js/neochan/.gitignore +++ b/contrib/js/neochan/.gitignore @@ -1 +1 @@ -*.coffee.js \ No newline at end of file +*.js \ No newline at end of file diff --git a/contrib/js/neochan/init.coffee.js b/contrib/js/neochan/init.coffee.js deleted file mode 100644 index 49caa98..0000000 --- a/contrib/js/neochan/init.coffee.js +++ /dev/null @@ -1,5 +0,0 @@ -// Generated by CoffeeScript 1.11.1 -(function() { - - -}).call(this); diff --git a/contrib/js/neochan/init.coffee b/contrib/js/neochan/postform.ts similarity index 100% rename from contrib/js/neochan/init.coffee rename to contrib/js/neochan/postform.ts diff --git a/contrib/templates/neochan/postform.mustache b/contrib/templates/neochan/postform.mustache index f135674..aacee01 100644 --- a/contrib/templates/neochan/postform.mustache +++ b/contrib/templates/neochan/postform.mustache @@ -8,9 +8,9 @@ - files ( bool, do we allow attachments ? ) - csrf ( csrf token ) }} -
+ {{{csrf}}} - +
@@ -32,7 +32,7 @@ @@ -77,14 +77,6 @@ -
- +