bezoerb / grunt-php2html

Grunt plugin to compile php to html
MIT License
22 stars 4 forks source link

Destination not written because no source files were provided. #11

Closed oninross closed 9 years ago

oninross commented 9 years ago

I have the following in my grunt file but I get the error. This however works on a Windows Platform.

php2html: {
    default: {
        options: {
            // relative links should be renamed from .php to .html
            processLinks: true,
            htmlhint: false
        },
        files: [
            { expand: true, cwd: 'dist/*', src: ['**/*.php'], dest: 'dist/', ext: '.html' }
        ]
    }
}

Any ideas?

oninross commented 9 years ago

Update

It wasn't working in Windows. My bad. I just added in the docroot and a little bit of editing the paths. But still doesnt work on Mac. New error though "Resulting HTML is empty". Only happens in Mac. Windows work great.

php2html: {
    default: {
        options: {
            // relative links should be renamed from .php to .html
            processLinks: true,
            htmlhint: false,
            docroot: 'dist'
        },
        files: [
            { expand: true, cwd: 'dist', src: ['**/*.php'], dest: 'dist', ext: '.html' }
        ]
    }
}

Any ideas?

bezoerb commented 9 years ago

Can you confirm you have php-cgi installed and in your PATH? Try php-cgi --version

oninross commented 9 years ago

Just realized that also. It's working like a charm. My bad. Didnt read the instructions properly.

Thanks though :)