1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Added taskie configuration & other stuff.

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2019-01-28 06:22:49 +01:00
parent 6dafaf5b9d
commit fc1b5bbc87
19 changed files with 744 additions and 7 deletions

43
bin/nudsl Executable file
View file

@ -0,0 +1,43 @@
#!/usr/bin/env nux-runner
nux.use nudsl
## highlight:: <language> <file>
task.highlight() {
nux.use nux/nuxsh
nux.dsl.process highlight nux.nuxsh.language.def "$2"
}
task.language.show() {
nudsl.language.cache lang.yanglike.def
}
task.plan() {
nuxr.run.subtask "$@"
}
task.plan.compile() {
nux.use nudsl/$1
nudsl.plan lang.$1.def "$2"
}
task.plan.preview() {
nux.use nux/nuxsh
nux.dsl.plan nux.nuxsh.language "$2"
plan="$(nudsl.plan.file "$1" "$2")"
if [ -e "$plan" ]; then
if [ -n "$(which pygmentize)" ]; then
pygmentize -l bash "$plan";
else
cat "$plan";
fi
else
echo "Plan not available"
fi
}
task.run() {
echo "$@"
nudsl.process "lang.yanglike.def" "$2"
}