Closed azz closed 6 years ago
If you want me to keep the change simple (and not support Node.js) I'm happy to do that 😄
If you want me to keep the change simple (and not support Node.js) I'm happy to do that 😄
+1 for supporting node
I noticed there's a copy of the script in the hamlet.html file, I didn't update that. I could change it to pull from unpkg and set up a Rollup UMD bundle if you'd like?
Don't worry about that script. For now I think we should keep it simple and copy paste-able even at the cost of it going slightly out of sync.
With the localize
function exposed now it unlocks, like you mention in https://github.com/tryggvigy/pseudo-localization/issues/3 , to test that string actually are localised and not hard coded. I think there is value in explaining that use-case in the readme. Something similar to the snippet in #3. What do you think? I would do that in a follow up PR once I come up with some good copy.
LGTM! I'll bump the version in package.json and publish.
I split it into two files so the
localize
function will be loadable in Node.js environments which don't haveMutationObserver
.I noticed there's a copy of the script in the
hamlet.html
file, I didn't update that. I could change it to pull fromunpkg
and set up a Rollup UMD bundle if you'd like?Closes #3