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

expand with pug not working #162

Open
mbalandis opened this issue Apr 19, 2016 · 2 comments
Open

expand with pug not working #162

mbalandis opened this issue Apr 19, 2016 · 2 comments

Comments

@mbalandis
Copy link

mbalandis commented Apr 19, 2016

Getting error: Running "pug:compile" (pug) task
Warning: undefined is not a function Use --force to continue.

             config
                    files: {
                    expand: true,
                    cwd: 'pug',
                    src: '**/*.pug',
                    dest: 'dest',
                        ext: '.html'
                 }

after looking at closed cases this seemed to work with jade but I am using jade renamed as pug.
Any ideas? Adding file one by one is tedious.

@RyanParsley
Copy link

I was just noticing that that's not covered in the readme and was hoping the configuration was just overlooked in documentation.

@StephenMcConnel
Copy link

StephenMcConnel commented Feb 16, 2017

The format below works. Note the square brackets -- files is apparently an array object, not a scalar object. The same is true of src.

   files: [ {
      expand: true,
      src: [ 'src/app/modules/**/*.tpl.pug' ],
      dest: 'build/tmp/',
      ext: '.tpl.html'
    } ]

See http://gruntjs.com/configuring-tasks, and search for dynamic src-dest file mappings.

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

3 participants