[CSV Export] Add FileSaver dependency

...to handle export part of CSV export.
This commit is contained in:
Victor Woeltjen 2016-02-05 14:39:24 -08:00
parent c07dc0ea8b
commit cb0f191ab3
4 changed files with 7 additions and 6 deletions

View File

@ -16,6 +16,7 @@
"es6-promise": "^3.0.2",
"screenfull": "^3.0.0",
"node-uuid": "^1.4.7",
"comma-separated-values": "^3.6.4"
"comma-separated-values": "^3.6.4",
"FileSaver.js": "^0.0.2"
}
}

View File

@ -30,6 +30,7 @@ requirejs.config({
"es6-promise": "bower_components/es6-promise/promise.min",
"moment": "bower_components/moment/moment",
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
"saveAs": "bower_components/FileSaver.js/FileSaver.min",
"screenfull": "bower_components/screenfull/dist/screenfull.min",
"text": "bower_components/text/text",
"uuid": "bower_components/node-uuid/uuid"

View File

@ -23,8 +23,9 @@
define([
"./ExportService",
"saveAs",
"legacyRegistry"
], function (ExportService, legacyRegistry) {
], function (ExportService, saveAs, legacyRegistry) {
'use strict';
legacyRegistry.register("platform/exporters", {
@ -33,10 +34,7 @@ define([
{
key: "exportService",
implementation: function () {
return new ExportService(function (blob, name) {
// TODO: Replace with FileSaver.js
console.log(blob, name);
});
return new ExportService(saveAs);
}
}
]

View File

@ -50,6 +50,7 @@ requirejs.config({
"es6-promise": "bower_components/es6-promise/promise.min",
"moment": "bower_components/moment/moment",
"moment-duration-format": "bower_components/moment-duration-format/lib/moment-duration-format",
"saveAs": "bower_components/FileSaver.js/FileSaver.min",
"screenfull": "bower_components/screenfull/dist/screenfull.min",
"text": "bower_components/text/text",
"uuid": "bower_components/node-uuid/uuid"