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

Overhaul docs and simplify build #154

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
3 changes: 3 additions & 0 deletions demo/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["plugin:vue/vue3-recommended", "eslint:recommended", "prettier"]
}
3 changes: 3 additions & 0 deletions demo/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
7 changes: 7 additions & 0 deletions demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Vue 3 + Vite

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
19 changes: 0 additions & 19 deletions demo/css/styles.css

This file was deleted.

36 changes: 36 additions & 0 deletions demo/gj.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { createFilter, dataToEsm } from "@rollup/pluginutils"

export default function json(
options = {
include: ["**/*.json", "**/*.geojson"],
},
) {
const filter = createFilter(options.include, options.exclude)
const indent = "indent" in options ? options.indent : "\t"

return {
name: "geojson",

// eslint-disable-next-line no-shadow
transform(json, id) {
if (!filter(id)) return null
try {
const parsed = JSON.parse(json)
return {
code: dataToEsm(parsed, {
preferConst: options.preferConst,
compact: options.compact,
namedExports: options.namedExports,
indent,
}),
map: { mappings: "" },
}
} catch (err) {
const message = "Could not parse GeoJSON file"
const position = parseInt(/[\d]/.exec(err.message)[0], 10)
this.warn({ message, id, position })
return null
}
},
}
}
25 changes: 7 additions & 18 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<!doctype html>
<html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Martinez Clipping</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.css">
<!-- <link rel="stylesheet" type="text/css" href="../node_modules/leaflet/dist/leaflet.css"> -->

<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jsts/1.2.0/jsts.min.js"></script>
<!-- <script type="text/javascript" src="../node_modules/jsts/dist/jsts.min.js"></script> -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.2.0/leaflet.js"></script>
<!-- <script type="text/javascript" src="../node_modules/leaflet/dist/leaflet.js"></script> -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/leaflet-editable/0.7.0-beta.1/Leaflet.Editable.min.js"></script>
<!-- <script type="text/javascript" src="../node_modules/leaflet-editable/src/Leaflet.Editable.js"></script> -->
<link rel="stylesheet" href="css/styles.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Polygon-Clipping</title>
</head>
<body>
<script src="js/bundle.js"></script>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
47 changes: 0 additions & 47 deletions demo/js/booleanopcontrol.js

This file was deleted.

Loading