Skip to content

Commit fcab3e6

Browse files
authored
Using editorconfig (#34)
* Added the editorconfig management for producing the output * Got some configuration improved for deno * Minor code improvement: systematic usage of import type * Spacing in turtle also follows editorconfig; removed RDFa comment references from code
1 parent 2341723 commit fcab3e6

File tree

16 files changed

+573
-423
lines changed

16 files changed

+573
-423
lines changed

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.html]
12+
max_line_length = 180
13+
indent_size = 4
14+
15+
[*.{js,ts}]
16+
indent_size = 4
17+
18+
[*.ttl]
19+
indent_size = 4
20+
21+
[*.jsonc]
22+
indent_size = 4
23+
24+
[*.{json,jsonld}]
25+
indent_size = 2
26+
27+
[*.{xml,svg}]
28+
indent_size = 4
29+
30+
[*.yml]
31+
indent_size = 2
32+
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
22
"name": "@iherman/yml2vocab",
33
"description": "Generation of vocabulary files starting by YAML",
4-
"version": "1.7.0",
4+
"version": "1.7.1",
55
"homepage": "https://github.com/w3c/yml2vocab",
6+
// We do not want to use the npm installation from deno
7+
// npm packages used by the code is maintained separately
8+
// by deno.
69
"nodeModulesDir": "none",
710
"compilerOptions": {
811
"lib": ["dom", "deno.ns"]
@@ -12,19 +15,21 @@
1215
"url": "https://github.com/w3c/yml2vocab"
1316
},
1417
"tasks": {
15-
"local_vcdm_nolink": "(cd local/tests/vcdm; deno run --allow-read --allow-write --allow-env ../../../main.ts -c)",
16-
"local_test": "(cd local/tests; deno run --allow-read --allow-write --allow-env ../../main.ts -v test.yml -t test_template.html -c)",
17-
"local_ident": "(cd local/tests/identification; deno run --allow-read --allow-write --allow-env ../../../main.ts -c)",
18-
"local_did": "(cd local/tests/did; deno run --allow-read --allow-write --allow-env ../../../main.ts -c)",
19-
"compile": "deno compile --allow-read --allow-write --allow-env main.ts"
18+
"local_vcdm_nolink": "(cd local/tests/vcdm; deno run --allow-all ../../../main.ts -c)",
19+
"local_test": "(cd local/tests; deno run --allow-all ../../main.ts -v test.yml -t test_template.html -c)",
20+
"local_ident": "(cd local/tests/identification; deno run --allow-all ../../../main.ts -c)",
21+
"local_did": "(cd local/tests/did; deno run --allow-all ../../../main.ts -c)",
22+
"compile": "deno compile --allow-all main.ts"
2023
},
2124
"exports": {
2225
".": "./index.ts",
2326
"./cli": "./main.ts"
2427
},
2528
"author": "Ivan Herman <[email protected]> (https://www.w3.org/People/Ivan/)",
2629
"license": "W3C-20150513",
27-
"exclude": ["dist/"],
30+
// It is important to exclude the node.js specific things. Otherwise we get problems with, e.g.
31+
// deno compilation...
32+
"exclude": ["dist/", "node_modules/", "package.json"],
2833
"imports": {
2934
"./lib/common" : "./lib/common.ts",
3035
"./lib/context" : "./lib/context.ts",
@@ -35,11 +40,14 @@
3540
"./lib/turtle" : "./lib/turtle.ts",
3641
"./lib/factory" : "./lib/factory.ts",
3742
"./lib/minidom" : "./lib/minidom.ts",
43+
"./lib/beautify" : "./lib/beautify.ts",
44+
"./beautify" : "./beautify.ts",
3845
"./index" : "./index.ts",
3946
"yaml" : "npm:yaml@^2.7.0",
4047
"commander" : "npm:commander@^13.1.0",
4148
"@exodus/schemasafe" : "npm:@exodus/schemasafe@^1.3.0",
4249
"jsdom" : "npm:jsdom@^26.0.0",
43-
"js-beautify" : "npm:js-beautify@^1.15.4"
50+
"js-beautify" : "npm:js-beautify@^1.15.4",
51+
"editorconfig" : "npm:editorconfig@^3.0.1"
4452
}
4553
}

0 commit comments

Comments
 (0)