-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use rollup so we don't need to rely on sprockets
- Loading branch information
Showing
11 changed files
with
386 additions
and
5 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
162 changes: 162 additions & 0 deletions
162
app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
app/assets/javascripts/blacklight_gallery/blacklight-gallery.esm.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
169 changes: 169 additions & 0 deletions
169
app/assets/javascripts/blacklight_gallery/blacklight-gallery.js
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
app/assets/javascripts/blacklight_gallery/blacklight-gallery.js.map
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import 'imagesloaded.min' | ||
import 'masonry.min' | ||
|
||
import './slideshow' | ||
import './masonry' |
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions
6
lib/generators/blacklight_gallery/templates/blacklight_gallery.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
//= require blacklight_gallery/default | ||
//= require blacklight_gallery/osd_viewer | ||
import 'blacklight_gallery' | ||
import OpenSeadragon from 'openseadragon' | ||
window.OpenSeadragon = OpenSeadragon | ||
import 'openseadragon-rails' |
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,31 @@ | ||
import includePaths from 'rollup-plugin-includepaths'; | ||
|
||
|
||
const BUNDLE = process.env.BUNDLE === 'true' | ||
const ESM = process.env.ESM === 'true' | ||
|
||
const fileDest = `blacklight-gallery${ESM ? '.esm' : ''}` | ||
const external = [] | ||
const globals = {} | ||
|
||
let includePathOptions = { | ||
include: {}, | ||
paths: ['app/javascript', 'vendor/assets/javascripts'], | ||
external: [], | ||
extensions: ['.js'] | ||
}; | ||
|
||
const rollupConfig = { | ||
input: 'app/javascript/blacklight_gallery/index.js', | ||
output: { | ||
file: `app/assets/javascripts/blacklight_gallery/${fileDest}.js`, | ||
format: ESM ? 'es' : 'umd', | ||
globals, | ||
generatedCode: { preset: 'es2015' }, | ||
name: ESM ? undefined : 'BlacklightGallery' | ||
}, | ||
external, | ||
plugins: [includePaths(includePathOptions)] | ||
} | ||
|
||
export default rollupConfig |