Skip to content

Commit

Permalink
Merge pull request #4409 from himdel/npm-sprintf
Browse files Browse the repository at this point in the history
bower to npm: sprintf
  • Loading branch information
mzazrivec authored Aug 3, 2018
2 parents a296004 + ab49273 commit 511868a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//= require bower_components/moment-strftime/lib/moment-strftime
//= require bower_components/moment-timezone/moment-timezone
//= require bower_components/moment-duration-format/lib/moment-duration-format
//= require bower_components/sprintf/dist/sprintf.min
//= require bower_components/numeral/numeral
//= require ./cable
//= require ./gettextCatalog
Expand Down
2 changes: 2 additions & 0 deletions app/javascript/packs/application-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ ManageIQ.angular.rxSubject = rxSubject;
window.sendDataWithRx = sendDataWithRx;
window.listenToRx = listenToRx;

window.sprintf = require('sprintf-js').sprintf;

// compatibility: vanillaJsAPI should be considered deprecated
// the new convention is: API is for vanilla/react, $API is for angular
window.API = API;
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"qs": "~0.3.10",
"spice-html5-bower": "himdel/spice-html5-bower#~1.7.2",
"spin.js": "~2.3.2",
"sprintf": "~1.0.3",
"xml_display": "~0.1.1"
},
"resolutions": {
Expand Down
4 changes: 1 addition & 3 deletions config/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ window.$ = require('jquery');
window._ = require('lodash');
window.__ = (x) => x;
window.n__ = (x) => x;
window.sprintf = require('sprintf-js').sprintf;

require('../app/assets/javascripts/miq_global');
require('../app/assets/javascripts/miq_application');
require('../app/assets/javascripts/miq_api');
require('../app/assets/javascripts/miq_angular_application');

let sprintf = require('../vendor/assets/bower/bower_components/sprintf/src/sprintf.js');
window.sprintf = sprintf.sprintf;

import { API } from '../app/javascript/http_api';
window.vanillaJsAPI = API;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"redux-promise-middleware": "^5.1.1",
"redux-thunk": "^2.3.0",
"rxjs": "~5.6.0-forward-compat.2",
"sprintf-js": "~1.1.1",
"text-encoder-lite": "git://github.com/coolaj86/TextEncoderLite.git#e1e031b",
"ui-select": "0.19.8"
},
Expand Down

0 comments on commit 511868a

Please sign in to comment.