open-index/open-npm huggingface dataset:
npm package: @inlang/cross-sell-ninja
Description: A package to cross-sell Ninja
Latest version: 0.0.34
Deprecated: rename to @inlang/recommend-ninja

# Cross-sell Ninja 🥷 package

## Features

- **Workflow Verification**: Ensures that the GitHub Actions workflow incorporating the Ninja i18n lint action is present in a project's `.github/workflows` directory.
- **Automated Workflow Addition**: If not present, the package can automatically add a workflow to incorporate Ninja i18n linting into the project.

## Installation

Add this package to your `dependencies` in `package.json` & install it using `pnpm install`:

```bash
"@inlang/cross-sell-ninja": "workspace:*"
```

## Usage

This module exports two main asynchronous functions:

### `isAdopted(fs: NodeishFilesystem): Promise<boolean>`

Verifies if the Ninja i18n GitHub Action is adopted within the GitHub workflow files of your project.

#### Parameters

- `fs`: A `NodeishFilesystem` object for file system interactions.

#### Returns

- `Promise<boolean>`: `true` if the Ninja i18n GitHub Action workflow is found, `false` otherwise.

### `add(fs: NodeishFilesystem): Promise<void>`

Adds the Ninja i18n GitHub Action workflow to the repository's `.github/workflows` directory if it's not already present.

#### Parameters

- `fs`: A `NodeishFilesystem` object for file system interactions.

## Example

```typescript
import { isAdopted, add } from '@inlang/cross-sell-ninja';
import { NodeishFilesystem } from '@lix-js/fs';

async function ensureNinjaAdoption(fs: NodeishFilesystem) {
  const isWorkflowAdopted = await isAdopted(fs);

  if (!isWorkflowAdopted) {
    // Optionally prompt for user confirmation
    const userConfirmed = await promptUser("Do you want to add the Ninja i18n workflow?");

    if (userConfirmed) {
      await add(fs);
      console.log('Ninja i18n workflow added.');
    } else {
      console.log('User declined to add Ninja i18n workflow.');
    }
  } else {
    console.log('Ninja i18n workflow is already adopted.');
  }
}
```

## Contributing

Contributions are highly appreciated! Whether it's feature requests, bug reports, or pull requests, please feel free to contribute. Check out our [Discord](https://discord.gg/CNPfhWpcAa) for community discussions and updates.
npm package: @inlang/cross-sell-sherlock
Description: A package to cross-sell Sherlock
Latest version: 0.0.4
Deprecated: rename to @inlang/recommend-sherlock

# Cross-sell Sherlock package

## Features

- **Check for Existing Recommendations**: Quickly verify if an extension is already recommended in the workspace's `.vscode/extensions.json` file.
- **Add New Recommendations**: Automatically add new recommendations to the `.vscode/extensions.json` file if they are not already present.

## Installation

Put this one into your `dependencies` in `package.json` & install it with `pnpm install`:

```bash
"@inlang/cross-sell-sherlock": "workspace:*"
```

## Usage

The module exports two main asynchronous functions:

### `isAdopted(fs: NodeishFilesystem, workingDirectory?: string): Promise<boolean>`

Checks whether the `inlang.vs-code-extension` is recommended in the workspace.

#### Parameters

- `fs`: A `NodeishFilesystem` object to interact with the file system.
- `workingDirectory`: (Optional) The working directory path.

#### Returns

- `Promise<boolean>`: `true` if the extension is recommended, `false` otherwise.

### `add(fs: NodeishFilesystem, workingDirectory?: string): Promise<void>`

Adds the `inlang.vs-code-extension` recommendation to the workspace if it's not already present.

#### Parameters

- `fs`: A `NodeishFilesystem` object to interact with the file system.
- `workingDirectory`: (Optional) The working directory path.

## Example

```typescript
import { isAdopted, add } from '@inlang/cross-sell-sherlock';
import { NodeishFilesystem } from '@lix-js/fs';

async function addSherlock(fs: NodeishFilesystem) {
  const isExtensionAdopted = await isAdopted(fs);

  if (!isExtensionAdopted) {
    // prompt for user confirmation
    const userConfirmed = await promptUser();

    if (userConfirmed) {
      await add(fs);
      console.log('Extension recommendation added.');
    } else {
      console.log('User declined to add extension recommendation.');
    }
  }
}
```

## Contributing

Contributions are welcome! If you have a feature request, bug report, or proposal, please open an issue or submit a pull request. Our Discord can be found [here](https://discord.gg/CNPfhWpcAa).