Skip to content

Commit

Permalink
typescript: add build script to post-process
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed Oct 30, 2024
1 parent 8c0380f commit ea0ac7c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/clkinfostopw/clkinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@
}
]
};
}); // FIXME: semi-colon added automatically when Typescript generates Javascript file?
})
21 changes: 21 additions & 0 deletions typescript/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

set -e

usage(){
echo >&2 "Usage: $0"
exit 2
}

if test $# -ne 0
then usage
fi

cd "$(dirname "$0")"

npm run build

find ../apps -iname '*.ts' |
sed 's/\.ts$/.js/' |
grep -E 'clkinfo|setting' |
xargs sed -i '' '$s/;$//'

0 comments on commit ea0ac7c

Please sign in to comment.