es6 imports

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2016-10-27 01:57:27 +02:00
parent f9cded7dd2
commit af61cb80eb
9 changed files with 57 additions and 40 deletions

View File

@ -5,4 +5,4 @@ function extractLast(term) {
return split(term).pop();
}
export { split, extractLast };
export default { split, extractLast };

View File

@ -1,11 +1,17 @@
import $ from 'jquery';
/* eslint-disable no-unused-vars */
/* jquery has default scope */
import cookie from 'jquery.cookie';
import ui from 'jquery-ui-browserify';
/* eslint-enable no-unused-vars */
import annotator from 'annotator';
import { savePercent, retrievePercent } from '../../_global/js/tools';
import { toggleSaveLinkForm } from './uiTools';
const $ = global.jquery = require('jquery');
require('jquery.cookie');
require('jquery-ui-browserify');
const annotator = require('annotator');
import toggleSaveLinkForm from './uiTools';
global.jquery = $;
$.fn.ready(() => {
const $listmode = $('#listmode');

View File

@ -1,4 +1,4 @@
const $ = require('jquery');
import $ from 'jquery';
function toggleSaveLinkForm(url, event) {
$('#add-link-result').empty();
@ -32,4 +32,4 @@ function toggleSaveLinkForm(url, event) {
plainUrl.focus();
}
export { toggleSaveLinkForm };
export default toggleSaveLinkForm;