Forem

Jakub T. Jankiewicz
Jakub T. Jankiewicz

Posted on • Originally published at gist.github.com

4 1

How to get a literally free CDN

  1. Create repo on GitHub where you'll put your files.
  2. Use jsDeliver or statically to get your assets.

Here is repo I'm using:

https://github.com/jcubic/static

And links to files look like this:

I use this when I need static JavaScript files for NPM packages that don't support UMD. If I need to use it on CodePen.

If I have a package like this. I use browserify + uglifyjs:

npm install name
browserify -s name -r name | uglifyjs > name.min.js
Enter fullscreen mode Exit fullscreen mode

Then I can commit the files to git and use them on CodePen.

browserify and uglifyjs I have installed globally:

npm i -g browserify uglify-js
Enter fullscreen mode Exit fullscreen mode

Interesting Browserify plugins that you may use:

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
thisjustin profile image
This Justin

This is a pretty clever and hilarious use of gh. Thanks for sharing 👍

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay