Minify imports

This commit is contained in:
Jesús Ángel 2018-07-31 11:04:36 +02:00
parent c4c1c6219b
commit d294e227c6
3 changed files with 20 additions and 42 deletions

View File

@ -12,7 +12,8 @@
// Require CSS
import './less/loader';
import { uiModules } from 'ui/modules'
import { uiModules } from 'ui/modules';
// Set up Wazuh app
const app = uiModules.get('app/wazuh', ['ngCookies', 'ngMaterial']);
@ -26,28 +27,18 @@ app.config(['$httpProvider', function($httpProvider) {
// Font Awesome, Kibana UI framework and others
import './utils/fontawesome/css/font-awesome.min.css';
import './utils/when-scrolled/when-scrolled.js';
// Dev tools
import './utils/codemirror/codemirror.css'
import './utils/codemirror/foldgutter.css'
import './utils/codemirror/ttcn.css'
import './utils/codemirror/javascript.js'
import './utils/codemirror/brace-fold.js'
import './utils/codemirror/foldcode.js'
import './utils/codemirror/foldgutter.js'
import './utils/codemirror/search-cursor.js'
import './utils/codemirror/mark-selection.js'
import './utils/codemirror'
// Material
import './../node_modules/angular-material/angular-material.css';
import './../node_modules/angular-aria/angular-aria.js';
import './../node_modules/angular-animate/angular-animate.js';
import './../node_modules/angular-material/angular-material.js';
import 'angular-material/angular-material.css';
import 'angular-aria/angular-aria';
import 'angular-animate/angular-animate';
import 'angular-material/angular-material';
// Cookies
import './../node_modules/angular-cookies/angular-cookies.min.js';
import 'angular-cookies/angular-cookies';
import 'ui/autoload/all';
import 'ui/chrome';

View File

@ -0,0 +1,12 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
import './codemirror.css'
import './foldgutter.css'
import './ttcn.css'
import './javascript.js'
import './brace-fold.js'
import './foldcode.js'
import './foldgutter.js'
import './search-cursor.js'
import './mark-selection.js'

View File

@ -1,25 +0,0 @@
/*
* Wazuh app - whenScrolled directive definition
* Copyright (C) 2018 Wazuh, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Find more information about this on the LICENSE file.
*/
import { uiModules } from 'ui/modules';
const app = uiModules.get('app/wazuh', []);
app.directive('whenScrolled', function() {
return function(scope, elm, attr) {
var raw = elm[0];
elm.bind('scroll', function() {
if (raw.scrollTop + raw.offsetHeight >= raw.scrollHeight - 150) {
scope.$apply(attr.whenScrolled);
}
});
};
});