dshemendiuk / gulp-npm-dist

Copy minified (dist) files of modules listed in package.json "dependencies" field to your build path
26 stars 3 forks source link

Does not work with nouislider package #2

Closed ondrique closed 6 years ago

ondrique commented 6 years ago

Hi,

thanks for the great plugin.

I am using it on a second project and encountered an issue today with usage with nouislider.

Error I get is:

{ Error: ENOENT: no such file or directory, scandir 'D:\xampp7\htdocs\template_clothes\node_modules\nouislider\dist'
    at Error (native)
    at Object.fs.readdirSync (fs.js:953:18)
    at readLibFilesRecursively (D:\xampp7\htdocs\template_clothes\node_modules\gulp-npm-dist\index.js:63:12)
    at module.exports (D:\xampp7\htdocs\template_clothes\node_modules\gulp-npm-dist\index.js:75:5)

...

The problem IMO is as follows:

After changing line 49 to distFolderPos = mainFile.lastIndexOf('/dist/');, it works as expected. (not sure if it does not mess other stuff up, though)

Cheers,

Ondrej

dshemendiuk commented 6 years ago

You are right. I've added this fix to 0.1.6 version.

Thank you, @ondrique!

ondrique commented 6 years ago

Thank you!