#!/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