DEV Community

Discussion on: Getting started with MojiScript: FizzBuzz (part 1)

 
joelnet profile image
JavaScript Joel

The design decision to create every function as it's own import was made to remove a footgun.

The footgun removed is the ability to import the entire library when you only need a few functions.

This way, the output bundle sir is only as big as the functions you import.

So MojiScript will have a microscopic footprint in your final output bundle because it is no longer possible to import the entire bundle.

Thread Thread
 
jochemstoel profile image
Jochem Stoel

I made a script called mojifier that converts your module into a single object with everything included / proper namespaces by iterating the directories/files.