@ldo/cli 1.0.0-alpha.38 → 1.0.0-alpha.44

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/README.md CHANGED
@@ -5,6 +5,7 @@ The `@ldo/cli` is a command line interface for initializing LDO and building Sha
5
5
  ## Setup
6
6
 
7
7
  ### Automatic Setup
8
+
8
9
  To setup LDO, `cd` into your typescript project and run `npx @ldo/cli init`.
9
10
 
10
11
  ```bash
@@ -19,17 +20,20 @@ Manual Setup
19
20
  The following is handled by the __automatic setup__:
20
21
 
21
22
  Install the LDO dependencies.
23
+
22
24
  ```bash
23
25
  npm install @ldo/ldo
24
26
  npm install @ldo/cli --save-dev
25
27
  ```
26
28
 
27
29
  Create a folder to store your ShEx shapes:
30
+
28
31
  ```bash
29
32
  mkdir shapes
30
33
  ```
31
34
 
32
35
  Create a script to build ShEx shapes and convert them into Linked Data Objects. You can put this script in `package.json`
36
+
33
37
  ```json
34
38
  {
35
39
  ...
@@ -41,6 +45,7 @@ Create a script to build ShEx shapes and convert them into Linked Data Objects.
41
45
  ...
42
46
  }
43
47
  ```
48
+
44
49
  </details>
45
50
 
46
51
  ## Generating a ShapeType
@@ -52,10 +57,11 @@ npm run build:ldo
52
57
  ```
53
58
 
54
59
  This will generate five files:
55
- - `./ldo/foafProfile.shapeTypes.ts` <-- This is the important file
56
- - `./ldo/foafProfile.typings.ts`
57
- - `./ldo/foafProfile.schema.ts`
58
- - `./ldo/foafProfile.context.ts`
60
+
61
+ - `./_ldo/foafProfile.shapeTypes.ts` <-- This is the important file
62
+ - `./_ldo/foafProfile.typings.ts`
63
+ - `./_ldo/foafProfile.schema.ts`
64
+ - `./_ldo/foafProfile.context.ts`
59
65
 
60
66
  ## Creating a new project to distribure shapes
61
67
 
@@ -68,16 +74,18 @@ npx @ldo/cli create ./my-project
68
74
  This script will generate a project with a place to put your shapes. Running `npm publish` will build the shapes and push to project to NPM for you.
69
75
 
70
76
  ## API Details
71
- - [`init` command](https://ldo.js.org/latest/api/cli/init/)
72
- - [`build` command](https://ldo.js.org/latest/api/cli/build/)
73
- - [`create` command](https://ldo.js.org/latest/api/cli/create/)
74
77
 
78
+ - [`init` command](https://ldo.js.org/latest/api/cli/init/)
79
+ - [`build` command](https://ldo.js.org/latest/api/cli/build/)
80
+ - [`create` command](https://ldo.js.org/latest/api/cli/create/)
75
81
 
76
82
  ## Sponsorship
83
+
77
84
  This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/).
78
85
 
79
86
  [<img src="https://nlnet.nl/logo/banner.png" alt="nlnet foundation logo" width="300" />](https://nlnet.nl/)
80
87
  [<img src="https://nlnet.nl/image/logos/NGI0Entrust_tag.svg" alt="NGI Zero Entrust Logo" width="300" />](https://nlnet.nl/)
81
88
 
82
89
  ## Liscense
83
- MIT
90
+
91
+ MIT
@@ -1,4 +1,4 @@
1
- import { LdoJsonldContext } from "@ldo/ldo";
1
+ import type { LdoJsonldContext } from "@ldo/ldo";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -1,4 +1,4 @@
1
- import { Schema } from "shexj";
1
+ import type { Schema } from "shexj";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -1,7 +1,7 @@
1
- import { ShapeType } from "@ldo/ldo";
1
+ import type { ShapeType } from "@ldo/ldo";
2
2
  import { <%- fileName %>Schema } from "./<%- fileName %>.schema";
3
3
  import { <%- fileName %>Context } from "./<%- fileName %>.context";
4
- import {
4
+ import type {
5
5
  <% typings.forEach((typing) => { -%>
6
6
  <%- typing.dts.name %>,
7
7
  <% }); -%>} from "./<%- fileName %>.typings";
@@ -21,4 +21,4 @@ export const <%- typing.dts.name %>ShapeType: ShapeType<<%- typing.dts.name %>>
21
21
  shape: "<%- typing.dts.shapeId %>",
22
22
  context: <%- fileName %>Context,
23
23
  };
24
- <% }); -%>
24
+ <% }); -%>
@@ -1,4 +1,4 @@
1
- import { LdoJsonldContext, LdSet } from "@ldo/ldo";
1
+ import type { LdoJsonldContext, LdSet } from "@ldo/ldo";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -11,4 +11,4 @@ import { LdoJsonldContext, LdSet } from "@ldo/ldo";
11
11
  * <%- typing.dts.name %> Type
12
12
  */
13
13
  export <%- typing.typingString -%>
14
- <% }); -%>
14
+ <% }); -%>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldo/cli",
3
- "version": "1.0.0-alpha.38",
3
+ "version": "1.0.0-alpha.44",
4
4
  "description": "A Command Line Interface for Linked Data Objects",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
