Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9192585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:57:38+00:00 2026-06-17T20:57:38+00:00

I need to scan and compile a nested templates folder when the server starts.

  • 0

I need to scan and compile a nested templates folder when the server starts. For that I’m using ember-skeleton. The following routine in Assetfile does well the job of scanning and compiling handlebars file as long as they are all in the templates folder.

  match 'templates/**/*.handlebars' do
    filter HandlebarsFilter
    filter TemplateFilter,
    #filter LoaderFilter,
      :module_id_generator => proc { |input|
        #input.path.sub(/^templates\//, "#{APPNAME}/~templates/").sub(/\.handlebars$/, '')
        input.path.sub(/^templates\//, "").sub(/\.handlebars$/, '')
      }
    if ENV['RAKEP_MODE'] == 'production'
      uglify {|input| input}
    end
    concat 'app.js'
  end

My list of file is getting larget by the ay and I want to classify files into folders such as

templates/products/
templates/products/index.handlebars
templates/products/new.handlebars                  
templates/products/edit.handlebars                  

templates/files/
templates/files/index.handlebars
templates/files/new.handlebars
templates/files/edit.handlebars                  

I want to modify the code listed above to be able to scan for handlebars files one level deeper, and execute the filter against the entries. This should be quite easy for someone who’s acquainted with Ruby or Rails.

I tried with no luck the following, Also anyone can tell me how to debug such a routine, i tried to do a print input within the routine, the server crashed on me though 🙂

  match 'templates/**/**/*.handlebars' do
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:57:39+00:00Added an answer on June 17, 2026 at 8:57 pm

    Turns out match 'templates/**/*.handlebars' do is already taking care of scanning nested folders and there is not need to modify it, all i had to do is reflect the hierarchy in my template name

    templateName: "product/index"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have millions of files in a folder (nested). I need to scan a
I am doing a media file scan using sendBroadcast. Then I need to wait
I need to scan class or jar file that implements or extend a specific
We need to scan files as they are being uploaded using the Symantec AV
I need to write a script to scan ports on server and generate a
I need to scrape a website that has a basic folder system, with folders
I need to scan barcodes in Filemaker 5.5, but the problem is that Filemaker
I need to scan uploaded files for viruses on a Linux server, but I'm
I need to scan all files on our solution (aspx, js, ascx, etc) Our
I'm writing a file manager and need to scan directories and deal with renaming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.