These are chat archives for bespokejs/bespoke

Jul 2016
Evan Sosenko
Jul 26 2016 19:10 UTC

@mojavelinux One way to support bower without dist is with

TLDR; remove dist from the repo, but include it in the npm package and serve the package for bower users from that service.

For npm package authors, npmcdn relieves the burden of publishing your code to a CDN in addition to the npm registry. All you need to do is include your UMD build in your npm package (not your repo, that's different!).

You can do this easily using the following setup:

Add the umd (or dist) directory to your .gitignore file
Add the umd directory to your files array in package.json
Use a build script to generate your UMD build in the umd directory when you publish

That's it! Now when you npm publish you'll have a version available on npmcdn as well.