Skip to content

Commit 98068fa

Browse files
committed
feat(rollup): switch from webpack to rollup for bundling
1 parent b75bcf0 commit 98068fa

File tree

9 files changed

+44
-16463
lines changed

9 files changed

+44
-16463
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ node_modules/
88

99
output
1010
build
11-
browser_build
1211
.bin
1312
npm-debug.log
1413
builderror.log

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
BSON is short for Bin­ary JSON and is the bin­ary-en­coded seri­al­iz­a­tion of JSON-like doc­u­ments. You can learn more about it in [the specification](http://bsonspec.org).
44

5-
This browser version of the BSON parser is compiled using [webpack](https://webpack.js.org/) and the current version is pre-compiled in the `browser_build` directory.
5+
This browser version of the BSON parser is compiled using [rollup](https://rollupjs.org/) and the current version is pre-compiled in the `dist` directory.
66

77
This is the default BSON parser, however, there is a C++ Node.js addon version as well that does not support the browser. It can be found at [mongod-js/bson-ext](https://github.com/mongodb-js/bson-ext).
88

@@ -18,7 +18,7 @@ npm run build
1818
A simple example of how to use BSON in the browser:
1919

2020
```html
21-
<script src="./browser_build/bson.js"></script>
21+
<script src="./dist/bson.js"></script>
2222

2323
<script>
2424
function start() {

alternate_parsers/faster_bson.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// reduced to ~ 410 LOCs (parser only 300 vs. 1400+) with (some, needed) BSON classes "inlined".
2-
/// Compare ~ 4,300 (22KB vs. 157KB) in browser build at: https://github.com/mongodb/js-bson/blob/master/browser_build/bson.js
2+
/// Compare ~ 4,300 (22KB vs. 157KB) in browser build at: https://github.com/mongodb/js-bson/blob/master/dist/bson.js
33

44
module.exports.calculateObjectSize = calculateObjectSize;
55

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"parser"
88
],
99
"author": "Christian Amor Kvalheim <[email protected]>",
10-
"main": "./browser_build/bson.js",
10+
"main": "./dist/bson.js",
1111
"license": "Apache-2.0",
1212
"moduleType": [
1313
"globals",

0 commit comments

Comments
 (0)