Commit 0c4408dd by Jon Jackson

Remove hawtio dependency

parent 9abeb9c4
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
"ansi_up": false, "ansi_up": false,
"c3": false, "c3": false,
"d3": false, "d3": false,
"hawtioPluginLoader": false,
"HawtioCore": false,
"Logger" : false, "Logger" : false,
"LabelSelector": false, "LabelSelector": false,
"ResourceGroupVersion": false, "ResourceGroupVersion": false,
......
...@@ -36,25 +36,51 @@ module.exports = function (grunt) { ...@@ -36,25 +36,51 @@ module.exports = function (grunt) {
}, },
concat: { concat: {
options: { options: {
separator: ';' separator: ';\n'
}, },
ui: { ui: {
src: ['src/**/*UI.module.js', 'dist/scripts/templates.js', 'src/components/**/*.js', 'src/filters/**/*.js', 'src/ui-services/**/*.js'], src: [
'src/pluginLoader.js',
'src/*UI.module.js',
'dist/scripts/templates.js',
'src/components/**/*.js',
'src/filters/**/*.js',
'src/ui-services/**/*.js'
],
dest: 'dist/origin-web-common-ui.js' dest: 'dist/origin-web-common-ui.js'
}, },
services: { services: {
src: ['src/**/*Services.module.js', 'src/services/**/*.js', 'src/constants/**/*.js'], src: [
'src/pluginLoader.js',
'src/*Services.module.js',
'src/services/**/*.js',
'src/constants/**/*.js'
],
dest: 'dist/origin-web-common-services.js' dest: 'dist/origin-web-common-services.js'
}, },
dist: { dist: {
src: ['src/**/*.module.js', 'dist/scripts/templates.js', 'src/**/*.js'], src: [
'src/pluginLoader.js',
'src/*.module.js',
'dist/scripts/templates.js',
'src/constants/**/*.js',
'src/filters/**/*.js',
'src/services/**/*.js',
'src/ui-services/**/*.js',
'src/components/**/*.js'
],
dest: 'dist/origin-web-common.js' dest: 'dist/origin-web-common.js'
} }
}, },
copy: { copy: {
main: { main: {
files: [ files: [
{expand: true, cwd: 'src/styles/', src: ['*'], dest: 'dist/less/'} {
expand: true,
cwd: 'src/styles/',
src: ['*'],
dest: 'dist/less/'
}
] ]
} }
}, },
...@@ -71,7 +97,10 @@ module.exports = function (grunt) { ...@@ -71,7 +97,10 @@ module.exports = function (grunt) {
}, },
options: { options: {
cleancss: true, cleancss: true,
paths: ['src/styles', 'bower_components/'] paths: [
'src/styles',
'bower_components/'
]
} }
} }
}, },
...@@ -129,17 +158,35 @@ module.exports = function (grunt) { ...@@ -129,17 +158,35 @@ module.exports = function (grunt) {
src: 'dist/origin-web-common.js', src: 'dist/origin-web-common.js',
dest: 'dist/origin-web-common.min.js' dest: 'dist/origin-web-common.min.js'
} }
} }
}); });
// You can specify which modules to build as arguments of the build task. // You can specify which modules to build as arguments of the build task.
grunt.registerTask('build', 'Create bootstrap build files', function () { grunt.registerTask('build', 'Create bootstrap build files', function () {
grunt.task.run(['clean', 'ngtemplates', 'concat', 'copy', 'ngAnnotate', 'less', 'uglify:build', 'test']); grunt.task.run([
'clean',
'ngtemplates',
'concat',
'copy',
'ngAnnotate',
'less',
'uglify:build',
'test'
]);
}); });
// Runs all the tasks of build with the exception of tests // Runs all the tasks of build with the exception of tests
grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () { grunt.registerTask('deploy', 'Prepares the project for deployment. Does not run unit tests', function () {
grunt.task.run(['clean', 'ngtemplates', 'concat', 'copy', 'ngAnnotate', 'less', 'uglify:build']); grunt.task.run([
'clean',
'ngtemplates',
'concat',
'copy',
'ngAnnotate',
'less',
'uglify:build'
]);
}); });
grunt.registerTask('default', ['build']); grunt.registerTask('default', ['build']);
......
...@@ -30,10 +30,9 @@ ...@@ -30,10 +30,9 @@
"angular": "~1.5.11", "angular": "~1.5.11",
"angular-sanitize": "~1.5.11", "angular-sanitize": "~1.5.11",
"angular-utf8-base64": "~0.0.5", "angular-utf8-base64": "~0.0.5",
"hawtio-core": "~2.0.37",
"hawtio-extension-service": "~2.0.2",
"hopscotch": "~0.2.7", "hopscotch": "~0.2.7",
"jquery": "~3.2.1", "jquery": "~3.2.1",
"js-logger": "~0.9.14",
"kubernetes-label-selector": "~2.1.1", "kubernetes-label-selector": "~2.1.1",
"lodash": "~4.17.4", "lodash": "~4.17.4",
"patternfly": ">=3.27.2 <4.0", "patternfly": ">=3.27.2 <4.0",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -25,11 +25,11 @@ angular.module('openshiftCommonServices', ['ab-base64']) ...@@ -25,11 +25,11 @@ angular.module('openshiftCommonServices', ['ab-base64'])
RedirectLoginServiceProvider.OAuthRedirectURI(URI(AUTH_CFG.oauth_redirect_base).segment("oauth").toString()); RedirectLoginServiceProvider.OAuthRedirectURI(URI(AUTH_CFG.oauth_redirect_base).segment("oauth").toString());
}); });
hawtioPluginLoader.addModule('openshiftCommonServices'); pluginLoader.addModule('openshiftCommonServices');
// API Discovery, this runs before the angular app is bootstrapped // API Discovery, this runs before the angular app is bootstrapped
// TODO we want this to be possible with a single request against the API instead of being dependent on the numbers of groups and versions // TODO we want this to be possible with a single request against the API instead of being dependent on the numbers of groups and versions
hawtioPluginLoader.registerPreBootstrapTask(function(next) { pluginLoader.registerPreBootstrapTask(function(next) {
// Skips api discovery, needed to run spec tests // Skips api discovery, needed to run spec tests
if ( _.get(window, "OPENSHIFT_CONFIG.api.k8s.resources") ) { if ( _.get(window, "OPENSHIFT_CONFIG.api.k8s.resources") ) {
next(); next();
......
...@@ -26,4 +26,4 @@ angular.module('openshiftCommonUI', []) ...@@ -26,4 +26,4 @@ angular.module('openshiftCommonUI', [])
.constant('IS_IOS', /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream); .constant('IS_IOS', /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream);
hawtioPluginLoader.addModule('openshiftCommonUI'); pluginLoader.addModule('openshiftCommonUI');
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
"xit": false, "xit": false,
"jasmine": false, "jasmine": false,
"spyOn": false, "spyOn": false,
"hawtioPluginLoader": false,
"HawtioCore": false,
"Logger" : false, "Logger" : false,
"LabelSelector": false, "LabelSelector": false,
"moment": false, "moment": false,
......
...@@ -16,6 +16,8 @@ module.exports = function(config) { ...@@ -16,6 +16,8 @@ module.exports = function(config) {
// list of files / patterns to load in the browser // list of files / patterns to load in the browser
files: [ files: [
// Load dependencies
"bower_components/jquery/dist/jquery.js", "bower_components/jquery/dist/jquery.js",
"bower_components/lodash/lodash.js", "bower_components/lodash/lodash.js",
"bower_components/compare-versions/index.js", "bower_components/compare-versions/index.js",
...@@ -28,19 +30,24 @@ module.exports = function(config) { ...@@ -28,19 +30,24 @@ module.exports = function(config) {
"bower_components/uri.js/src/URITemplate.js", "bower_components/uri.js/src/URITemplate.js",
"bower_components/uri.js/src/jquery.URI.js", "bower_components/uri.js/src/jquery.URI.js",
"bower_components/uri.js/src/URI.fragmentURI.js", "bower_components/uri.js/src/URI.fragmentURI.js",
"bower_components/hawtio-core/dist/hawtio-core.js",
"bower_components/kubernetes-container-terminal/dist/container-terminal.js", // load fixtures before source
"bower_components/hawtio-extension-service/dist/hawtio-extension-service.js",
// load up the fixtures first
'test/spec/fixtures/config.js', 'test/spec/fixtures/config.js',
'test/spec/fixtures/constants.js', 'test/spec/fixtures/constants.js',
'test/spec/fixtures/api-discovery.js', 'test/spec/fixtures/api-discovery.js',
// TODO: is this causing modules to load multiple times? see `src/**/*.js` below
'src/**/*module.js', // Load source files
'src/pluginLoader.js',
'src/*.module.js',
'dist/scripts/templates.js', 'dist/scripts/templates.js',
'src/**/*.js', 'src/constants/**/*.js',
'src/filters/**/*.js',
'src/services/**/*.js',
'src/ui-services/**/*.js',
'src/components/**/*.js',
'test/spec/spec-helper.js', 'test/spec/spec-helper.js',
'test/spec/**/*.js' 'test/spec/filters/**/*.js',
'test/spec/services/**/*.js'
], ],
// list of files / patterns to exclude // list of files / patterns to exclude
...@@ -63,7 +70,7 @@ module.exports = function(config) { ...@@ -63,7 +70,7 @@ module.exports = function(config) {
// level of logging // level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_DEBUG, logLevel: config.LOG_WARN,
// enable / disable watching file and executing tests whenever any file changes // enable / disable watching file and executing tests whenever any file changes
// CLI --auto-watch --no-auto-watch // CLI --auto-watch --no-auto-watch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment