vite-plugin-sparql 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # vite-plugin-sparql
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 41b20a0: First version
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [41b20a0]
12
+ - sparqlc@0.1.0
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from 'vite';
2
+ declare const _default: Plugin;
3
+ export default _default;
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+ import { compile } from 'sparqlc';
2
+ export default {
3
+ name: 'vite-plugin-sparql',
4
+ transform(code, id) {
5
+ if (id.endsWith('.rq')) {
6
+ const compiled = compile(code);
7
+ return compiled.code;
8
+ }
9
+ return code;
10
+ },
11
+ };
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "vite-plugin-sparql",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "index.js",
6
+ "files": [
7
+ "CHANGELOG.md",
8
+ "index.js",
9
+ "index.d.ts"
10
+ ],
11
+ "scripts": {
12
+ "test": "vitest",
13
+ "build": "tsc",
14
+ "prepack": "npm run build"
15
+ },
16
+ "author": "Tomasz Pluskiewicz",
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/hypermedia-app/sparqlc",
21
+ "directory": "packages/vite-plugin-sparql"
22
+ },
23
+ "dependencies": {
24
+ "sparqlc": "^0.1.0"
25
+ },
26
+ "peerDependencies": {
27
+ "vite": ">=6"
28
+ },
29
+ "devDependencies": {
30
+ "@testing-library/dom": "^10.4.1",
31
+ "@vitest/browser": "^4.0.18",
32
+ "@vitest/browser-playwright": "^4.0.18",
33
+ "@zazuko/env": "^3.0.1",
34
+ "playwright": "^1.58.2",
35
+ "sparql-http-client": "^3.1.0",
36
+ "vite": "^7.0.0",
37
+ "vitest": "^4.0.18"
38
+ }
39
+ }