Skip to content

Commit

Permalink
Re-initialized app structure by vite
Browse files Browse the repository at this point in the history
  • Loading branch information
sanak committed Sep 3, 2023
1 parent e35e42a commit b02302c
Show file tree
Hide file tree
Showing 11 changed files with 3,094 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: 'standard',
overrides: [
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {
}
}
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Update submodules
run: git submodule update --remote --init
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload dist repository
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

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

*.code-workspace

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# geos-wasm-tester

This is a [GEOS WASM](https://github.com/chrispahm/geos-wasm) tester app which interface is similiar with [JTS TestBuilder](https://www.eclipse.org/community/eclipse_newsletter/2018/december/jts.php).

URL: https://sanak.github.io/geos-wasm-tester/

## Development

### Prerequisites

- [Node.js](https://nodejs.org/en/download/) >= v18

### Setup

```sh
git clone https://github.com/sanak/geos-wasm-tester
cd geos-wasm-tester
git submodule update --init
npm install
npm run dev
```

### Contribution

Contributions are welcome!
24 changes: 13 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta charset="UTF-8">
<link rel="icon" type="image/png" href="/app-icon64.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GEOS WASM Tester</title>
<link rel="stylesheet" href="./lib/ol2/theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="./lib/ol2/theme/default/style-patch.css" type="text/css" />
<link rel="stylesheet" href="./lib/ol2/examples/style.css" type="text/css" />
<link rel="stylesheet" href="tester.css" type="text/css">
<script src="./lib/ol2/OpenLayers.js"></script>
<link rel="stylesheet" href="/lib/ol2/theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="/lib/ol2/theme/default/style-patch.css" type="text/css" />
<link rel="stylesheet" href="/lib/ol2/examples/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css">
<script src="/lib/ol2/OpenLayers.js"></script>
<script type="module">
import Tester from "./tester.js"
import Tester from "./main.js"
window.onload = () => {
const tester = new Tester(OpenLayers)
window.tester = tester
tester.init()
tester.addTestXmls('./tests/testxml.json')
const path = location.href.replace('index.html', '')
tester.addTestXmls(`${path}/tests/testxml.json`)
}
</script>
</head>
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import initGeosJs from '../assets/geos.esm.js'
import initGeosJs from 'https://cdn.skypack.dev/geos-wasm'
import initGeosJs from './geos-wasm/docs/assets/geos.esm.js'
// import initGeosJs from 'https://cdn.skypack.dev/geos-wasm'

export default function Tester (engine) {
const self = this
Expand Down
Loading

0 comments on commit b02302c

Please sign in to comment.