-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Description
Make a version of it that does not need NodeJS but that can be used like that:
<!DOCTYPE html>
<html>
<head>
<script src="binary-parser.js"></script>
</head>
<body>
<script>
const parser = new Parser();
// do stuff with parser
</script>
</body>
</html>I could technically use it like that:
<script type="module">
import { Parser } from "https://cdn.skypack.dev/binary-parser@2.2.1";
const parser = new Parser();
// do stuff with parser
</script>But that forces me to load it from server even if I open html file from my local disk. <script src="binary-parser.js" from the other hand works fine when file is opened locally.
So it would be cool to have version that I can simply load with <script src="binary-parser.js".
Update: Currently I found this hack to use it with <script src="binary-parser.js" :
- Get script from https://cdn.jsdelivr.net/npm/binary-parser@2.2.1/dist/binary_parser.js
- Remove the following lines from the start
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parser = void 0;- Remove the following lines from the end
exports.Parser = Parser;
//# sourceMappingURL=binary_parser.js.mapOr alternatively browserify could be used.
Metadata
Metadata
Assignees
Labels
No labels