open-index/open-npm huggingface dataset:
npm package: @osmn-byhn/css-formatter-cli
Description: Command line interface for @osmn-byhn/css-formatter to inline or extract CSS from HTML
Author: Osman Beyhan
Latest version: 1.0.5

# CSS Formatter CLI

> **A powerful CLI for bidirectional CSS-HTML conversion, powered by [@osmn-byhn/css-formatter](https://www.npmjs.com/package/@osmn-byhn/css-formatter).**

This tool allows you to convert between external/internal CSS and inline styles effortlessly directly from your terminal. It's perfect for email templates, production optimization, and modernizing legacy HTML.

## 🚀 Key Features

- **Bidirectional Conversion**: Move styles from `<style>` tags to inline attributes and back.
- **Smart Selector Generation**: Automatically generates clean, semantic CSS selectors based on existing classes and structure.
- **Preserves Critical CSS**: Keeps `@media` queries, `:hover` states, and `@font-face` rules in a `<style>` tag while inlining the rest.
- **Style Deduplication**: Groups identical inline styles under single CSS rules to keep your output clean.

## 📦 Installation

You can install it globally via npm:

```bash
npm install -g @osmn-byhn/css-formatter-cli
```

Or run it instantly using npx:

```bash
npx css-formatter <command> [options]
```

## 🎯 Usage & Commands

### 1. Inlining CSS (`inline`)
Converts all CSS from `<style>` tags and linked stylesheets into inline `style` attributes.

```bash
css-formatter inline input.html -o output.html
```
- **Use Case**: Preparing HTML for email clients that only support inline styles.

---

### 2. Extracting to Internal CSS (`internal`)
Extracts all inline `style` attributes and moves them into a single `<style>` tag in the `<head>`.

```bash
css-formatter internal input.html -o output.html
```
- **Use Case**: Refactoring messy inline styles into a readable, centralized format.

---

### 3. Extracting to External CSS (`extract`)
Extracts inline styles into a separate `.css` file and adds a `<link>` tag to the HTML.

```bash
css-formatter extract input.html styles.css -o output.html
```
- **Use Case**: Optimizing production websites for browser caching by separating CSS from HTML.

## 🔧 Options

| Argument | Description |
| :--- | :--- |
| `<input>` | Path to your input HTML file. |
| `[cssOutput]` | (Extract only) Name of the generated CSS file. |
| `-o, --output` | Custom path for the output HTML (defaults to overwriting input). |
| `-v, --version` | Display version information. |
| `-h, --help` | Display help for commands. |

## 📄 License

MIT © Osman Beyhan
npm package: @osmoscraft/node-feed-parser
Description: Parse RSS/RDF/Atom XML into JSON Feed in node.js environment
Author: osmoscraft
Latest version: 0.0.3

# Node Feed Parser

Parse RSS/RDF/Atom XML into JSON Feed in node.js environment

Note: This library only exports TypeScript. So you will need a modern compiler to use it. Currently only supporting [vite](https://vitejs.dev/) and [esbuild](https://esbuild.github.io/).

## Get started

```sh
npm i @osmoscraft/node-feed-parser
```

```TypeScript
import { NodeFeedParser } from "@osmoscraft/node-feed-parser";

const input = "<?xml..." // feed content in XML string

const feedParser = new NodeFeedParser();
const output = feedParser.toJsonFeed(input);
```
npm package: @osmoscraft/node-testing-library
Description: ## Get started
Author: osmoscraft
Latest version: 0.0.6

# TypeScript Testing Library

## Get started

```
npm i -D @osmoscraft/node-testing-library
```

Create `run-test.ts` in your project root with the following content:

```typescript
import { getTests, runTests } from "@osmoscraft/node-testing-library";

async function run() {
  const tests = await getTests("src", /\.test\.ts$/);
  runTests(tests);
}

run();
```

Update `package.json` with the following scripts to run tests

```json
  "scripts": {
    "test": "ts-node-dev --quiet --transpile-only run-test.ts",
    "test:watch": "ts-node-dev --respawn --watch --transpile-only run-test.ts",
  },

```

Write your first test in `src/hello-world.test.ts`

```typescript
import { describe, expect, it } from "@osmoscraft/node-testing-library";

describe("hello world", () => {
  it("should pass", async () => {
    await expect("hello").toEqual("hello");
  });
});
```

Please make sure to use `await` in frontend of each `expect` or the error reporting may not be able to surface all failed tests

## TypeScript configuration

This library relies on `ts-node-dev` to compile TypeScript to JavavScript only the fly. Since the JavaScript output will be executed in a Node.js environment, your `tsconfig.json` should produce code that is compatible with Node.js. If your existing `tsconfig.json` produces code using `ESNext` module, you will need to specific a separate `tsconfig.test.json` like this:

```json
{
  "compilerOptions": {
    "target": "es2019",
    "moduleResolution": "node",
    "module": "CommonJS",
    "importsNotUsedAsValues": "error",
    "strict": true,
    "esModuleInterop": true,
    "outDir": "dist"
  }
}

```
and consume it in your `package.json` test script:
```json
  "scripts": {
    "test": "ts-node-dev --project tsconfig.test.json --quiet --transpile-only run-test.ts",
    "test:watch": "ts-node-dev --project tsconfig.test.json --respawn --watch --transpile-only run-test.ts",
  },
```
npm package: @osmoscraft/typescript-testing-library
Description: ## Get started
Author: osmoscraft
Latest version: 0.0.5

# TypeScript Testing Library

## Get started

```
npm i -D @osmoscraft/typescript-testing-library
```

Create `run-test.ts` in your project root with the following content:

```typescript
import { getTests, runTests } from "@osmoscraft/typescript-testing-library";

async function run() {
  const tests = await getTests("src", /\.test\.ts$/);
  runTests(tests);
}

run();
```

Update `package.json` with the following scripts to run tests

```json
  "scripts": {
    "test": "ts-node-dev --quiet --transpile-only run-test.ts",
    "test:watch": "ts-node-dev --respawn --watch --transpile-only run-test.ts",
  },

```

Write your first test in `src/hello-world.test.ts`

```typescript
import { describe, expect, it } from "@osmoscraft/typescript-testing-library";

describe("hello world", () => {
  it("should pass", async () => {
    await expect("hello").toEqual("hello");
  });
});
```

Please make sure to use `await` in frontend of each `expect` or the error reporting may not be able to surface all failed tests
npm package: @osmoscraft/web-feed-parser
Description: Parse RSS/RDF/Atom XML into [JSON Feed](https://www.jsonfeed.org/) in a browser environment
Latest version: 0.0.5

# Web Feed Parser

Parse RSS/RDF/Atom XML into [JSON Feed](https://www.jsonfeed.org/) in a browser environment

Note: This library only exports TypeScript. So you will need a modern compiler to use it. Currently only supporting [vite](https://vitejs.dev/) and [esbuild](https://esbuild.github.io/).

## Get started

```sh
npm i @osmoscraft/web-feed-parser
```

```TypeScript
import { WebFeedParser } from "@osmoscraft/web-feed-parser";

const input = "<?xml..." // feed content in XML string

const feedParser = new WebFeedParser();
const output = feedParser.toJsonFeed(input);
```