Skip to content

Commit

Permalink
feat: allow filename to be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
shepherdjerred committed Jun 3, 2024
1 parent 002c9f4 commit cc7bb5f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 374 deletions.
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,43 @@ Inspired by:

## Installation

```
```bash
npm i webring
```

## Quick Start

This library is meant to be used with static site generators. It is framework agnostic.

### Astro

### Command Line

You can use this library to generate static HTML which can be included into your site using it's include mechanisms

## Configuration

```typescript

import { type Configuration, run } from "webring";

// create a configuration object
const config: Configuration = {
sources: [
{
url: "https://drewdevault.com/blog/index.xml",
title: "Drew DeVault",
},
{
url: "https://danluu.com/atom.xml",
title: "Dan Luu",
},
{
url: "https://jakelazaroff.com/rss.xml",
title: "Jake Lazaroff",
},
],
number: 3,
cache_duration_minutes: 60,
truncate: 300,
};

// run the application
const result = await run(config);

// do something with the results
result.map((entry) => {
console.log(entry);
});
```
21 changes: 8 additions & 13 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.strict, ...tseslint.configs.stylistic, {
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
ignores: ["*.js"],
files: ["tsconfig.json"],
},
);
ignores: ["*.js"],
files: ["tsconfig.json"],
});
Loading

0 comments on commit cc7bb5f

Please sign in to comment.