Skip to content

Commit 14bf81c

Browse files
authored
Fix JavaScript usage before iOS 13.4 (#208)
Former-commit-id: a750af6
1 parent 3cdfda1 commit 14bf81c

File tree

17 files changed

+18064
-4211
lines changed

17 files changed

+18064
-4211
lines changed

navigator/.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v2
1919
- name: Install dependencies
20-
run: npm install --prefix "$scripts"
20+
run: make install
2121
- name: Lint JavaScript
2222
run: yarn --cwd "$scripts" run lint
2323
- name: Check JavaScript formatting
2424
run: yarn --cwd "$scripts" run checkformat
2525
- name: Check if bundled scripts are up-to-date
2626
run: |
2727
make scripts
28-
git diff --exit-code --name-only r2-navigator-swift/EPUB/Assets/Static/scripts
28+
git diff --exit-code --name-only r2-navigator-swift/EPUB/Assets/Static/scripts/*.js

navigator/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ SCRIPTS_PATH := r2-navigator-swift/EPUB/Scripts
44
help:
55
@echo "Usage: make <target>\n\n\
66
carthage\tGenerate the Carthage Xcode project\n\
7+
install\tDownload NPM dependencies\n\
78
scripts\tBundle EPUB scripts with Webpack\n\
89
lint-scripts\tCheck quality of EPUB scripts\n\
910
"
1011

12+
install:
13+
yarn --cwd "$(SCRIPTS_PATH)" install
14+
1115
scripts:
1216
yarn --cwd "$(SCRIPTS_PATH)" run format
1317
yarn --cwd "$(SCRIPTS_PATH)" run bundle

navigator/Package.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ let package = Package(
3131
.product(name: "R2Shared", package: "r2-shared-swift"),
3232
],
3333
path: "./r2-navigator-swift/",
34-
exclude: ["Info.plist"],
34+
exclude: [
35+
"Info.plist",
36+
"EPUB/Scripts"
37+
],
3538
resources: [
3639
.copy("EPUB/Assets"),
3740
.process("Resources"),

navigator/R2Navigator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
66
s.summary = "R2 Navigator"
77
s.homepage = "http://readium.github.io"
88
s.author = { "Readium" => "contact@readium.org" }
9-
s.source = { :git => "https://github.com/readium/r2-navigator-swift.git", :branch => "develop" }
9+
s.source = { :git => "https://github.com/readium/r2-navigator-swift.git", :branch => "fix/js-ios12" }
1010
s.exclude_files = ["**/Info*.plist"]
1111
s.requires_arc = true
1212
s.resources = ['r2-navigator-swift/Resources/**', 'r2-navigator-swift/EPUB/Assets']

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-fixed-wrapper.js

Lines changed: 151 additions & 1 deletion
Large diffs are not rendered by default.

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-fixed-wrapper.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-fixed.js

Lines changed: 8055 additions & 1 deletion
Large diffs are not rendered by default.

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-fixed.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-reflowable.js

Lines changed: 8087 additions & 1 deletion
Large diffs are not rendered by default.

navigator/r2-navigator-swift/EPUB/Assets/Static/scripts/readium-reflowable.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)