Closed marcelgerber closed 4 years ago
Can you just mention the browser
sub-export using a sentence in the readme? I don't think anyone would discover otherwise.
Just added that note 👍
One last thing, you need to update the files
property in package.json.
Ah, sorry about that. I've never actually published a npm package myself, so I didn't know exactly what that property was for (or how to test if everything works properly!)
(or how to test if everything works properly!)
https://github.com/sindresorhus/np/pull/456 will help with this when merged. And https://github.com/sindresorhus/np/issues/82 even more so.
Fixes #16.
This splits up the code into
filenamify.js
andfilenamify-path.js
, whereindex.js
imports both and provides the export as it is today, so this should not be a breaking change.The user can now also import just
filenamify/filenamify
(can think about a better name maybe) to only get the browser-ready implementation that doesn't rely on Node'spath
.Nothing has changed code-wise, I've just moved things around.