mirror of
				https://github.com/ae-utbm/sith.git
				synced 2025-11-04 11:03:04 +00:00 
			
		
		
		
	* Don't tie the output name to webpack itself * Don't call js bundling webpack in python code * Make the doc more generic about js bundling
		
			
				
	
	
		
			26 lines
		
	
	
		
			909 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			909 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import $ from "jquery";
 | 
						|
import "jquery.shorten/src/jquery.shorten.min.js";
 | 
						|
 | 
						|
// We ship jquery-ui with jquery because when standalone with webpack
 | 
						|
// JQuery is also included in the jquery-ui package. We do gain space by doing this
 | 
						|
// We require jquery-ui components manually and not in a loop
 | 
						|
// Otherwise it increases the output files by a x2 factor !
 | 
						|
require("jquery-ui/ui/widgets/accordion.js");
 | 
						|
require("jquery-ui/ui/widgets/autocomplete.js");
 | 
						|
require("jquery-ui/ui/widgets/button.js");
 | 
						|
require("jquery-ui/ui/widgets/dialog.js");
 | 
						|
require("jquery-ui/ui/widgets/tabs.js");
 | 
						|
 | 
						|
require("jquery-ui/themes/base/all.css");
 | 
						|
 | 
						|
/**
 | 
						|
 * Simple wrapper to solve shorten not being able on legacy pages
 | 
						|
 * @param {string} selector to be passed to jQuery
 | 
						|
 * @param {Object} options object to pass to the shorten function
 | 
						|
 **/
 | 
						|
function shorten(selector, options) {
 | 
						|
  $(selector).shorten(options);
 | 
						|
}
 | 
						|
 | 
						|
window.shorten = shorten;
 |