Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.75 KB

README.md

File metadata and controls

54 lines (35 loc) · 1.75 KB

Frogasaurus

Frogasaurus is a script for bundling a standalone javascript library into a single file.
I made it because I wanted an easy way to make a library that can be used in any of these ways:

  • Imported with the import keyword.
  • Embedded with a script tag.
  • Run in a terminal with deno run.

I don't intend for anyone to use Frogasaurus other than me...
But you're welcome to have-a-look or try-it if you'd like!

How does it work?

Write your code inside the source folder.
Then use the frogasaurus command in the root folder.

Your bundled project will appear!
Use the -import.js file when importing the project.
Use the -embed.js file when embedding the project.

If you export a function called main...
An extra -standalone.js file will appear, that you can run in the command line with deno.

How do I install it?

Run this command using deno:

deno install --allow-write=. --allow-read=. --reload --force https://deno.land/x/frogasaurus/frogasaurus.js

How do I use it?

Check out the Hello World guide (or other guides).

How do I build it?

If you want to use Frogasaurus, you don't need to build it - just install it.
But if you want to develop Frogasaurus, you need to know this:

Frogasaurus is built with Frogasaurus.
So, if you're developing Frogasaurus, write your code in the source folder.
And then run this command to build it:

frogasaurus --build standalone

Anything else I should know?

Yes! There are many limitations and problems! But it's a secret.