class_docstr: Builder for a static task, pulls the appropriate html, builds the frontend (if a
  build doesn't already exist), then puts the file into the server directory.
docstr: Build the frontend if it doesn't exist, then copy into the server directory.
docstr_tok: ["Build","the","frontend","if","it","does","n't","exist",",","then","copy","into","the","server","directory","."]
code: def build_in_dir(self, build_dir: str):
      """
      Build the frontend if it doesn't exist, then copy into the server directory.
      """
      # Only build this task if it hasn't already been built
      if True:  # not os.path.exists(FRONTEND_BUILD_DIR):
          self.rebuild_core()
  
      # Copy the built core and the given task file to the target path
      bundle_js_file = os.path.join(
          self.FRONTEND_BUILD_DIR, "bundle.js"
      )
      target_resource_dir = os.path.join(build_dir, "static")
      target_path = os.path.join(target_resource_dir, "bundle.js")
      shutil.copy2(bundle_js_file, target_path)
  
      copied_static_file = os.path.join(
          self.FRONTEND_SOURCE_DIR, "src", "static", "index.html"
      )
      target_path = os.path.join(target_resource_dir, "index.html")
      shutil.copy2(copied_static_file, target_path)
  
      # Write a built file confirmation
      with open(
          os.path.join(build_dir, self.BUILT_FILE), "w+"
      ) as built_file:
          built_file.write(self.BUILT_MESSAGE)
  
file_path: ParlAI/parlai/crowdsourcing/tasks/acute_eval/acute_eval_builder.py
imports: from mephisto.abstractions.blueprint import TaskBuilder
  import os
  import shutil
  import subprocess
label_desc: Use image node_id 2 for calling the AcuteEvalBuilder obj's underlying member method code with example usage: obj.build_in_dir(build_dir) without return types