2019-07-06 02:35:50 +02:00
|
|
|
|
|
|
|
|
|
package=kanban
|
|
|
|
|
version=0.1
|
|
|
|
|
|
2019-07-07 11:50:32 +02:00
|
|
|
|
targets=(kanband)
|
|
|
|
|
type[kanband]=crystal
|
|
|
|
|
sources[kanband]=src/main.cr
|
|
|
|
|
depends[kanband]="$(ls src/*.cr | grep -v '/main.cr$')"
|
2019-07-06 02:35:50 +02:00
|
|
|
|
|
2019-07-07 11:50:32 +02:00
|
|
|
|
targets+=(main.js)
|
|
|
|
|
type[main.js]=livescript
|
|
|
|
|
sources[main.js]=client/index.ls
|
|
|
|
|
depends[main.js]="$(ls client/*.ls | grep -v /index.ls$ | tr '\n' ' ')"
|
2019-07-06 02:35:50 +02:00
|
|
|
|
|
2019-07-07 11:50:32 +02:00
|
|
|
|
targets+=(style.css)
|
|
|
|
|
type[style.css]=css
|
|
|
|
|
sources[style.css]=client/style.sass
|
2019-07-06 02:35:50 +02:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# implementation details below, bruh~
|
|
|
|
|
# (seriously, don’t read that unless you want to read that)
|
|
|
|
|
# (I mean it, dude)
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
function LSC {
|
|
|
|
|
echo "${fg_bold[blue]} LSC > ${fg_bold[white]}$@${reset_color}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function BUN {
|
|
|
|
|
echo "${fg_bold[green]} BUN > ${fg_bold[white]}$@${reset_color}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function MIN {
|
|
|
|
|
echo "${fg_bold[red]} MIN > ${fg_bold[white]}$@${reset_color}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function CSS {
|
|
|
|
|
echo "${fg_bold[yellow]} CSS > ${fg_bold[white]}$@${reset_color}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function livescript.build {
|
2019-07-07 11:50:32 +02:00
|
|
|
|
write "${target}: ${target%.js}.bundle.js $(dirdep $target)"
|
2019-07-06 02:35:50 +02:00
|
|
|
|
write "\t@echo '$(MIN ${target%.js}.js)'"
|
|
|
|
|
write "\t${Q}npx babel --minified ${target%.js}.bundle.js -o ${target}"
|
|
|
|
|
write "\n"
|
|
|
|
|
|
2019-07-07 11:50:32 +02:00
|
|
|
|
write "${target%.js}.bundle.js: ${sources[$target]} ${depends[$target]} $(dirdep $target)"
|
2019-07-06 02:35:50 +02:00
|
|
|
|
write "\t@echo '$(BUN ${target%.js}.bundle.js)'"
|
|
|
|
|
write "\t${Q}npx browserify -t browserify-livescript ${sources[$target]} -o ${target%.js}.bundle.js"
|
|
|
|
|
write "\n"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function livescript.clean {
|
|
|
|
|
write "${target}.clean:"
|
|
|
|
|
for file in ${target} ${target%.js}.bundle.js; do
|
|
|
|
|
write "\t@echo '$(RM ${file})'"
|
|
|
|
|
write "\t${Q}rm -f ${file}"
|
|
|
|
|
done
|
|
|
|
|
write "\n"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function livescript.install {
|
|
|
|
|
: FIXME
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function livescript.uninstall {
|
|
|
|
|
: FIXME
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function css.build {
|
2019-07-07 11:50:32 +02:00
|
|
|
|
write "${target}: ${sources[$target]} $(dirdep $target)"
|
2019-07-06 02:35:50 +02:00
|
|
|
|
write "\t@echo '$(CSS ${target})'"
|
|
|
|
|
write "\t${Q}sassc ${sources[$target]} > ${target}"
|
|
|
|
|
write "\n"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function css.clean {
|
|
|
|
|
script.clean "$@"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function css.install {
|
|
|
|
|
: FIXME
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function css.uninstall {
|
|
|
|
|
: FIXME
|
|
|
|
|
}
|
|
|
|
|
|