From: Dan Scott Date: Thu, 6 Apr 2017 04:26:50 +0000 (-0400) Subject: Consolidate package dependencies into package.json X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=59a651155ad2774ad0eef83ac2247ba05e37d67b;p=working%2FEvergreen.git Consolidate package dependencies into package.json npm already enables us to designate dependencies in package.json, and projects have increasingly consolidated what bower used to be used for in package.json. We can do this with an npm-compatible version of angular-order-object-by from github. There are a few other tweaks to npm vs bower file locations, such as ng-toast instead of ngtoast for ngToast. Pin to AngularJS 1.5.x for now Signed-off-by: Dan Scott --- diff --git a/Open-ILS/web/js/ui/default/staff/Gruntfile.js b/Open-ILS/web/js/ui/default/staff/Gruntfile.js index b768b057b2..d006a65f47 100644 --- a/Open-ILS/web/js/ui/default/staff/Gruntfile.js +++ b/Open-ILS/web/js/ui/default/staff/Gruntfile.js @@ -4,7 +4,7 @@ module.exports = function(grunt) { var config = { pkg: grunt.file.readJSON('package.json'), - // copy the files we care about from bower-fetched dependencies + // copy the files we care about from fetched dependencies // into our build directory copy: { @@ -15,28 +15,28 @@ module.exports = function(grunt) { filter: 'isFile', expand : true, src: [ - 'bower_components/angular/angular.min.js', - 'bower_components/angular/angular.min.js.map', - 'bower_components/angular-animate/angular-animate.min.js', - 'bower_components/angular-animate/angular-animate.min.js.map', - 'bower_components/angular-sanitize/angular-sanitize.min.js', - 'bower_components/angular-sanitize/angular-sanitize.min.js.map', - 'bower_components/angular-route/angular-route.min.js', - 'bower_components/angular-route/angular-route.min.js.map', - 'bower_components/angular-bootstrap/ui-bootstrap.min.js', - 'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js', - 'bower_components/angular-hotkeys/build/hotkeys.min.js', - 'bower_components/angular-file-saver/dist/angular-file-saver.bundle.min.js', - 'bower_components/angular-location-update/angular-location-update.min.js', - 'bower_components/angular-tree-control/angular-tree-control.js', - 'bower_components/ngtoast/dist/ngToast.min.js', - 'bower_components/jquery/dist/jquery.min.js', - 'bower_components/angular-cookies/angular-cookies.min.js', - 'bower_components/angular-cookies/angular-cookies.min.js.map', - 'bower_components/iframe-resizer/js/iframeResizer.min.js', - 'bower_components/iframe-resizer/js/iframeResizer.map', - 'bower_components/iframe-resizer/js/iframeResizer.contentWindow.min.js', - 'bower_components/angular-order-object-by/src/ng-order-object-by.js' + 'node_modules/angular/angular.min.js', + 'node_modules/angular/angular.min.js.map', + 'node_modules/angular-animate/angular-animate.min.js', + 'node_modules/angular-animate/angular-animate.min.js.map', + 'node_modules/angular-sanitize/angular-sanitize.min.js', + 'node_modules/angular-sanitize/angular-sanitize.min.js.map', + 'node_modules/angular-route/angular-route.min.js', + 'node_modules/angular-route/angular-route.min.js.map', + 'node_modules/angular-ui-bootstrap/dist/ui-bootstrap.min.js', + 'node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.min.js', + 'node_modules/angular-hotkeys/build/hotkeys.min.js', + 'node_modules/angular-file-saver/dist/angular-file-saver.bundle.min.js', + 'node_modules/angular-location-update/angular-location-update.min.js', + 'node_modules/angular-tree-control/angular-tree-control.js', + 'node_modules/ng-toast/dist/ngToast.min.js', + 'node_modules/jquery/dist/jquery.min.js', + 'node_modules/angular-cookies/angular-cookies.min.js', + 'node_modules/angular-cookies/angular-cookies.min.js.map', + 'node_modules/iframe-resizer/js/iframeResizer.min.js', + 'node_modules/iframe-resizer/js/iframeResizer.map', + 'node_modules/iframe-resizer/js/iframeResizer.contentWindow.min.js', + 'node_modules/angular-order-object-by/src/ng-order-object-by.js' ] }] }, @@ -48,12 +48,12 @@ module.exports = function(grunt) { filter : 'isFile', expand : true, src : [ - 'bower_components/angular-hotkeys/build/hotkeys.min.css', - 'bower_components/bootstrap/dist/css/bootstrap.min.css', - 'bower_components/ngtoast/dist/ngToast.min.css', - 'bower_components/ngtoast/dist/ngToast-animations.min.css', - 'bower_components/angular-tree-control/css/tree-control.css', - 'bower_components/angular-tree-control/css/tree-control-attribute.css', + 'node_modules/angular-hotkeys/build/hotkeys.min.css', + 'node_modules/bootstrap/dist/css/bootstrap.min.css', + 'node_modules/ngtoast/dist/ngToast.min.css', + 'node_modules/ngtoast/dist/ngToast-animations.min.css', + 'node_modules/angular-tree-control/css/tree-control.css', + 'node_modules/angular-tree-control/css/tree-control-attribute.css', ] }] }, @@ -65,10 +65,10 @@ module.exports = function(grunt) { filter : 'isFile', expand : true, src : [ - 'bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot', - 'bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg', - 'bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf', - 'bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff' + 'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot', + 'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg', + 'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf', + 'node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff' ] }] }, @@ -80,16 +80,16 @@ module.exports = function(grunt) { filter : 'isFile', expand : true, src : [ - 'bower_components/angular-tree-control/images/sample.png', - 'bower_components/angular-tree-control/images/node-opened-2.png', - 'bower_components/angular-tree-control/images/folder.png', - 'bower_components/angular-tree-control/images/node-closed.png', - 'bower_components/angular-tree-control/images/node-closed-light.png', - 'bower_components/angular-tree-control/images/node-opened.png', - 'bower_components/angular-tree-control/images/node-opened-light.png', - 'bower_components/angular-tree-control/images/folder-closed.png', - 'bower_components/angular-tree-control/images/node-closed-2.png', - 'bower_components/angular-tree-control/images/file.png' + 'node_modules/angular-tree-control/images/sample.png', + 'node_modules/angular-tree-control/images/node-opened-2.png', + 'node_modules/angular-tree-control/images/folder.png', + 'node_modules/angular-tree-control/images/node-closed.png', + 'node_modules/angular-tree-control/images/node-closed-light.png', + 'node_modules/angular-tree-control/images/node-opened.png', + 'node_modules/angular-tree-control/images/node-opened-light.png', + 'node_modules/angular-tree-control/images/folder-closed.png', + 'node_modules/angular-tree-control/images/node-closed-2.png', + 'node_modules/angular-tree-control/images/file.png' ] }] } diff --git a/Open-ILS/web/js/ui/default/staff/bower.json b/Open-ILS/web/js/ui/default/staff/bower.json deleted file mode 100644 index 63f801e533..0000000000 --- a/Open-ILS/web/js/ui/default/staff/bower.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "evergreen-staff-client", - "version": "0.0.1", - "authors": [ - "Bill Erickson " - ], - "description": "Evergreen HTML Staff Client", - "keywords": [ - "evergreen" - ], - "license": "GPL", - "homepage": "http://evergreen-ils.org", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "AngularJS": "angular-latest#~1.5.0", - "jquery": "~2.2.1", - "bootstrap": "~3.3.6", - "angular-route": "~1.5.0", - "angular-mocks": "~1.5.0", - "angular-bootstrap": "~1.2.4", - "angular-file-saver": "~1.1.0", - "angular-location-update": "~0.0.2", - "ngtoast": "~2.0.0", - "angular-tree-control": "~0.2.28", - "angular-animate": "~1.5.3", - "angular-hotkeys": "cfp-angular-hotkeys#^1.7.0", - "angular-cookies": "~1.5.8", - "iframe-resizer": "^3.5.5", - "angular-order-object-by": "*" - }, - "resolutions": { - "angular": "~1.5.5" - } -} diff --git a/Open-ILS/web/js/ui/default/staff/package.json b/Open-ILS/web/js/ui/default/staff/package.json index f820d68dbe..91a1802e44 100644 --- a/Open-ILS/web/js/ui/default/staff/package.json +++ b/Open-ILS/web/js/ui/default/staff/package.json @@ -5,7 +5,18 @@ "license": "GPL", "homepage": "http://evergreen-ils.org/", "devDependencies": { - "bower": "^1.3.3", + "angular": "~1.5", + "angular-animate": "~1.5.3", + "angular-ui-bootstrap": "~1.2.4", + "angular-cookies": "~1.5.8", + "angular-file-saver": "~1.1.0", + "angular-hotkeys": "^1.7.0", + "angular-location-update": "~0.0.2", + "angular-mocks": "~1.5.0", + "angular-route": "~1.5.0", + "angular-tree-control": "~0.2.28", + "angular-order-object-by": "rxfork/ngOrderObjectBy#npm", + "bootstrap": "~3.3.6", "grunt": "~0.4.4", "grunt-cli": "^0.1.13", "grunt-contrib-concat": "^0.4.0", @@ -15,13 +26,16 @@ "grunt-contrib-uglify": "^0.4.0", "grunt-exec": "^0.4.5", "grunt-karma": "^0.8.3", - "phantomjs-prebuilt": "^2.1.7", + "iframe-resizer": "^3.5.5", + "jquery": "~2.2.1", "karma": "^0.12.14", "karma-jasmine": "^0.1.5", "karma-phantomjs-launcher": "^1.0.0", "karma-script-launcher": "~0.1.0", "karma-spec-reporter": "0.0.12", - "karma-story-reporter": "^0.2.2" + "karma-story-reporter": "^0.2.2", + "ng-toast": "~2.0.0", + "phantomjs-prebuilt": "^2.1.7" }, "scripts": { "test": "grunt test" diff --git a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js index 8c7b650804..0170e3c439 100644 --- a/Open-ILS/web/js/ui/default/staff/test/karma.conf.js +++ b/Open-ILS/web/js/ui/default/staff/test/karma.conf.js @@ -8,10 +8,10 @@ module.exports = function(config){ files : [ 'build/js/angular.min.js', 'build/js/angular-route.min.js', - 'bower_components/angular-mocks/angular-mocks.js', // testing only - 'bower_components/angular-file-saver/dist/angular-file-saver.bundle.min.js', - 'bower_components/ngtoast/dist/ngToast.min.js', - 'bower_components/angular-sanitize/angular-sanitize.min.js', + 'node_modules/angular-mocks/angular-mocks.js', // testing only + 'node_modules/angular-file-saver/dist/angular-file-saver.bundle.min.js', + 'node_modules/ng-toast/dist/ngToast.min.js', + 'node_modules/angular-sanitize/angular-sanitize.min.js', 'build/js/ui-bootstrap.min.js', 'build/js/hotkeys.min.js', 'build/js/angular-cookies.min.js', diff --git a/docs/installation/server_installation.txt b/docs/installation/server_installation.txt index ef178ddc6b..8d8c49a222 100644 --- a/docs/installation/server_installation.txt +++ b/docs/installation/server_installation.txt @@ -161,13 +161,6 @@ environment variable `PATH`. ------------------------------------------------------------------------------ % sudo npm install -g grunt-cli ------------------------------------------------------------------------------ -+ -3. Install Bower -+ -[source,sh] ------------------------------------------------------------------------------- -% sudo npm install -g bower ------------------------------------------------------------------------------- [[install_files_for_web_staff_client]] Install files for web staff client @@ -186,8 +179,7 @@ cd $EVERGREEN_ROOT/Open-ILS/web/js/ui/default/staff/ + [source,sh] ------------------------------------------------------------------------------ -npm install # fetch Grunt dependencies -bower install # fetch JS dependencies +npm install # fetch JS dependencies ------------------------------------------------------------------------------ + 3. Run the build script.