Closed rain-sk closed 4 years ago
Moving the example code into a separate folder was done to make the package more "npm-canonical" but is not required.
Hi @spencerudnick, I was just about to do the same. :-)
One thing I noticed is that you added babel as a dev dependency but it seems to be not used. I actually think that's a good idea since the code depends on modern features and transpiling it to ES5 will not really help anyone.
Another thing - that I also just found out now - is that rollup plugins are now distributed under the @rollup scope. https://github.com/rollup/plugins
Hey @chrisguttandin,
Good catch about the dev dependency! I'll update this and the plugin names tonight.
(This was copied from some npm-package boilerplate I keep around).
@chrisguttandin @padenot I updated the dependencies to the latest versions and double-checked that the build script is still running. Have a look when you have time :)
Hi Spence, sorry for being so picky. I wonder why you added crossenv
as a dependency? It was part of a typo squatting attack some time ago. Maybe it's okay to just remove it.
https://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry
Hey Christoph! Just fixed up the "remove unnecessary dependencies" commit. Thanks for helping me clear up my npm package boilerplate ;)
Thanks Spence, I don't have anything else to complain about. :-)
But Paul is the one who ultimately has to push the button.
Spencer, Chris, thank you very much for this! I'm un-breaking the example in another commit, but it's unclear to me if I'm doing it right (the probability is very low, to be honest).
I'll now try to understand a bit more how all this work, and publish it on NPM using the instructions linked.
Thanks again!
/example
folder/build
folderThe
main
andmodule
keys in package.json give npm projects which consume this package information about where the bundled code can be imported from.See: https://alligator.io/workflow/publishing-first-package-to-npm/#and-publish for a quick explanation of how to publish a package to NPM.