I have a grunt plugin sample
/tasks sample.js config.file Gruntfile.js package.json
I want to get the path to config.file inside sample.js. At first I did it like this:
path.resolve('tasks/config.file')
Everything was fine until the plugin was installed. The path to config.file has been changed to '~ / some_project / node_modules / sample_plugin / tasks / config.file', but path.resolve returned '~ / some_project / tasks / config.file'.
How can I get the correct path to config.file?
vogdb source share