Refactor third-party libraries usage and clean up karma config

* handle js-yaml and underscore libraries with bower (use libraries
  downloaded with bower by sym-linking bower_components to libs dir in
  static);
* get rid of no longer used angular-filter;
* move libraries without official releases to custom-libs
* simplify file requirements in karma config.

Change-Id: Ie3d1d90c6f2ccc89c7cf91fe0d9dae4b2b88442f
This commit is contained in:
Timur Sufiev 2015-04-25 12:06:23 -07:00
parent e9e750ef4c
commit 6fa8b92891
14 changed files with 22 additions and 7287 deletions

4
.gitignore vendored
View File

@ -2,3 +2,7 @@
.venv
.tox
.idea
node_modules/*
bower_components/*
npm-debug.log

View File

@ -12,7 +12,9 @@
"angular-local-storage": "0.1.5",
"angular-elastic": "2.4.2",
"angular-moment": "0.9.0",
"angular-cache": "3.2.5"
"angular-cache": "3.2.5",
"js-yaml": "3.2.7",
"underscore": "1.8.3"
},
"devDependencies": {
"angular-mocks": "1.3.10",

View File

@ -10,9 +10,8 @@ ADD_INSTALLED_APPS = ['merlin', 'mistral']
# Python panel class of the PANEL to be added.
ADD_PANEL = 'mistral.panel.MistralPanel'
ADD_ANGULAR_MODULES = ['angular.filter', 'merlin', 'mistral']
ADD_JS_FILES = ['merlin/js/lib/angular-filter.js',
'merlin/js/lib/ui-bootstrap-tpls-0.12.1.js',
ADD_ANGULAR_MODULES = ['merlin', 'mistral']
ADD_JS_FILES = ['merlin/js/custom-libs/ui-bootstrap-tpls-0.12.1.js',
'merlin/js/merlin.init.js',
'merlin/js/merlin.templates.js',
'mistral/js/mistral.init.js']

View File

@ -11,9 +11,9 @@
{% block js %}
{% include "horizon/_scripts.html" %}
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/lib/barricade.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/lib/js-yaml.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/lib/underscore.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/custom-libs/barricade.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/libs/js-yaml/dist/js-yaml.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/libs/underscore/underscore-min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.init.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.templates.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}merlin/js/merlin.filters.js"></script>

View File

@ -36,28 +36,18 @@ module.exports = function (config) {
files: [
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'merlin/static/merlin/js/lib/underscore-min.js',
'merlin/static/merlin/js/libs/underscore/underscore-min.js',
'merlin/static/merlin/js/libs/js-yaml/dist/js-yaml.min.js',
'merlin/static/merlin/js/custom-libs/barricade.js',
// explicitly require first module definition file to avoid errors
'merlin/static/merlin/js/merlin.init.js',
'merlin/static/merlin/js/merlin.templates.js',
'merlin/static/merlin/js/merlin.directives.js',
'merlin/static/merlin/js/merlin.filters.js',
'merlin/static/merlin/js/merlin.field.models.js',
'merlin/static/merlin/js/merlin.panel.models.js',
'merlin/static/merlin/js/merlin.utils.js',
'merlin/static/merlin/js/lib/angular-filter.js',
'merlin/static/merlin/js/lib/barricade.js',
'merlin/static/merlin/js/lib/js-yaml.js',
'merlin/static/merlin/js/merlin.*.js',
'merlin/static/merlin/templates/**/*.html',
// 'merlin/static/merlin/templates/fields/*.html',
'merlin/test/js/utilsSpec.js',
'merlin/test/js/templatesSpec.js',
'merlin/test/js/filtersSpec.js',
'merlin/test/js/directivesSpec.js',
'merlin/test/js/*Spec.js',
// explicitly require first module definition file to avoid errors
'extensions/mistral/static/mistral/js/mistral.init.js',
'extensions/mistral/static/mistral/js/mistral.workbook.models.js',
'extensions/mistral/static/mistral/js/mistral.workbook.controllers.js',
'extensions/mistral/test/js/workbookSpec.js'
'extensions/mistral/static/mistral/js/mistral.*.js',
'extensions/mistral/test/js/*Spec.js'
],
preprocessors: {

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
../../../../bower_components/