From e07e52ca554460398c98ea13130ce6ae00e952b3 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Thu, 19 May 2022 23:25:45 -0400 Subject: [PATCH] extendscript --- docz/docs/05-interface.md | 2 +- docz/docs/06-solutions/05-output.md | 13 ---------- docz/docs/09-miscellany/06-testing.md | 28 +++++++++------------- docz/docs/09-miscellany/07-contributing.md | 14 +++++------ 4 files changed, 19 insertions(+), 38 deletions(-) diff --git a/docz/docs/05-interface.md b/docz/docs/05-interface.md index 68a7aa4..cf9ff0c 100644 --- a/docz/docs/05-interface.md +++ b/docz/docs/05-interface.md @@ -8,7 +8,7 @@ sidebar_position: 5 `XLSX.version` is the version of the library (added by the build script). -`XLSX.SSF` is an embedded version of the [format library](https://github.com/SheetJS/ssf). +`XLSX.SSF` is an embedded version of the [format library](https://github.com/SheetJS/sheetjs/tree/master/packages/ssf). ## Parsing functions diff --git a/docz/docs/06-solutions/05-output.md b/docz/docs/06-solutions/05-output.md index 10cde1c..34d2c4d 100644 --- a/docz/docs/06-solutions/05-output.md +++ b/docz/docs/06-solutions/05-output.md @@ -140,19 +140,6 @@ XLSX.writeFile(workbook, "out.xlsb"); `XLSX.writeFile` techniques work for most modern browsers as well as older IE. For much older browsers, there are workarounds implemented by wrapper libraries. -[`FileSaver.js`](https://github.com/eligrey/FileSaver.js/) implements `saveAs`. -Note: `XLSX.writeFile` will automatically call `saveAs` if available. - -```js -/* bookType can be any supported output type */ -var wopts = { bookType:"xlsx", bookSST:false, type:"array" }; - -var wbout = XLSX.write(workbook,wopts); - -/* the saveAs call downloads a file on the local machine */ -saveAs(new Blob([wbout],{type:"application/octet-stream"}), "test.xlsx"); -``` - [`Downloadify`](https://github.com/dcneiner/downloadify) uses a Flash SWF button to generate local files, suitable for environments where ActiveX is unavailable: diff --git a/docz/docs/09-miscellany/06-testing.md b/docz/docs/09-miscellany/06-testing.md index f93ef6a..c7b3735 100644 --- a/docz/docs/09-miscellany/06-testing.md +++ b/docz/docs/09-miscellany/06-testing.md @@ -18,11 +18,6 @@ you want to test. Feature-specific tests are available with `make test_misc` ```bash $ make test_misc # run core tests $ make test # run full tests -$ make test_xls # only use the XLS test files -$ make test_xlsx # only use the XLSX test files -$ make test_xlsb # only use the XLSB test files -$ make test_xml # only use the XML test files -$ make test_ods # only use the ODS test files ``` To enable all errors, set the environment variable `WTF=1`: @@ -36,7 +31,6 @@ $ WTF=1 make test # enable all error messages ```bash $ make lint # eslint checks -$ make flow # make lint + Flow checking $ make tslint # check TS definitions ``` @@ -50,23 +44,23 @@ Start a local server and navigate to that directory to run the tests. `make ctest` will generate the browser fixtures. To add more files, edit the `tests/fixtures.lst` file and add the paths. -To run the full in-browser tests, clone the repo for -[`oss.sheetjs.com`](https://github.com/SheetJS/SheetJS.github.io) and replace -the `xlsx.js` file (then open a browser window and go to `stress.html`): - -```bash -$ cp xlsx.js ../SheetJS.github.io -$ cd ../SheetJS.github.io -$ simplehttpserver # or "python -mSimpleHTTPServer" or "serve" -$ open -a Chromium.app http://localhost:8000/stress.html -``` - `make test-deno` will run the full Deno test suite and `make test-deno_misc` will run the smaller feature-specific tests. + + + +`make dist` will build `xlsx.extendscript.js`. + +The script `estk.jsx` at the root of the project is configured to run in +ExtendScript Toolkit. It will read `sheetjs.xlsx` and attempt to write test +files in a number of file formats. + +ExtendScript Toolkit 3.5 is available as a standalone download for Windows. + diff --git a/docz/docs/09-miscellany/07-contributing.md b/docz/docs/09-miscellany/07-contributing.md index d230e2a..46acebb 100644 --- a/docz/docs/09-miscellany/07-contributing.md +++ b/docz/docs/09-miscellany/07-contributing.md @@ -31,7 +31,7 @@ Folders: After cloning the repo, running `make help` will display a list of commands. -## Platform-Specific Setup +## OS-Specific Setup import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; @@ -75,12 +75,6 @@ chmod +x compile-git-with-openssl.sh ./compile-git-with-openssl.sh ``` -4) (For deno testing) Install deno: - -```bash -curl -fsSL https://deno.land/install.sh | sh -``` - (instructions continued in the OSX/Linux part) @@ -132,6 +126,12 @@ make test_misc # Full Build cd modules; make; cd .. make dist +``` + +4) (For deno testing) Install deno: + +```bash +curl -fsSL https://deno.land/install.sh | sh ```