dolphins7.skeleton/client/nanoc/rules/tasks.rules
0x1eef 2e8cf6e333 Drop 'twenty-' prefix from toplevel directories
The directories twenty-{server,client,cli} have been renamed to
not include 'twenty-'. The gems are still published with the twenty-
prefix, otherwise a collision is impossible to avoid. This commit makes
it slightly easier to generalize twenty.
2024-04-21 20:11:25 -03:00

45 lines
1 KiB
Ruby

#!/usr/bin/env ruby
##
# GET /tasks/new/
compile '/html/react.html.erb', rep: "tasks/new" do
filter(:erb, locals: {src: "/js/main/task/new.js"})
write("/tasks/new/index.html")
end
##
# GET /js/main/task/new.js
compile("/js/main/task/new.tsx") do
filter(:webpack, depend_on: %w[/js/lib/ /js/components/ /js/hooks/ /js/types/])
write("/js/main/task/new.js")
end
##
# GET /
# GET /tasks/
compile("/html/react.html.erb", rep: "tasks/index") do
filter(:erb, locals: {src: "/js/main/tasks.js"})
write("/tasks/index.html")
write("/index.html")
end
##
# GET /js/main/tasks.js
compile("/js/main/tasks.tsx") do
filter(:webpack, depend_on: %w[/js/lib/ /js/components /js/hooks/ /js/types/])
write("/js/main/tasks.js")
end
##
# GET /tasks/edit#id=X
compile("/html/react.html.erb") do
filter(:erb, locals: {src: '/js/main/task/edit.js'})
write("/tasks/edit/index.html")
end
##
# GET /js/main/task/edit.js
compile("/js/main/task/edit.tsx") do
filter(:webpack, depend_on: %w[/js/lib/ /js/components /js/hooks/ /js/types/])
write("/js/main/task/edit.js")
end