LongTengDao / j-toml

A Node.js implementation of TOML written by LongTengDao. Belong to "Plan J"./龙腾道为汤小明语写的 Node.js 实现。从属于“简计划”。
https://npmjs.com/package/@ltd/j-toml
GNU Lesser General Public License v3.0
55 stars 6 forks source link

use in browser #9

Closed tans closed 3 years ago

tans commented 3 years ago

need to use toml in browser, so how to build a version for the browser

LongTengDao commented 3 years ago

Hi, here is the dist editions introduction: https://github.com/LongTengDao/j-toml/tree/master/dist

There are 3 edtions you can directly use in browser (if you use es 6 module in nowaday browser world):

Edition Description
dist/ESM/j-toml.js Just the bundled edition.
dist/ESM/j-toml.min.js The edition built as minified bundle.
dist/ESM/j-toml.min.js.gz The gzip file (only if smaller) of the edition built as minified bundle.

Or you need a UMD edtion?

LongTengDao commented 3 years ago

UMD edtion could be easily transform from ESM/j-toml.js. And I released v1.20.0 which begin to contain UMD edtion just now:

Edition Description
dist/UMD/j-toml.js The edition built as UMD (width source mapper inline).
dist/UMD/j-toml.min.js The edition built as minified UMD.
dist/UMD/j-toml.min.js.gz The gzip file (only if smaller) of the edition built as minified UMD.

Hope that would help