Frontend, TypeScript, JavaScript, CSS, Ionic, Material-UI, React, Redux, react-app-rewired, Webpack 5, in-memory file system, server side redirection, IndexedDB, zip.js (read large zip by file stream on mobile device), web font, Service Worker, workbox, speechSynthesis, ePub Viewer, Progressive Web App (PWA), Android, Google Play Store, Windows 10, Microsoft Store, iPhone, iPad, iOS, iPadOS, App Store, WKWebView, macOS, Mac App Store (MAS), Linux, Snap Store, Flathub, Copr, Electron, electron-builder, Backend, XML, XSLT, GitHub Actions, CircleCI
- Required software:
- Node 16: nvm is recommended: https://github.com/nvm-sh/nvm
- Run Shell script:
git clone --recursive https://github.com/MrMYHuang/cbetar2.git
cd cbetar2
npm i
npm run start
- Run Shell script:
cd cbetar2
npm i
npm run debug-electron
- Attach to the NodeJS app by VS Code
- Run Shell script:
cd cbetar2
npm i
npm run start-sw
- Generate and install the following certificates from https://developer.apple.com/account/resources/certificates/list
- Apple Development
- Apple Distribution (for dist-mas)
- Mac Developer (for dist-mas-dev)
- 3rd Party Mac Developer Application
- 3rd Party Mac Developer Installer (for dist-mas)
- Developer ID Application (for dist-mac)
- Developer ID Installer (for dist-mac)
- Development provisionprofile with cert Mac Development (for dist-mas-dev)
- App Store provisionprofile with cert Apple Distribution (for dist-mas)
- Run Shell script:
cd cbetar2
npm i
npm run dist-mas-dev
- Open dist/mas-dev/foo.app
npm run build
Upload files under build folder to your github.io.
Notice! This app uses client side routing for page navigation. Without loading this app (and its client side router) once, a client side route is resolved as a server side route by browser! Generally, the web server serving this app can't resolve this route and thus responses a 404 error. To solve this problem, this repo provides a 404.html for GitHub.io web server. When the GitHub.io server can't resolve a client side route, it redirects to 404.html, which further redirect to URL of this app with path info of the route. For example, if a user on a new PC opens this URL
https://mrmyhuang.github.io/bookmarks
, the GitHub.io server can't find bookmarks/index.html and thus redirects the resource to 404.html. Our 404.html extracts the app path "/bookmarks" and redirects the browser to the app URL https://mrmyhuang.github.io/ with query parameter ?route=/bookmarks
. After the app and its client side router loaded, the app redirects itself by using the original URL https://mrmyhuang.github.io/bookmarks by its router!
If a developer wants to migrate this app to other web servers, please use a similar server side redirection technique to correctly do the client side routing.
Please use PWA Builder. https://www.pwabuilder.com/
Note: The Mac Catalyst app in this section has limited functions. It is recommended to use Electron Mac Store app for submission as in next section!
- Required software:
- CocoaPods: https://guides.cocoapods.org/using/getting-started.html
- Xcode 13
- Run Shell script:
cd cbetar2
cd ios
- Open cbetar2.xcworkspace by Xcode...
- Run Shell script:
cd cbetar2
npm i
npm run dist-mas
- Upload dist/mas/foo.pkg to App Store Connect by Transporter: https://apps.apple.com/tw/app/transporter/id1450874784
- Run Shell script:
export [email protected]
# An app-specific password. You can create one at appleid.apple.com.
export APPLE_ID_PASSWORD=yourAppleIdAppPassword
# Found at https://developer.apple.com/account/#!/membership
export APPLE_TEAM_ID=yourTeamId
npm i
npm run dist-mac
-
Required software:
- snapd: https://snapcraft.io/docs/installing-snapd
- snapcraft:
snap install snapcraft snapcraft login
-
Run Shell script:
cd cbetar2
npm i
npm run dist-snap
# or
#npm run dist-snap -- --use-lxd
- Upload by this example command:
npm run publish-snap
-
Required software:
- Fedora is recommended.
- flatpak-node-generator:
git clone https://github.com/flatpak/flatpak-builder-tools.git cd flatpak-builder-tools/node pipx install .
-
Run shell script :
cd cbetar2
# x.y.z from version in package.json.
git tag x.y.z
git clone https://github.com/flathub/io.github.mrmyhuang.cbetar2.git flatpak
yarn
yarn run prepare-flatpak
flatpak install -y org.freedesktop.Sdk//22.08 org.electronjs.Electron2.BaseApp//22.08 org.freedesktop.Sdk.Extension.node16//22.08
yarn run dist-flatpak-dev
-
Required software:
- Fedora is recommended.
- flatpak-node-generator:
-
Update package.json version to x.y.z. Then, commit it and tag with x.y.z.
-
Run shell script :
cd cbetar2
# x.y.z from version in package.json.
git tag x.y.z
yarn i
yarn run prepare-flatpak
cd flatpak
git add *
git commit -m "* Version x.y.z"
git push
-
CI/CD setting files: GitHub Actions: .github/workflows/publish.yml CircleCI:
- .circleci/config.yml
- CircleCI project environment variables: GH_TOKEN: GitHub token SNAPCRAFT_STORE_CREDENTIALS: generated by tools/snapCiCdKey.sh
-
Tag one commit with format vx.y.z
git clone https://aur.archlinux.org/cbetar2.git
cd cbetar2
makepkg
sudo pacman -U cbetar2*.tar.xz