Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement threads.js and parcel-bundler #131

Merged
merged 25 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3c31602
refactor: implement Pool with threads.js
PacoDu Mar 4, 2020
e35f431
test: add worker pool test
PacoDu Mar 4, 2020
03c0648
refactor: implement pool with threadjs
PacoDu Mar 8, 2020
829257c
chore: remove worker-loader
PacoDu Mar 8, 2020
f0ba72c
tests: force tests to fail at the right step
PacoDu Mar 8, 2020
c6da7fa
chore: lint
PacoDu Mar 8, 2020
19a56e8
fix: build
PacoDu Mar 8, 2020
0a9bcdb
chore: add browser target to package.json
PacoDu Mar 8, 2020
1030807
chore: configure polyfill with core-js instead of @babel/polyfill
PacoDu Mar 9, 2020
c659360
tests: disable worker test, not working with mocha 7.1
PacoDu Mar 9, 2020
e45c517
feat: parcel-bundler working with same features as webpack
PacoDu Mar 9, 2020
f5bd519
chore: cleanup webpack artifacts
PacoDu Mar 9, 2020
f3f7094
chore: cleanup and small fixes
PacoDu Mar 9, 2020
18e72af
chore: remove core-js (not necessary with parcel)
PacoDu Mar 9, 2020
148d933
chore: set prepublish to prepublishOnly to prevent double build on np…
PacoDu Mar 10, 2020
a8f2eb1
doc: update README to match parcel-bundler configuration
PacoDu Mar 10, 2020
6eb6717
chore: upgrade thread.js dependency to 1.3.1
PacoDu Mar 12, 2020
2056d48
chore: remove regenerator-runtime and swithc back to babel plugin-tra…
PacoDu Mar 14, 2020
5535774
chore: remove unecessary index from import
PacoDu Mar 14, 2020
ab6fd32
chore: add missing changes to babelrc and main, set dev port to 8090
PacoDu Mar 14, 2020
be71193
chore: remove unused lzw test file
PacoDu Mar 14, 2020
d382901
chore: remove unnecessary *tif from test/.gitignore
PacoDu Mar 14, 2020
2afabed
chore: remove eslint fix quirks
PacoDu Mar 14, 2020
157d0ab
chore: apply eslint rule curly 'all' and brace-style 1tbs
PacoDu Mar 23, 2020
bbd5a9c
chore: resolve merge conflicts
PacoDu Mar 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"presets": ["env"],
"plugins": [
[
"transform-runtime",
{
"polyfill": false,
"regenerator": true
}
]
]
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime"]
}
8 changes: 3 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
module.exports = {
'extends': 'airbnb',
'parser': 'babel-eslint',
'parserOptions': {
'sourceType': 'module',
'allowImportExportEverywhere': false
},
'env': {
'mocha': true,
'browser': true,
Expand Down Expand Up @@ -34,6 +29,7 @@ module.exports = {
],
'no-console': 0,
'no-bitwise': 0,
'max-classes-per-file': 0,
PacoDu marked this conversation as resolved.
Show resolved Hide resolved
'import/prefer-default-export': 0,
'prefer-default-export': 0,
'func-names': 0,
Expand All @@ -42,5 +38,7 @@ module.exports = {
'object-curly-newline': 0,
'no-await-in-loop': 0,
'prefer-destructuring': ['error', { 'object': true, 'array': false }],
'curly': ['error', 'all'],
'brace-style': ['error', '1tbs', { 'allowSingleLine': false }]
}
};
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
dist/
.cache
dist
dist-node
dist-browser
.DS_Store
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ To do some in-browser testing do:
npm run dev
```

and navigate to `http://localhost:8090/`
and navigate to `http://localhost:8090/index.html`

To build the library do:

```bash
npm run build
```

The output is written to `dist/geotiff.browserify.js` and `dist/geotiff.browserify.min.js`.
The output is written to `dist-browser/main.js` and `dist-node/main.js`.

## Usage

Expand All @@ -117,10 +117,7 @@ import GeoTIFF from 'geotiff';
or:

```html
<script src="dist/geotiff.bundle.js"></script>
<!-- or use the minified version:
<script src="dist/geotiff.bundle.min.js"></script>
-->
<script src="dist-browser/main.js"></script>
<script>
console.log(GeoTIFF);
</script>
Expand Down
Loading