-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
121 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Changelog | ||
|
||
## 0.0.8 | ||
|
||
### Changed | ||
- Update build process to use rolllup | ||
|
||
## 0.0.7 | ||
|
||
### Changed | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// thank you https://github.com/gzuidhof/zarr.js/blob/master/rollup.config.ts | ||
// for giving me a starting point :) | ||
|
||
// We run linting on all files so this one is checked too. | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import babel from 'rollup-plugin-babel'; | ||
import sourceMaps from 'rollup-plugin-sourcemaps'; | ||
|
||
const pkgObj = require('./package.json'); | ||
|
||
const libraryName = '@hubmap/vitessce-image-viewer'; | ||
|
||
function getExternals(pkg) { | ||
const { peerDependencies = {} } = pkg; | ||
return Object.keys(peerDependencies); | ||
} | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: [ | ||
{ file: pkgObj.main, name: libraryName, format: 'umd', sourcemap: true }, | ||
{ file: pkgObj.module, format: 'es', sourcemap: true } | ||
], | ||
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash') | ||
external: getExternals(pkgObj), | ||
watch: { | ||
include: 'src/**' | ||
}, | ||
plugins: [ | ||
// Allow json resolution | ||
json(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
presets: ['@babel/env', '@babel/preset-react'] | ||
}), | ||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs) | ||
commonjs({ | ||
namedExports: { | ||
// left-hand side can be an absolute path, a path | ||
// relative to the current directory, or the name | ||
// of a module in node_modules | ||
'node_modules/geotiff/dist/geotiff.bundle.min.js': ['fromUrl', 'Pool'] | ||
} | ||
}), | ||
// Allow node_modules resolution, so you can use 'external' to control | ||
// which external modules to include in the bundle | ||
// https://github.com/rollup/rollup-plugin-node-resolve#usage | ||
resolve(), | ||
// Resolve source maps to the original source | ||
sourceMaps() | ||
] | ||
}; |
2 changes: 1 addition & 1 deletion
2
src/layers/microscopy-viewer-layer/microscopy-viewer-layer-base.js
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.