diff --git a/docz/docs/02-getting-started/01-installation/06-deno.md b/docz/docs/02-getting-started/01-installation/06-deno.md index 922dc01..6fa965e 100644 --- a/docz/docs/02-getting-started/01-installation/06-deno.md +++ b/docz/docs/02-getting-started/01-installation/06-deno.md @@ -40,31 +40,6 @@ import * as cptable from 'https://cdn.sheetjs.com/xlsx-${current}/package/dist/c XLSX.set_cptable(cptable);`} -## Node Compatibility Mode - -:::caution - -Node Compatibility Mode is useful for migrating existing NodeJS scripts to Deno. -It is considered unstable by the platform developers. - -For greenfield Deno projects, HTTP imports are strongly recommended. - -::: - -The ["NodeJS" installation section](/docs/getting-started/installation/nodejs) -includes instructions for installing the NodeJS package. - -After installing, the `std/node` require can be used directly: - -```ts -/* load the `require` machinery */ -import { createRequire } from "https://deno.land/std/node/module.ts"; -const require = createRequire(import.meta.url); - -/* require the library */ -const XLSX = require("xlsx"); -``` - ## Upgrade Notes Upgrading to the latest version involves changing the import URLs. The import diff --git a/docz/docs/03-demos/05-mobile/04-ionic.md b/docz/docs/03-demos/05-mobile/04-ionic.md index 1854b3d..a0e81fd 100644 --- a/docz/docs/03-demos/05-mobile/04-ionic.md +++ b/docz/docs/03-demos/05-mobile/04-ionic.md @@ -14,10 +14,15 @@ The "Complete Example" creates an app that looks like the screenshots below: +
iOSAndroid
![iOS screenshot](pathname:///ionic/ios.png) + + +![Android screenshot](pathname:///ionic/and.png) +
@@ -99,11 +104,13 @@ this.file.writeFile(url, filename, blob, {replace: true}); :::note -This demo was tested on an Intel Mac on 2023 March 19 with Cordova. +This demo was tested on an Intel Mac on 2023 March 28 with Cordova. The file integration uses `@ionic-native/file` version `5.36.0`. The iOS simulator runs iOS 16.5 on an iPhone SE (3rd Generation). +The Android simulator runs Android 12.0 (S) API 31 on a Pixel 3. + ::: 0) Disable telemetry as noted in the warning. @@ -111,7 +118,7 @@ The iOS simulator runs iOS 16.5 on an iPhone SE (3rd Generation). Install required global dependencies: ```bash -npm i -g cordova-res @angular/cli native-run +npm i -g cordova-res @angular/cli native-run @ionic/cli ``` Follow the [React Native demo](/docs/demos/mobile/reactnative) to ensure iOS and Android sims are ready. @@ -120,7 +127,7 @@ Follow the [React Native demo](/docs/demos/mobile/reactnative) to ensure iOS and 1) Create a new project: ```bash -npx @ionic/cli start SheetJSIonic blank --type angular --cordova --quiet --no-git --no-link --confirm +ionic start SheetJSIonic blank --type angular --cordova --quiet --no-git --no-link --confirm ``` If a prompt asks to confirm Cordova use, enter `Yes` to continue. @@ -131,28 +138,48 @@ If a prompt asks about creating an Ionic account, enter `N` to opt out. ```bash cd SheetJSIonic -npx @ionic/cli cordova platform add ios --confirm -npx @ionic/cli cordova plugin add cordova-plugin-file +ionic cordova plugin add cordova-plugin-file +ionic cordova platform add ios --confirm +ionic cordova platform add android --confirm npm install --save @ionic-native/core @ionic-native/file @ionic/cordova-builders ``` -:::caution +:::note -In some test runs, the `plugin add cordova-plugin-file` step reported an error: +If `cordova-plugin-file` is added before the platforms, installation may fail: ``` CordovaError: Could not load API for ios project ``` -This was resolved by removing and reinstalling the `ios` platform: +This can be resolved by removing and reinstalling the `ios` platform: ```bash -npx @ionic/cli cordova platform rm ios -npx @ionic/cli cordova platform add ios --confirm +ionic cordova platform rm ios +ionic cordova platform add ios --confirm ``` ::: +:::caution + +If the `npm install` fails due to `rxjs` resolution, add the highlighted lines +to `package.json` to force a resolution: + +```js title="package.json" + "private": true, + // highlight-start + "overrides": { + "rxjs": "~7.5.0" + }, + // highlight-end + "dependencies": { +``` + +After adding the lines, the `npm install` command will succeed. + +::: + 3) Install dependencies: ```bash @@ -188,7 +215,7 @@ curl -o src/app/home/home.page.ts -L https://docs.sheetjs.com/ionic/home.page.ts **iOS Testing** ```bash -npx @ionic/cli cordova emulate ios +ionic cordova emulate ios ``` :::caution @@ -207,3 +234,25 @@ npm i --save cordova-ios ``` ::: + +**Android Testing** + +```bash +ionic cordova emulate android +``` + +:::caution + +In some test runs, `cordova build android --emulator` step failed with error: + +``` +Could not find or parse valid build output file +``` + +This was resolved by forcefully installing `cordova-android`: + +```bash +npm i --save cordova-android +``` + +::: diff --git a/docz/docs/index.md b/docz/docs/index.md index 99054d2..8e65715 100644 --- a/docz/docs/index.md +++ b/docz/docs/index.md @@ -6,12 +6,6 @@ title: Overview # SheetJS CE -![License](https://img.shields.io/github/license/SheetJS/sheetjs) -[![Build Status](https://img.shields.io/github/actions/workflow/status/sheetjs/sheetjs/node-4+.yml?branch=master)](https://github.com/SheetJS/sheetjs/actions/workflows/node-4+.yml) -[![Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/SheetJS/sheetjs)](https://snyk.io/test/github/SheetJS/sheetjs) -[![npm Downloads](https://img.shields.io/npm/dm/xlsx.svg)](https://cdn.sheetjs.com/) -[![GitHub stars](https://img.shields.io/github/stars/SheetJS/sheetjs?style=social)](https://github.com/SheetJS/sheetjs) - SheetJS Community Edition offers battle-tested open-source solutions for extracting useful data from almost any complex spreadsheet and generating new spreadsheets that will work with legacy and modern software alike. diff --git a/docz/static/ionic/and.png b/docz/static/ionic/and.png new file mode 100644 index 0000000..574db1c Binary files /dev/null and b/docz/static/ionic/and.png differ