Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 76b4bc6

Browse files
committed
Update jszip version and remove code conflict with webpack
1 parent 162004e commit 76b4bc6

File tree

4 files changed

+18
-61
lines changed

4 files changed

+18
-61
lines changed

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
![bounties received](https://www.bountysource.com/badge/team?team_id=59027&style=bounties_received)
2-
3-
No longer maintained
4-
====================
5-
6-
Sob story of the day. For the first time in months, I had time to sit down and work on this project. So, I did. Tweaked a couple things, added stuff to the 'new' website.. then realized that I'd prefer to be spending time with my family. So, this project is no longer maintained. Thank you to those who sent encouraging emails over the years. This was an interesting project. Goodbye.
7-
8-
excel-builder.js
1+
excel-builder-webpack.js
92
================
3+
An excel-builder version which support webpack
4+
This is a fork from excel-builder which wasn't maintained.
105

11-
A way to build excel files with javascript
12-
13-
Documentation at http://excelbuilderjs.com/. This is slightly outdated, but includes a 'cookbook' and some
6+
Documentation at http://excelbuilderjs.com/. This is slightly outdated, but includes a 'cookbook' and some
147
API documentation. New site coming soon with up-to-date documentation, and ability to contribute - see [https://github.com/stephenliberty/excel-builder-site](https://github.com/stephenliberty/excel-builder-site)
158

169
Installing via NPM
1710
------------------
1811

19-
npm install excel-builder
12+
npm install excel-builder-webpack
2013

2114

2215
Building for web
@@ -43,6 +36,6 @@ excel-builder.dist.js -> All files in the EB package. Requires lodash and jszip
4336
Contributing
4437
-------------
4538

46-
Originally this project was sort of sponsored by a previous company I worked for. Unfortunately now it has no backing, and my time is very limited while I work on side projects to help make ends meet. If you use bountysource or contribute via paypal (to [email protected]) to open up bounties on issues, it is very, very likely that I will add features and fix issues sooner than later.
39+
Originally this project was sort of sponsored by a previous company I worked for. Unfortunately now it has no backing, and my time is very limited while I work on side projects to help make ends meet. If you use bountysource or contribute via paypal (to [email protected]) to open up bounties on issues, it is very, very likely that I will add features and fix issues sooner than later.
4740

48-
Otherwise, if you have the ability to contribute yourself, please just do so as normal - I'll review and pull changes as they come in as quickly as I can.
41+
Otherwise, if you have the ability to contribute yourself, please just do so as normal - I'll review and pull changes as they come in as quickly as I can.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
"name": "excel-builder",
3-
"version": "2.0.3",
4-
"description": "An easy way of building Excel files with javascript",
2+
"name": "excel-builder-webpack",
3+
"version": "1.0.2",
4+
"description": "Customized version of excel-builder that can be run with webpack",
55
"main": "src/index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "https://github.com/stephenliberty/excel-builder.js.git"
11+
"url": "https://github.com/hohiep102/excel-builder.js.git"
1212
},
1313
"keywords": [
1414
"excel",
1515
"javascript",
1616
"xlsx",
1717
"spreadsheet"
1818
],
19-
"author": "Stephen Liberty",
19+
"author": "Hiep Ho",
2020
"license": "GPLv3",
2121
"bugs": {
22-
"url": "https://github.com/stephenliberty/excel-builder.js/issues"
22+
"url": "https://github.com/hohiep102/excel-builder.js/issues"
2323
},
2424
"homepage": "http://excelbuilderjs.com/",
2525
"devDependencies": {
@@ -38,7 +38,7 @@
3838
"dependencies": {
3939
"grunt": "^0.4.5",
4040
"grunt-contrib-watch": "^0.6.1",
41-
"jszip": "^2.1.1",
41+
"jszip": "3.1.3",
4242
"lodash": "^3.10.1",
4343
"q": "^1.4.1"
4444
},

src/Excel/WorksheetExportWorker.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
var requireConfig;
55
var worksheet;
66
var start = function(data) {
7-
require(['Worksheet'], function(Worksheet) {
7+
require(['./Worksheet'], function(Worksheet) {
88
worksheet = new Worksheet();
99
worksheet.importData(data);
1010
postMessage({status: 'sharedStrings', data: worksheet.collectSharedStrings()});
11-
11+
1212
});
1313
};
1414

@@ -22,7 +22,7 @@ var onmessage = function(event) {
2222
require.config(requireConfig);
2323
postMessage({status: "ready"});
2424
break;
25-
case "start":
25+
case "start":
2626
start(data.data);
2727
break;
2828
case "export":
@@ -34,6 +34,3 @@ var onmessage = function(event) {
3434
}
3535
}
3636
};
37-
38-
39-

src/excel-builder.js

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,6 @@ var Factory = {
2525
forceUIThread: false
2626
},
2727

28-
/**
29-
* Turns a workbook into a downloadable file.
30-
* @param {Excel/Workbook} workbook The workbook that is being converted
31-
* @param {Object} options
32-
* @param {Boolean} options.base64 Whether to 'return' the generated file as a base64 string
33-
* @param {Function} options.success The callback function to run after workbook creation is successful.
34-
* @param {Function} options.error The callback function to run if there is an error creating the workbook.
35-
* @param {String} options.requireJsPath (Optional) The path to requirejs. Will use the id 'requirejs' to look up the script if not specified.
36-
*/
37-
createFileAsync: function (workbook, options) {
38-
39-
40-
workbook.generateFilesAsync({
41-
success: function (files) {
42-
43-
var worker = new Worker(require.toUrl('./Excel/ZipWorker.js'));
44-
worker.addEventListener('message', function(event) {
45-
if(event.data.status === 'done') {
46-
options.success(event.data.data);
47-
}
48-
});
49-
worker.postMessage({
50-
files: files,
51-
ziplib: require.toUrl('JSZip'),
52-
base64: (!options || options.base64 !== false)
53-
});
54-
},
55-
error: function () {
56-
options.error();
57-
}
58-
});
59-
},
60-
6128
/**
6229
* Turns a workbook into a downloadable file.
6330
* @param {Excel/Workbook} workbook The workbook that is being converted
@@ -83,4 +50,4 @@ var Factory = {
8350
};
8451

8552

86-
module.exports = Factory;
53+
module.exports = Factory;

0 commit comments

Comments
 (0)