Skip to content

bobzhang/import-rescript-based-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example using ReScript as a pure js library

index.mjs is a word counting program.

It use the Belt.Map module from ReScript standard library.

You can run it via node ./index.mjs

You can also bundle it into index.bundle.mjs

npx esbuild index.mjs --bundle --platform=node --outfile=index.bundle.mjs --minify-syntax --format=esm

The great thing with Belt.Map libraries is that it is functional and support custom data type.

The experience could be improved in the future, e.g, generating typescript declarations.

About

An example to show JS users can use Rescript based library without using ReScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published