cdnizer icon indicating copy to clipboard operation
cdnizer copied to clipboard

Using node_modules instead of bower

Open mqueirozcorreia opened this issue 7 years ago • 3 comments

Since bower is recommends in his page migrating to " Yarn and Webpack or Parcel". You guys are looking forward to update the code to not try to find the bower_components folders anymore? Do you want any help on that?

mqueirozcorreia avatar Jan 19 '19 21:01 mqueirozcorreia

Why would I remove the old functionality? It already checks for node_modules at the same time, so there's no reason to not search for old bower configs.

OverZealous avatar Jan 19 '19 22:01 OverZealous

That is true, after looking after code node_module is used!

I was in doubt because of the error message below

Unable to load version from bower.json

			if(!packageInfo.version) {
				throw new Error('Unable to load version from bower.json for package "' + pkg + '".  Looked at:\n    "' + packageFiles.join('",\n    "') + '"');
			}

Do you want any help improving the error message?

mqueirozcorreia avatar Jan 20 '19 22:01 mqueirozcorreia

I'm not sure I care that much, though in theory we could try to look up the node_modules package for the file as well. The only reason you'd see that error is if you provided package in your config, which the manual explains here:

By providing the package name, cdnizer will look up the version string of the currently installed Bower package […]

I'm not interested in spending much time maintaining this library right now, but I'll re-open this task as something to look into in the future when I get more time.

OverZealous avatar Jan 21 '19 15:01 OverZealous