Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
build: update infrastructure (#54)
Browse files Browse the repository at this point in the history
* Update node from 14 to 20

* build: update infrastructure

* choire: add license, author, url

* chore: cleanup

* fix: handle promises correctly

* chore: add prettier

* chore: using marking locator

* fix: udpate deps, revert to double quotes in dependabot yaml

* fix: revert to double quotes in dependabot yaml

---------

Co-authored-by: Thilo Mühlberg <thilo.muehlberg@acrolinx.com>
  • Loading branch information
abhijeetnarvekar and Thilo-Acrolinx authored Jul 12, 2024
1 parent dcc09d5 commit 635c32c
Show file tree
Hide file tree
Showing 26 changed files with 5,378 additions and 16,138 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TEST_SERVER_URL=
ACROLINX_API_TOKEN=
TEST_HEADLESS=
11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
};
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@ on:
push:
branches: [main]
schedule:
- cron: '0 2 * * *' # Everyday at 2:00AM
- cron: '0 2 * * *'
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
TEST_SERVER_URL: ${{ secrets.TEST_SERVER_URL }}
ACROLINX_API_TOKEN: ${{ secrets.ACROLINX_API_TOKEN }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.JS
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20

- name: Build And Run Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: ${{ github.actor == "dependabot[bot]" }}
steps:
- name: Dependabot metadata
id: metadata
Expand Down
44 changes: 21 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
src/react-app-env.d.ts
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.private
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
tmp
.env
/tmp

# Eclipse
.project
38 changes: 19 additions & 19 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"MD004": {
"style": "sublist"
},
"MD007": {
"indent": 4
},
"MD013": {
"line_length": 120,
"tables": false,
"code_blocks": false
},
"MD024": {
"siblings_only": true
},
"MD026": {
"punctuation": ".,;:!"
},
"MD038": false
}
"MD004": {
"style": "sublist"
},
"MD007": {
"indent": 4
},
"MD013": {
"line_length": 120,
"tables": false,
"code_blocks": false
},
"MD024": {
"siblings_only": true
},
"MD026": {
"punctuation": ".,;:!"
},
"MD038": false
}
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ This Acrolinx App demonstrates how to implement a simple Acrolinx App in the Acr

Demonstrated Features:

* Extract text from document
* Select Ranges
* Replace Ranges
- Extract text from document
- Select Ranges
- Replace Ranges

This app uses the [Acrolinx App SDK](https://github.com/acrolinx/app-sdk-js).

Expand All @@ -23,31 +23,31 @@ In the project directory, you can run:

### `npm start`

* Runs the app in the development mode.
* Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
* The page will reload if you make edits.
* You’ll also see any linter errors in the console.
- Runs the app in the development mode.
- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
- The page will reload if you make edits.
- You’ll also see any linter errors in the console.

### `npm run startHttps` on Linux

* Runs the app in the development mode.
* Open [https://localhost:3000](http://localhost:3000) to view it in the browser.
* The page will reload if you make edits.
* You’ll also see any linter errors in the console.
* Windows users should read: [Using HTTPS in Development](https://facebook.github.io/create-react-app/docs/using-https-in-development)
- Runs the app in the development mode.
- Open [https://localhost:3000](http://localhost:3000) to view it in the browser.
- The page will reload if you make edits.
- You’ll also see any linter errors in the console.
- Windows users should read: [Using HTTPS in Development](https://facebook.github.io/create-react-app/docs/using-https-in-development)

### `npm test`

* Launches the test runner in the interactive watch mode.
* See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
- Launches the test runner in the interactive watch mode.
- See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

* Builds the app for production to the `build` folder.
* It correctly bundles React in production mode and optimizes the build for the best performance.
* The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
* See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
- Builds the app for production to the `build` folder.
- It correctly bundles React in production mode and optimizes the build for the best performance.
- The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
- See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

Expand Down
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SelectRanges - Acrolinx-App</title>
</head>
<body>
<header>RegExp: <input id="matchRegExp" type="text" value='[^\s.,:"]+' /></header>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 635c32c

Please sign in to comment.