dag-rs 0.1.4 → 0.2.1
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 +34 -48
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,60 +1,52 @@
|
|
|
1
|
-
# dag
|
|
1
|
+
# dag-rs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`dag-rs` parses workspace and constructs a Directed Acyclic Graph (DAG) of local package dependencies within a monorepo or similar setups. Each edge in the graph represents a `dependent → dependency` relationship.
|
|
4
4
|
|
|
5
|
-
## Building dag
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
To run the build, run:
|
|
6
|
+
## Installation
|
|
10
7
|
|
|
11
|
-
```sh
|
|
12
|
-
$ npm run build
|
|
13
8
|
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Exploring dag
|
|
18
|
-
|
|
19
|
-
After building dag, you can explore its exports at the Node console:
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
$ npm i
|
|
23
|
-
$ npm run build
|
|
24
|
-
$ node
|
|
25
|
-
> require('.').hello('node')
|
|
26
|
-
'hello node'
|
|
9
|
+
npm install dag-rs
|
|
10
|
+
# or
|
|
11
|
+
yarn add dag-rs
|
|
27
12
|
```
|
|
28
13
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
#### `npm install`
|
|
34
|
-
|
|
35
|
-
Installs the project, including running `npm run build`.
|
|
36
|
-
|
|
37
|
-
#### `npm run build`
|
|
38
|
-
|
|
39
|
-
Builds the Node addon (`index.node`) from source, generating a release build with `cargo --release`.
|
|
14
|
+
## Usage
|
|
15
|
+
```
|
|
16
|
+
import dag from 'dag-rs';
|
|
40
17
|
|
|
41
|
-
|
|
18
|
+
for (const obj of dag()) {
|
|
19
|
+
console.log(obj);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
42
22
|
|
|
23
|
+
## Example Output `(dependent → dependency)`:
|
|
43
24
|
```
|
|
44
|
-
|
|
25
|
+
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage' }
|
|
26
|
+
{ '@rocket.chat/onboarding-ui': '@rocket.chat/fuselage-hooks' }
|
|
27
|
+
{ '@rocket.chat/onboarding-ui': '@rocket.chat/icons' }
|
|
28
|
+
{ '@rocket.chat/onboarding-ui': '@rocket.chat/layout' }
|
|
29
|
+
|
|
30
|
+
{ '@rocket.chat/fuselage': 'lint-all' }
|
|
31
|
+
{ '@rocket.chat/fuselage': 'testing-utils' }
|
|
32
|
+
|
|
33
|
+
{ '@rocket.chat/fuselage-forms': '@rocket.chat/emitter' }
|
|
34
|
+
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage' }
|
|
35
|
+
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage-hooks' }
|
|
36
|
+
{ '@rocket.chat/fuselage-forms': '@rocket.chat/fuselage-tokens' }
|
|
37
|
+
{ '@rocket.chat/fuselage-forms': 'lint-all' }
|
|
45
38
|
```
|
|
46
39
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Similar to `npm run build` but generates a debug build with `cargo`.
|
|
50
|
-
|
|
51
|
-
#### `npm run cross`
|
|
40
|
+
## Building dag-rs
|
|
52
41
|
|
|
53
|
-
|
|
42
|
+
Building dag requires a [supported version of Node and Rust](https://github.com/neon-bindings/neon#platform-support).
|
|
54
43
|
|
|
55
|
-
|
|
44
|
+
To run the build, run:
|
|
56
45
|
|
|
57
|
-
|
|
46
|
+
```sh
|
|
47
|
+
$ yarn install
|
|
48
|
+
$ yarn build
|
|
49
|
+
```
|
|
58
50
|
|
|
59
51
|
## Project Layout
|
|
60
52
|
|
|
@@ -81,10 +73,4 @@ dag/
|
|
|
81
73
|
| `package.json` | The npm [manifest file](https://docs.npmjs.com/cli/v7/configuring-npm/package-json), which informs the `npm` command. |
|
|
82
74
|
| `target/` | Binary artifacts generated by the Rust build. |
|
|
83
75
|
|
|
84
|
-
## Learn More
|
|
85
|
-
|
|
86
|
-
Learn more about:
|
|
87
76
|
|
|
88
|
-
- [Neon](https://neon-bindings.com).
|
|
89
|
-
- [Rust](https://www.rust-lang.org).
|
|
90
|
-
- [Node](https://nodejs.org).
|