@@ -15,7 +15,8 @@
15
15
  "update-permission": "chmod +x ./dist/index.js",
16
16
  "test": "vitest run --coverage",
17
17
  "prepublishOnly": " npm run build",
18
- "lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
18
+ "lint:check": "eslint src/** --no-error-on-unmatched-pattern",
19
+ "lint": "npm run lint:check -- --fix",
19
20
  "test:init": "rm -rf ./example-init && cp -R ./example-init-placeholder ./example-init && cd ./example-init && ../dist/index.js init",
20
21
  "test:create": "rm -rf ./example-create && ./dist/index.js create ./example-create"
21
22
  },
@@ -41,8 +42,8 @@
41
42
  },
42
43
  "dependencies": {
43
44
  "@jeswr/shacl2shex": "^1.1.0",
44
- "@ldo/ldo": "^1.0.0-alpha.38",
45
- "@ldo/schema-converter-shex": "^1.0.0-alpha.38",
45
+ "@ldo/ldo": "^1.0.0-alpha.44",
46
+ "@ldo/schema-converter-shex": "^1.0.0-alpha.44",
46
47
  "@shexjs/parser": "^1.0.0-alpha.24",
47
48
  "child-process-promise": "^2.2.1",
48
49
  "commander": "^9.3.0",
@@ -63,5 +64,5 @@
63
64
  "publishConfig": {
64
65
  "access": "public"
65
66
  },
66
- "gitHead": "c09a1e1c1c5eee9682e141e0657e4bef3b9973b9"
67
+ "gitHead": "8361d7cc3c6827e77b9b4e5f432f86a8ba196474"
67
68
  }
@@ -1,4 +1,4 @@
1
- import { LdoJsonldContext } from "@ldo/ldo";
1
+ import type { LdoJsonldContext } from "@ldo/ldo";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -1,4 +1,4 @@
1
- import { Schema } from "shexj";
1
+ import type { Schema } from "shexj";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -1,7 +1,7 @@
1
- import { ShapeType } from "@ldo/ldo";
1
+ import type { ShapeType } from "@ldo/ldo";
2
2
  import { <%- fileName %>Schema } from "./<%- fileName %>.schema";
3
3
  import { <%- fileName %>Context } from "./<%- fileName %>.context";
4
- import {
4
+ import type {
5
5
  <% typings.forEach((typing) => { -%>
6
6
  <%- typing.dts.name %>,
7
7
  <% }); -%>} from "./<%- fileName %>.typings";
@@ -21,4 +21,4 @@ export const <%- typing.dts.name %>ShapeType: ShapeType<<%- typing.dts.name %>>
21
21
  shape: "<%- typing.dts.shapeId %>",
22
22
  context: <%- fileName %>Context,
23
23
  };
24
- <% }); -%>
24
+ <% }); -%>
@@ -1,4 +1,4 @@
1
- import { LdoJsonldContext, LdSet } from "@ldo/ldo";
1
+ import type { LdoJsonldContext, LdSet } from "@ldo/ldo";
2
2
 
3
3
  /**
4
4
  * =============================================================================
@@ -11,4 +11,4 @@ import { LdoJsonldContext, LdSet } from "@ldo/ldo";
11
11
  * <%- typing.dts.name %> Type
12
12
  */
13
13
  export <%- typing.typingString -%>
14
- <% }); -%>
14
+ <% }); -%>