Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill gh pages #99

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@ name: Continuous integration
on: pull_request
jobs:
ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache the node_modules dir
uses: actions/cache@v2
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Install
run: |
sudo apt-get install clang-format ninja-build
npm install
node-version-file: '.node-version'
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install apt deps
run: sudo apt-get install clang-format ninja-build
- name: Install npm deps
run: npm ci
- name: Build library
run: make lib
- name: Build examples
run: make examples
- name: Typecheck
run: make typecheck
- name: Check formatting
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.1.0
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ FALLBACK_INSTALL_DIR=$(INSTALL_DIR)/fallback
DIST_TARGETS=\
dist/tesseract-core.wasm \
dist/tesseract-core-fallback.wasm \
dist/lib.js \
dist/tesseract-worker.js
dist/lib.js

.PHONY: lib
lib: $(DIST_TARGETS)
Expand All @@ -33,7 +32,7 @@ format:
.PHONY: checkformat
checkformat:
clang-format -Werror --dry-run --style=google src/*.cpp
node_modules/.bin/prettier --check {examples,src,test}/**/*.js
node_modules/.bin/prettier --check {src,test}/**/*.js


.PHONY: typecheck
Expand All @@ -46,17 +45,13 @@ api-docs:

.PHONY: test
test: third_party/tessdata_fast
node_modules/.bin/mocha
node --test test/ocr-engine-test.js

.PHONY: release
release: clean lib typecheck test
@which np || (echo "Install np from https://github.com/sindresorhus/np" && false)
np minor

.PHONY: gh-pages
gh-pages:
./update-gh-pages.sh

third_party/emsdk: third_party_versions.mk
mkdir -p third_party/emsdk
test -d $@/.git || git clone --depth 1 https://github.com/emscripten-core/emsdk.git $@
Expand Down Expand Up @@ -191,5 +186,5 @@ dist/tesseract-core-fallback.wasm: build/tesseract-core-fallback.wasm
mkdir -p dist/
cp $< $@

dist/lib.js dist/tesseract-worker.js: src/*.ts build/tesseract-core.js build/tesseract-core.wasm build/tesseract-core-fallback.wasm
dist/lib.js: src/*.ts build/tesseract-core.js build/tesseract-core.wasm build/tesseract-core-fallback.wasm
node_modules/.bin/rollup -c rollup.config.js
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ This Tesseract build has been optimized for use in the browser by:
npm install tesseract-wasm
```

2. Serve the `tesseract-core.wasm`, `tesseract-core-fallback.wasm` and
`tesseract-worker.js` files from `node_modules/tesseract-wasm/dist` alongside
2. Serve the `tesseract-core.wasm` and `tesseract-core-fallback.wasm`
files from `node_modules/tesseract-wasm/dist` alongside
your JavaScript bundle.

3. Get the training data file(s) for the languages you want to support from the
Expand Down
1 change: 0 additions & 1 deletion examples/node-cli/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions examples/node-cli/README.md

This file was deleted.

62 changes: 0 additions & 62 deletions examples/node-cli/ocr.js

This file was deleted.

Loading