This gist is building eml-parse-js for browser.
Last active
February 15, 2023 05:27
-
-
Save mryhryki/165433a691c73e3dd0f51256d7ece82c to your computer and use it in GitHub Desktop.
Build eml-parse-js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| build-eml-parse.js | |
| node_modules | |
| package-lock.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { parseEml } from "eml-parse-js"; | |
| globalThis.parseEml = (eml) => | |
| new Promise((resolve, reject) => { | |
| parseEml(eml, (err, ReadedEmlJson) => { | |
| if (err != null) { | |
| reject(err); | |
| } else { | |
| resolve(ReadedEmlJson); | |
| } | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "build-eml-parse", | |
| "author": "mryhryki", | |
| "license": "MIT", | |
| "scripts": { | |
| "build": "esbuild --bundle --minify --platform=browser --target=chrome100 --outfile=../../site/app/email/eml-parse-js.js ./index.js" | |
| }, | |
| "dependencies": { | |
| "eml-parse-js": "^1.1.8", | |
| "esbuild": "^0.17.8" | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment