I often use <%= pkg.name %> in my Gruntfile to refer to the project directory in paths.
I just came across a situation where I wanted to do the same in postcss-assets' options. Specifically, I have a config variable slug set in my package.json and want to use it like this:
I often use
<%= pkg.name %>
in my Gruntfile to refer to the project directory in paths.I just came across a situation where I wanted to do the same in postcss-assets' options. Specifically, I have a config variable
slug
set in my package.json and want to use it like this:With this I get a file not found or unreadable error. It works fine when I hardcode the directory name in basePath.