Skip to content

Commit

Permalink
Rollup the javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Feb 2, 2024
1 parent f315cfd commit 9fcc74c
Show file tree
Hide file tree
Showing 18 changed files with 727 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ Gemfile.lock
/pkg
/tmp
/.bundle
/node_modules
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Once you are done iterating on your test you will need to stop the application s

# Publishing Javascript

run `npm run prepare` to build the javascript

run `npm publish` to push the javascript package to https://npmjs.org/package/blacklight-range-limit

# Possible future To Do
Expand Down
20 changes: 2 additions & 18 deletions app/assets/javascripts/blacklight_range_limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,8 @@
//= require 'bootstrap-slider'

// Ensure that range_limit_shared is loaded first
//= require 'blacklight_range_limit/range_limit_shared'
//= require 'blacklight_range_limit/range_limit_plotting'
//= require 'blacklight_range_limit/range_limit_slider'
//= require 'blacklight_range_limit/range_limit_distro_facets'

BlacklightRangeLimit.initialize = function() {
// Support for Blacklight 7 and 8:
const modalSelector = Blacklight.modal?.modalSelector || Blacklight.Modal.modalSelector

RangeLimitDistroFacet.initialize(modalSelector)
RangeLimitSlider.initialize(modalSelector)
}
//= require 'blacklight_range_limit/blacklight_range_limit.umd'

// Blacklight will only be defined if you aren't using this in a module context
if (Blacklight)
Blacklight.onLoad(() => BlacklightRangeLimit.initialize())

// In a module context you can do:
// import BlacklightRangeLimit from 'blacklight_range_limit'
// Blacklight.onLoad(() => BlacklightRangeLimit.initialize())
export default BlacklightRangeLimit
Blacklight.onLoad(() => BlacklightRangeLimit.initialize())
42 changes: 42 additions & 0 deletions app/assets/javascripts/blacklight_range_limit.old.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Master manifest file for engine, so local app can require
// this one file, but get all our files -- and local app
// require does not need to change if we change file list.
//
// Note JQuery is required to be loaded for flot and blacklight_range_limit
// JS to work, expect host app to load it.


//= require 'flot/jquery.canvaswrapper.js'
//= require 'flot/jquery.colorhelpers.js'
//= require 'flot/jquery.flot.js'
//= require 'flot/jquery.flot.browser.js'
//= require 'flot/jquery.flot.saturated.js'
//= require 'flot/jquery.flot.drawSeries.js'
//= require 'flot/jquery.event.drag.js'
//= require 'flot/jquery.flot.hover.js'
//= require 'flot/jquery.flot.uiConstants.js'
//= require 'flot/jquery.flot.selection.js'
//= require 'bootstrap-slider'

// Ensure that range_limit_shared is loaded first
//= require 'blacklight_range_limit/range_limit_shared'
//= require 'blacklight_range_limit/range_limit_plotting'
//= require 'blacklight_range_limit/range_limit_slider'
//= require 'blacklight_range_limit/range_limit_distro_facets'

BlacklightRangeLimit.initialize = function() {
// Support for Blacklight 7 and 8:
const modalSelector = Blacklight.modal?.modalSelector || Blacklight.Modal.modalSelector

RangeLimitDistroFacet.initialize(modalSelector)
RangeLimitSlider.initialize(modalSelector)
}

// Blacklight will only be defined if you aren't using this in a module context
if (Blacklight)
Blacklight.onLoad(() => BlacklightRangeLimit.initialize())

// In a module context you can do:
// import BlacklightRangeLimit from 'blacklight_range_limit'
// Blacklight.onLoad(() => BlacklightRangeLimit.initialize())
export default BlacklightRangeLimit

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9fcc74c

Please sign in to comment.