open-index/open-npm huggingface dataset:
npm package: @importable/document
Description: Import documents with strong typing based on import attributes
Author: importables
Latest version: 0.1.0

# @importable/document

**Importable Document** allows you to import documents with strong typing based on import attributes (_presently import assertions_).

```js
import document from './document.kdl' assert { type: 'document', from: 'kdl' }

console.assert(doc.name === 'html')
console.assert(doc.children[1].name === 'body')

```

## Installation

```shell
npm install importable @importable/document
```

```js
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "importable",
        "plugins": [
          "@importable/document"
        ]
      }
    ]
  }
}
```

## License

Code original to this project is licensed under the CC0-1.0 License.
npm package: @importable/machine
Description: Import state machines with strong typing based on import attributes
Author: importables
Latest version: 0.1.0

# @importable/machine

**Importable Machine** allows you to import state machines with strong typing based on import attributes (_presently import assertions_).

```js
import machine from './machines.css' assert { type: 'machine', from: 'css' }

machine.transition('active', 'toggle')

```

## Installation

```shell
npm install importable @importable/machine
```

```js
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "importable",
        "plugins": [
          "@importable/machine"
        ]
      }
    ]
  }
}
```

## License

Code original to this project is licensed under the CC0-1.0 License.
npm package: @importable/yaml
Description: Import YAML files with strong typing based on import attributes
Author: importables
Latest version: 0.1.1

# @importable/yaml

**Importable YAML** allows you to import YAML files with strong typing based on import attributes (_presently import assertions_).

```js
import config from './config.yml' with { type: 'yaml' }

console.assert(config.doe === 'a deer, a female deer')
```

## Installation

```shell
npm install importable @importable/yaml
```

To support YAML from the TypeScript server,
add **@importable/yaml** to **tsconfig.json**:

```js
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "importable",
        "plugins": [
          "@importable/yaml"
        ]
      }
    ]
  }
}
```

## Integrations

- [Integration with Vite](#vite-integration)
- [Integration with Astro](#astro-integration)
- [Integration with Next](#next-integration)

### Vite Integration

To support YAML within Vite,
add **@importable/yaml** to **vite.config.js**:

```js
import { defineConfig } from 'vite'
import importableYAML from '@importable/yaml/vite'

export default defineConfig({
  plugins: [
    importableYAML()
  ]
})
```

### Astro Integration

To support YAML within Astro,
add **@importable/yaml** to **astro.config.js**:

```js
import { defineConfig } from 'astro'
import importableYAML from '@importable/yaml/astro'

export default defineConfig({
  integrations: [
    importableYAML()
  ]
})
```

### Next Integration

To support YAML within Next,
add **@importable/next** to **next.config.js**:

```js
const withYaml = require('@importable/yaml/next');

module.exports = withYaml({
  // existing NextJS config
});
```

## License

Code original to this project is licensed under the CC0-1.0 License.