From 67612ae9208be82b1fb9bd963fdedba568c8c80f Mon Sep 17 00:00:00 2001 From: SheetJS Date: Mon, 24 Jul 2023 22:31:22 -0400 Subject: [PATCH] w10 --- docz/docs/03-demos/01-frontend/03-angular.md | 58 +++++++++++++++--- .../03-demos/06-desktop/06-reactnative.md | 32 ++++++---- docz/docs/03-demos/07-data/09-alasql.md | 2 +- docz/docs/03-demos/12-engines/01_duktape.md | 3 +- docz/docs/03-demos/12-engines/04_jsc.md | 2 +- docz/docs/03-demos/12-engines/08_quickjs.md | 7 ++- docz/docs/03-demos/12-engines/09_hermes.md | 2 +- docz/docs/03-demos/12-engines/15_rb.md | 17 ++++- docz/docs/09-miscellany/05-contributing.md | 21 ++++++- docz/static/hermes/Makefile | 4 +- docz/static/reactnative/rnw.png | Bin 11658 -> 12207 bytes 11 files changed, 116 insertions(+), 32 deletions(-) diff --git a/docz/docs/03-demos/01-frontend/03-angular.md b/docz/docs/03-demos/01-frontend/03-angular.md index 5692c61..78480bb 100644 --- a/docz/docs/03-demos/01-frontend/03-angular.md +++ b/docz/docs/03-demos/01-frontend/03-angular.md @@ -39,6 +39,8 @@ analytics globally through the CLI tool before creating a new project: npx @angular/cli analytics disable -g ``` +(If prompted to share data, type `N` and press Enter) + ::: @@ -154,13 +156,21 @@ export class AppComponent { :::note -This demo was last run on 2023 February 21 using Angular CLI `15.1.6` +This demo was last run on 2023-07-24 using Angular CLI `16.1.5` ::: -0) Disable telemetry with `npx @angular/cli analytics disable -g` +0) Disable telemetry: -1) Run `ng new --minimal --defaults --no-interactive sheetjs-angular`. +```bash +npx @angular/cli analytics disable -g +``` + +1) Create a new project: + +```bash +npx @angular/cli new --minimal --defaults --no-interactive sheetjs-angular +``` 2) Install the SheetJS dependency and start the dev server: @@ -177,9 +187,20 @@ npm start`} 4) Replace `src/app/app.component.ts` with the code snippet. The page will refresh and show a table with an Export button. Click the button -and the page will attempt to download `SheetJSAngularAoA.xlsx`. +and the page will attempt to download `SheetJSAngularAoO.xlsx`. + +5) Stop the dev server and build the site: + +```bash +npm run build +``` + +To test the generated site, start a web server: + +```bash +npx -y http-server dist/sheetjs-angular/ +``` -5) Build the site with `npm run build`, then test with `npx http-server dist`. Access `http://localhost:8080` with a web browser to test the bundled site. @@ -242,13 +263,21 @@ export class AppComponent { :::note -This demo was last run on 2023 February 21 using Angular CLI `15.1.6` +This demo was last run on 2023-07-24 using Angular CLI `16.1.5` ::: -0) Disable telemetry with `npx @angular/cli analytics disable -g` +0) Disable telemetry: -1) Run `ng new --minimal --defaults --no-interactive sheetjs-angular`. +```bash +npx @angular/cli analytics disable -g +``` + +1) Create a new project: + +```bash +npx @angular/cli new --minimal --defaults --no-interactive sheetjs-angular +``` 2) Install the SheetJS dependency and start the dev server: @@ -267,7 +296,18 @@ npm start`} The page will refresh and show a table with an Export button. Click the button and the page will attempt to download `SheetJSAngularHTML.xlsx`. -5) Build the site with `npm run build`, then test with `npx http-server dist`. +5) Stop the dev server and build the site: + +```bash +npm run build +``` + +To test the generated site, start a web server: + +```bash +npx -y http-server dist/sheetjs-angular/ +``` + Access `http://localhost:8080` with a web browser to test the bundled site. diff --git a/docz/docs/03-demos/06-desktop/06-reactnative.md b/docz/docs/03-demos/06-desktop/06-reactnative.md index ac416aa..5af0591 100644 --- a/docz/docs/03-demos/06-desktop/06-reactnative.md +++ b/docz/docs/03-demos/06-desktop/06-reactnative.md @@ -48,7 +48,7 @@ This demo was tested in the following environments: | OS and Version | Arch | RN Platform | Date | |:---------------|:-----|:------------|:-----------| -| Windows 10 | x64 | `v0.70.10` | 2023-01-04 | +| Windows 10 | x64 | `v0.71.25` | 2023-07-24 | | Windows 11 | x64 | `v0.71.11` | 2023-05-11 | | MacOS 12.6 | x64 | `v0.71.26` | 2023-07-23 | | MacOS 13.4 | arm | `v0.71.18` | 2023-07-06 | @@ -391,6 +391,8 @@ used to switch the NodeJS version. ::: +### Project Setup + 1) Create a new project using React Native `0.71`: ```bash @@ -398,7 +400,7 @@ npx react-native init SheetJSWin --template react-native@^0.71.0 cd SheetJSWin ``` -Create the Windows part of the application: +2) Create the Windows part of the application: @@ -417,13 +419,13 @@ npx react-native-windows-init --no-telemetry --overwrite -Install the SheetJS library: +3) Install the SheetJS library: {`\ npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} -To ensure that the app works, launch the app: +4) To ensure that the app works, launch the app: ```bash npx react-native run-windows --no-telemetry @@ -439,10 +441,12 @@ Specific Windows SDK versions can be installed through Visual Studio Installer. ::: +### Native Module + -2) Download [`DocumentPicker.cs`](pathname:///reactnative/DocumentPicker.cs) and +5) Download [`DocumentPicker.cs`](pathname:///reactnative/DocumentPicker.cs) and save to `windows\SheetJSWin\DocumentPicker.cs`. @@ -464,7 +468,7 @@ curl -Lo windows/SheetJSWin/DocumentPicker.cs https://docs.sheetjs.com/reactnati -3) Add the highlighted line to `windows\SheetJSWin\SheetJSWin.csproj`. Look for +6) Add the highlighted line to `windows\SheetJSWin\SheetJSWin.csproj`. Look for the `ItemGroup` that contains `ReactPackageProvider.cs`: ```xml title="windows\SheetJSWin\SheetJSWin.csproj" @@ -477,7 +481,7 @@ the `ItemGroup` that contains `ReactPackageProvider.cs`: -2) Download [`DocumentPicker.h`](pathname:///reactnative/DocumentPicker.h) and +5) Download [`DocumentPicker.h`](pathname:///reactnative/DocumentPicker.h) and save to `windows\SheetJSWin\DocumentPicker.h`. @@ -497,7 +501,7 @@ curl -Lo windows/SheetJSWin/DocumentPicker.h https://docs.sheetjs.com/reactnativ -3) Add the highlighted line to `windows\SheetJSWin\ReactPackageProvider.cpp`: +6) Add the highlighted line to `windows\SheetJSWin\ReactPackageProvider.cpp`: ```cpp title="windows\SheetJSWin\ReactPackageProvider.cpp" #include "ReactPackageProvider.h" @@ -511,7 +515,9 @@ curl -Lo windows/SheetJSWin/DocumentPicker.h https://docs.sheetjs.com/reactnativ Now the native module will be added to the app. -4) Remove `App.js` (if it exists) and download [`App.tsx`](https://docs.sheetjs.com/reactnative/rnw/App.tsx): +### Application + +7) Remove `App.js` (if it exists) and download [`App.tsx`](https://docs.sheetjs.com/reactnative/rnw/App.tsx): @@ -532,14 +538,16 @@ curl -LO https://docs.sheetjs.com/reactnative/rnw/App.tsx -5) Test the app again: +8) Test the app again: ```bash npx react-native run-windows --no-telemetry ``` -Download , then click on "open file". Use the -file picker to select the `pres.xlsx` file and the app will show the data. +Download . + +Click "Click here to Open File!" and use the file picker to select `pres.xlsx` . +The app will refresh and display the data from the file. ## macOS Demo diff --git a/docz/docs/03-demos/07-data/09-alasql.md b/docz/docs/03-demos/07-data/09-alasql.md index a96f292..d5a91b9 100644 --- a/docz/docs/03-demos/07-data/09-alasql.md +++ b/docz/docs/03-demos/07-data/09-alasql.md @@ -26,7 +26,7 @@ This demo was tested in the following environments: | Environment | AlaSQL | Date | |:--------------------|:-------|:----------:| -| NodeJS | 3.1.0 | 2023-02-23 | +| NodeJS | 3.1.0 | 2023-07-24 | | Standalone (Chrome) | 3.0.0 | 2023-04-09 | ::: diff --git a/docz/docs/03-demos/12-engines/01_duktape.md b/docz/docs/03-demos/12-engines/01_duktape.md index 27f7714..00bfc0d 100644 --- a/docz/docs/03-demos/12-engines/01_duktape.md +++ b/docz/docs/03-demos/12-engines/01_duktape.md @@ -117,9 +117,10 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| -| `darwin-x64` | `2.7.0` | 2023-02-12 | +| `darwin-x64` | `2.7.0` | 2023-07-24 | | `darwin-arm` | `2.7.0` | 2023-06-05 | | `linux-x64` | `2.7.0` | 2023-06-02 | +| `win10-x64` | `2.7.0` | 2023-07-24 | ::: diff --git a/docz/docs/03-demos/12-engines/04_jsc.md b/docz/docs/03-demos/12-engines/04_jsc.md index 3c4aa61..5fc2833 100644 --- a/docz/docs/03-demos/12-engines/04_jsc.md +++ b/docz/docs/03-demos/12-engines/04_jsc.md @@ -133,7 +133,7 @@ This demo was tested in the following environments: | Architecture | Swift | Date | |:-------------|:--------|:-----------| -| `darwin-x64` | `5.7.2` | 2023-02-12 | +| `darwin-x64` | `5.8.1` | 2023-07-24 | | `darwin-arm` | `5.8.1` | 2023-06-05 | ::: diff --git a/docz/docs/03-demos/12-engines/08_quickjs.md b/docz/docs/03-demos/12-engines/08_quickjs.md index 41e590a..94d4c96 100644 --- a/docz/docs/03-demos/12-engines/08_quickjs.md +++ b/docz/docs/03-demos/12-engines/08_quickjs.md @@ -26,7 +26,7 @@ command-line tool for reading data from files. ## Integration Details -:::note +:::note pass Many QuickJS functions are not documented. The explanation was verified against the latest release (commit `2788d71`). @@ -264,9 +264,10 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| -| `darwin-x64` | `2788d71` | 2023-02-12 | +| `darwin-x64` | `2788d71` | 2023-07-24 | | `darwin-arm` | `2788d71` | 2023-06-05 | | `linux-x64` | `2788d71` | 2023-06-02 | +| `win10-x64` | `2788d71` | 2023-07-24 | When the demo was tested, commit `2788d71` corresponded to the latest release. @@ -298,7 +299,7 @@ curl -LO https://docs.sheetjs.com/quickjs/sheetjs.quick.c 3) Build the sample application: ```bash -gcc -o sheetjs.quick -Wall -lm sheetjs.quick.c libquickjs.a +gcc -o sheetjs.quick -Wall sheetjs.quick.c libquickjs.a -lm ``` This program tries to parse the file specified by the first argument diff --git a/docz/docs/03-demos/12-engines/09_hermes.md b/docz/docs/03-demos/12-engines/09_hermes.md index a3dd398..cdeb7f6 100644 --- a/docz/docs/03-demos/12-engines/09_hermes.md +++ b/docz/docs/03-demos/12-engines/09_hermes.md @@ -179,7 +179,7 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| -| `darwin-x64` | `869312f` | 2023-05-30 | +| `darwin-x64` | `9f8603b` | 2023-07-24 | | `darwin-arm` | `869312f` | 2023-06-05 | ::: diff --git a/docz/docs/03-demos/12-engines/15_rb.md b/docz/docs/03-demos/12-engines/15_rb.md index a9cea1e..0cb9826 100644 --- a/docz/docs/03-demos/12-engines/15_rb.md +++ b/docz/docs/03-demos/12-engines/15_rb.md @@ -65,7 +65,12 @@ The `strict_` variants ensure that no newlines are added to the strings. :::note -This demo was tested on 2023 February 14. +This demo was tested in the following deployments: + +| Platform | Ruby | ExecJS | Date | +|:-------------|:---------|:--------|:-----------| +| `darwin-x64` | `2.7.6` | `2.8.1` | 2023-07-24 | +| `darwin-arm` | `2.6.10` | `2.8.1` | 2023-07-24 | ::: @@ -75,6 +80,16 @@ This demo was tested on 2023 February 14. gem install execjs ``` +:::note + +The command may need to be run as an administrator or root user: + +```bash +sudo gem install execjs +``` + +::: + 1) Download the standalone script and test file: