Skip to content

Commit

Permalink
module + package config
Browse files Browse the repository at this point in the history
  • Loading branch information
dbushell committed Mar 11, 2024
1 parent c46891c commit 1f733da
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Fetch and parse XML documents using the power of JavaScript web streams and asyn
Add dependency from JSR: [@dbushell/xml-streamify](https://jsr.io/@dbushell/xml-streamify). See the `examples` directory for platform specific examples.

```javascript
import {parse} from "jsr:@dbushell/xml-streamify@0.2";
import {parse} from "jsr:@dbushell/xml-streamify";
```

The `parse` generator function is the main export. Below is a basic example that logs RSS item titles as they're found:
Expand Down
6 changes: 5 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"name": "@dbushell/xml-streamify",
"version": "0.2.2",
"version": "0.3.0",
"exports": {
".": "./mod.ts",
"./node": "./src/node.ts",
"./parse": "./src/parse.ts",
"./stream": "./src/stream.ts",
"./types": "./src/types.ts"
},
"publish": {
"include": ["src", "deno.json", "mod.ts", "LICENSE", "README.md"],
"exclude": [".github", "examples"]
}
}
1 change: 1 addition & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* @module
*
* Fetch and parse XML documents using web streams and async iterators.
*/
export * from './src/node.ts';
Expand Down
3 changes: 2 additions & 1 deletion src/node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Module exports an XML Node class.
*
* @module
* Module exports an XML Node class
*/
/** XML node with helper methods to read data and traverse the tree */
export class Node {
Expand Down
3 changes: 2 additions & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @module
* Module export an async generator function for parsing a streamed XML document.
*
* @module
*/
import type {ParseOptions} from './types.ts';
import {NodeType} from './types.ts';
Expand Down
3 changes: 2 additions & 1 deletion src/stream.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @module
* Module exports a `TransformStream` class for decoding binary XML streams into structured data.
*
* @module
*/
import {NodeType, StateType} from './types.ts';

Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Types for `jsr:@dbushell/xml-streamify`.
*
* @module
* Types for `@dbushell/xml-streamify`
*/
/** Options for `parse` async generator function */
export interface ParseOptions {
Expand Down

0 comments on commit 1f733da

Please sign in to comment.