chyingp / grunt-inline

Brings externally referenced resources, such as js, css and images, into a single file.
MIT License
87 stars 55 forks source link

Warning: Arguments to path.join must be strings in v0.3.4 #48

Open jordanmkoncz opened 9 years ago

jordanmkoncz commented 9 years ago

I've run into an issue after updating this module to version 0.3.4. When running a Grunt task that uses the inline plugin, the following warning occurs, and the task is aborted:

Processing templates/email/Source/ContactPageEmail.html...
Warning: Arguments to path.join must be strings Use --force to continue.

Aborted due to warnings.

If I revert to version 0.3.2 of this plugin, the task runs perfectly.

The output with the verbose flag is as follows:

Running "inline" task

Running "inline:main" (inline) task
Verifying property inline.main exists in config...OK
Files: templates/email/Source/ContactPageEmail.html, templates/email/Source/ForgotPasswordEmail.html -> templates/email/Working/
Options: tag="../../../css/email.css"
Options: tag="../../../css/email.css"
Reading templates/email/Source/ContactPageEmail.html...OK
Processing templates/email/Source/ContactPageEmail.html...Reading templates\email\Source\HeaderEmail.htm...OK
Reading themes\main\templates\email\Source\FooterEmail.htm...OK
Reading themes\main\css\email.css...OK

Warning: Arguments to path.join must be strings Use --force to continue.

Aborted due to warnings.

Here's what the inline:main task looks like:

main: {
    options: {
        tag: '../../../css/email.css'
    },
    src: ['templates/email/Source/*.html'],
    dest: ['templates/email/Working/']
}
oradwell commented 9 years ago

I had the same issue with my project. I think src and dest parameters are not arrays any more. Try this:

     options: {
         tag: '../../../css/email.css'
     },
-    src: ['templates/email/Source/*.html'],
-    dest: ['templates/email/Working/']
+    src: 'templates/email/Source/*.html',
+    dest: 'templates/email/Working/'
 }