CMTools is an experimental, proof of concept, set of tools for TypeScript, JavaScript, Python or Go programming projects. It provides a cmt
command line program.
There is an experimental installer.sh script that can be run with the following command to install latest table release. This may work for macOS, Linux and if you’re using Windows with the Unix subsystem. This would be run from your shell (e.g. Terminal on macOS).
curl https://caltechlibrary.github.io/CMTools/installer.sh | sh
This will install cmt
in your $HOME/bin
directory.
If you are running Windows 10 or 11 use the Powershell command below.
irm https://caltechlibrary.github.io/CMTools/installer.ps1 | iex
- Git (to clone the cold repository on GitHub)
- Deno >= 2.1.4
Deno is used to compile the TypeScript and dependent JavaScript files into an executable.
- Install handlebars via Deno
- Use Deno's task to build project
deno install npm:handlebars
deno task build
This will provide the cmt
command in the "bin" folder in your repository directory.
You can check to make sure cmt
works for your system. The compiled version is self contain and can be copied someplace in your path.
mkdir -p $HOME/bin
export PATH="$HOME/bin:$PATH"
cp bin/cmt $HOME/bin/
export MANPATH="$MANPATH:$HOME/man"
cp -vR man $HOME/
mkdir $HOME/bin
$PATH = [Environment]::GetEnvironmentVariable("PATH")
[Environment]::SetEnvironmentVariable("PATH", "$PATH;$HOME/bin")
copy ./bin/cmt.exe $HOME/bin/