Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
Handlebars js hitting a limit while building a Salesforce static resource?

I am currently working on a project where we are making use of a Salesforce related feature built a while ago (static resource builder). The feature is preparing a static resource zip by:

  • minimalizing it (see the minimalize.bat script below)
  • compressing all java script files
  • zipping the resource

@echo off

call npm install -g handlebars@4.2.0

setlocal EnableDelayedExpansion

set "Filesx=My_Theme1 My_Theme2 My_Theme3"

for %%i in (%Filesx%) do (

  echo %%iset "result="for %%b in (C:\MyProject\src\staticresources%%i\js\templates) do (

  echo %%b

  set "t="

  for /f "delims=" %%q in ('dir /s /b /a:-d %%b') do (

            set "t=!t! %%q"

  )     

  call handlebars !t! -f C:\MyProject\src\staticresources\%%i\js\templates.js -n Some.templates

)

)

@echo on

**Notes: **

  • C:\MyProject\src\staticresources%%i\js\templates\ folders contain multiple .handlebars files
  • there is a set of ANT Migration Tool commands used to execute the .bat, compress and zip processes.

The process was working fine till few weeks ago when the C:\MyProject\src\staticresources\My_Theme3\js\templates folder has been updated with few new .handlebars files. Since then, it looks like the call handlebars !t! -f C:\MyProject\src\staticresources%%i\js\templates.js -n Some.templates command is failing, looking like it hit some limit and the templates.js file cannot be created.

This is purely my guess, but I have no experience with java script or handlebars.

The error that comes up during the compress process: C:\MyProject\src\staticresources\My_Theme3\js\templates.js does not exist.

My question would be, is there any limit we should be aware of, when it comes to js files ? Alternatively, would you have any suggestion on what to be modified in the script to make it work ?

Happy to share more details if required.

Thanks in advance.

My_Theme1 and My_Theme2 are being processed correctly. I tried to remove them from the Filesx from the .bat script, keeping only the affected one (My_Theme3) but the result was similar.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda