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 8833233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:43:52+00:00 2026-06-14T08:43:52+00:00

Not sure if I’m missing something but I have the following grunt setup for

  • 0

Not sure if I’m missing something but I have the following grunt setup for grunt-contrib-copy tasks.

copy: {
  build: {
    files: {
      "server-dist/": "server/**/*.!(coffee)",
      "client-dist/": "client/**/*.!(coffee)"
    }
  }
}

The client-dist copies as I expect recursively running through the file tree but the server-dist all sub-folders get flattened to the base folder. Any ideas why this is happening? Here is the i/o

server/
  views/
    errors/
      404.jade
    layouts/
      base.jade

becomes

server/
  errors/
  layouts/
    base.jade

the views folder gets completely blown out. One more thing…when I removed !(coffee) it works but I need to exclude coffee files since I have a grunt-coffee watch task running.

  • 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-14T08:43:54+00:00Added an answer on June 14, 2026 at 8:43 am

    Apparently the grunt-contrib-copy task has a sophisticated logic that’s trying to automatically detect the base directory for copying source files (see related issue)

    The solution is to explicitly specify the basePath option:

    copy: {
      build: {
        files: {
          "server-dist/": "server/**/*!(.coffee)"
        },
        options: {
          basePath: 'server' // base directory in the source path
        }
      }
    }
    

    P.S. I’m not sure, however, why removing !(.coffee) changes the behaviour for you. I tried the same on my local machine and get the same results when specifying "server/**/*" instead of "server/**/*.!(coffee)" (i.e. the views folder is skipped)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

not sure what i'm missing, but here ti go's: i have a floating left
Not sure if I worded this correctly ... but I have the following code:
Not sure if im just being stupid or something but here goes i work
Not sure how to ask this, but i'll give it a try: I have
not sure what I'm missing here, but i keep getting the error. SQLSTATE[HY093]: Invalid
Not sure if this is possible but I have a slideshow on my site
Not sure entirely what is happening, but I get the following errors from Internet
Not sure what parallel programing means... but I have two thoughts of that Process
Not sure if this is possible in Python, but I'd like to have an
Not sure if I can word this right but here we go. I have

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.