Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bake task regex? #43

Closed
musdy opened this issue Jun 3, 2015 · 1 comment
Closed

Bake task regex? #43

musdy opened this issue Jun 3, 2015 · 1 comment

Comments

@musdy
Copy link

musdy commented Jun 3, 2015

Is there a way to make bake work with a regex and maybe tell it to render into one directory?

Like this:

bake: {
  build: {
    options: {
      basePath: '<%= yeoman.app %>/views/_includes'
    },
    files: {
      '<%= yeoman.app %>/*': '<%= yeoman.app %>/views/_pages/*',
    }
  }
}

Thank you.

@roboshoes
Copy link
Owner

Hi there,

The resolving of the file paths is part of grunt itself, actually. Which is nice, because it allows a streamlined setup across all different plugins.

That being said, may I point you to an older closed issue #25. Grunt allows you to pass in an files-definition-object instead of a key value pair. (Note that this object has to be in an array)
With the use of that object you can define more complicated globbing patterns. That seems to solve what you are looking for actually.

        bake: {
            build: {
                options: {
                    basePath: "<%= yeoman.app %>/views/_includes"
                },
                files: [
                    {
                        expand: true, 
                        cwd: "<%= yeoman.app %>/views/_pages/",   
                        src: [ "**" ],
                        dest: "<%= yeoman.app %>/"
                    }
                ]
            }
        }

Let me know if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants