open-index/open-npm huggingface dataset:
npm package: @kienngo/clipfs
Description: CLI tools for IPFS
Author: Kien Ngo
Latest version: 1.0.1

# clipfs

A CLI tool to help manage IPFS content in your local IPFS node. This app aims to be the alternative of `ipfs-webui` (with less features, for now) in the terminal environment. It does not replace `ipfs-kubo` but relies on it & compliments it.

It is a TypeScript app that requires either Bun or Node runtime to be installed on your machine. It interacts directly with the IPFS Kubo RPC commands via `Bun.spawn`.

## Installation

```bash
# Install globally on your local machine
npm install -g @kienngo/clipfs
# OR
bun install -g @kienngo/clipfs
```

## Usage

```bash
# Show help
clipfs

# View IPFS MFS files in interactive table
clipfs pintable

# View peer table
clipfs peertable

# Pin management
clipfs pin
```

### Interactive Pin Table

Navigate and manage your IPFS files with an interactive interface:

```bash
clipfs pintable
```

The interactive mode allows you to:
- Select files using arrow keys
- Press Enter to select a file
- Choose from options:
  - 0: View file details
  - 1: Unpin file 
  - 2: Copy CID to clipboard
  - 3: Exit

## Requirements

- Bun runtime (https://bun.sh)
- IPFS daemon running locally (IPFS Kubo installed on your machine)

## Development
Make sure all the requirements above are met!

```bash
# Clone the repository
git clone https://github.com/kien-ngo/clipfs.git
cd clipfs

# Install dependencies
bun install

# Build
bun run build

# Run commands locally
bun pintable
bun peertable
bun pin <option>
```

## Contribution
Knowledge about [IPFS Kubo RPC](https://docs.ipfs.tech/reference/kubo/cli/#ipfs) is required. If you have an idea or feature request then feel free to create a Github Issue. PRs are always welcomed.
npm package: @kientranasia/n8n-nodes-facebook-messenger
Description: n8n community node for Facebook Messenger
Author: Kien Tran
Latest version: 0.1.0

# n8n-nodes-facebook-messenger

This is an n8n community node for Facebook Messenger. It allows you to interact with the Facebook Messenger API to send and receive messages.

## Installation

Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.

## Credentials

To use this node, you need to set up a Facebook App and get the following credentials:

1. Access Token
2. App Secret
3. Verify Token

You can get these credentials by:
1. Creating a Facebook App at [Facebook Developers](https://developers.facebook.com/)
2. Setting up the Messenger product in your app
3. Generating a Page Access Token
4. Setting up webhook verification

## Operations

### Message

#### Send
- Send a text message to a recipient using their Facebook ID
- Required parameters:
  - Recipient ID: The Facebook ID of the recipient
  - Message: The text message to send

### Webhook

#### Receive Messages
- Receive messages from Facebook Messenger users
- The node will automatically handle webhook verification
- For each received message, it provides:
  - Sender ID
  - Recipient ID
  - Timestamp
  - Message text
  - Message ID

To set up webhook receiving:
1. Create a new workflow
2. Add the Facebook Messenger node
3. Select "Webhook" as the resource and "Receive Messages" as the operation
4. Configure your Facebook App's webhook URL to point to this node's webhook URL
5. Use the Verify Token from your credentials for webhook verification

## Resources

- [Facebook Messenger Platform Documentation](https://developers.facebook.com/docs/messenger-platform)
- [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
npm package: @kierankihn/markdown-it-katex
Description: Fast math support for markdown-it with KaTeX
Author: Takahiro Ethan Ikeuchi @iktakahiro
Latest version: 4.0.2

# markdown-it-katex

Add Math to your Markdown

[![Build Status](https://travis-ci.org/iktakahiro/markdown-it-katex.svg?branch=master)](https://travis-ci.org/iktakahiro/markdown-it-katex)

[KaTeX](https://github.com/Khan/KaTeX) is a faster alternative to MathJax. This plugin makes it easy to support in your markdown.

Need convincing?

* Check out the comparative benchmark: [KaTeX vs MathJax](https://jsperf.com/katex-vs-mathjax/42)

## Usage

Install markdown-it

```bash
npm install markdown-it
```

Install the plugin

```bash
npm install @iktakahiro/markdown-it-katex
```

Use it in your javascript

```javascript
var md = require('markdown-it')(),
    mk = require('@iktakahiro/markdown-it-katex');

md.use(mk);

// double backslash is required for javascript strings, but not html input
var result = md.render('# Math Rulez! \n  $\\sqrt{3x-1}+(1+x)^2$');
```

Include the KaTeX stylesheet in your html:

```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/katex.min.css">
```

If you're using the default markdown-it parser, I also recommend the [github stylesheet](https://github.com/sindresorhus/github-markdown-css):

```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css"/>
```

`KaTeX` options can be supplied with the second argument to use.

```javascript
md.use(mk, {"throwOnError" : false, "errorColor" : " #cc0000"});
```

## Examples

### Inline

Surround your LaTeX with a single `$` on each side for inline rendering.

```latex
$\sqrt{3x-1}+(1+x)^2$
```

### Block

Use two (`$$`) for block rendering. This mode uses bigger symbols and centers
the result.

```latex
$$\begin{array}{c}

\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} &
= \frac{4\pi}{c}\vec{\mathbf{j}}    \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\

\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\

\nabla \cdot \vec{\mathbf{B}} & = 0

\end{array}$$
```

## Syntax

Math parsing in markdown is designed to agree with the conventions set by pandoc:

    Anything between two $ characters will be treated as TeX math. The opening $ must
    have a non-space character immediately to its right, while the closing $ must
    have a non-space character immediately to its left, and must not be followed
    immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math. If for some
    reason you need to enclose text in literal $ characters, backslash-escape them and
    they won’t be treated as math delimiters.

## Math Syntax Support

KaTeX is based on TeX and LaTeX. Support for both is growing. Here's a list of
currently supported functions:

[Things that KaTeX does not (yet) support](https://github.com/KaTeX/KaTeX/wiki/Things-that-KaTeX-does-not-%28yet%29-support)
npm package: @kieranproctor/kui
Description: @kieranproctor/kui is a ReactJS component library with Tailwind CSS styling.
Latest version: 1.2.0

# @kieranproctor/kui

[@kieranproctor/kui](https://github.com/KieranLProctor/kui) is a [ReactJS](https://reactjs.org) component library styled using [Tailwind CSS](https://tailwindcss.com).


## Components
<details>
    <summary>Click to expand</summary>

    - Breadcrumbs
    - Button
</details>


## Installation

1. Firstly create a project using `npx creacte-react-app`
or another tool.

2. Install the library:
`yarn add @kieranproctor/kui`
// or
`npm install @kieranproctor/kui`

3. Configure `tailwind.config.js`.
```js
const withConfig = require("@kieranproctor/utils/withConfig");

module.exports = withConfig({
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
  theme: {
    extend: {},
  },
  plugins: [],
});
```

4. Develop away, have fun 😀.


## Theme Provider

[@kieranproctor/kui](https://github.com/KieranLProctor/kui) comes with a theme provider which you can use to provide a custom theme. To get started simply wrap the application with the `ThemeProdiver` provided.

```jsx
import React from "react";
import ReactDOM from "react-dom/client";
import App from "App";
import { ThemeProvider } from "@kieranproctor/kui";

const root = createRoot(document.getElementById("root"));

root.render(
  <ThemeProvider>
    <App />
  </ThemeProvider>,
);
```


## Usage/Examples

Below is a snippet of how to use one of the components in your app.

```jsx
import React from 'react';
import { Button } from '@kieranproctor/kui';

function App() {
  return <Button colour="blue">Click me 😀</Button>
}
```

If you need more, why not try out the demo project [here](https://github.com/KieranLProctor/kui-example)?


## Contributing

Contributions are always welcome!

See `CONTRIBUTING.md` for ways to get started.

Please adhere to this project's `CODE_OF_CONDUCT.md`.


## Authors

- [@Kieran](https://github.com/KieranLProctor)
npm package: @kieranwv/utils
Description: Collection of common JavaScript / TypeScript utils by @kieranwv.
Author: Kieran Wang
Latest version: 0.3.0

# @kieranwv/utils

[![GitHub Release Version](https://img.shields.io/github/v/release/kieranwv/utils?label=Release&color=%42b883)](https://github.com/kieranwv/utils/releases)
[![NPM Version](https://img.shields.io/npm/v/@kieranwv/utils?style=flat&label=npm&color=%42b883)](https://www.npmjs.com/package/@kieranwv/utils)
[![Build Status](https://github.com/kieranwv/utils/actions/workflows/ci.yml/badge.svg?branch=main&color=%42b883)](https://github.com/kieranwv/utils/actions/workflows/ci.yml)

Collection of common JavaScript / TypeScript utils by @kieranwv.

## Usage

```bash
npm install @kieranwv/utils -D
```

```js
import { IndexedDB } from '@kieranwv/utils'

const db = new IndexedDB()
```

## Utils

| name                               | description                              |
| ---------------------------------- | ---------------------------------------- |
| [`IndexedDB`](./src/indexed-db.ts) | The CRUD class for indexedDB in browser. |
| [`toLowerCase`](./src/format.ts)   | Converts string characters to lowercase. |

## License

[MIT License](./LICENSE) © 2024 [Kieran Wang](https://github.com/kieranwv/)
npm package: @kietnvt/logger-for-admin
Description: Using field `email` to logged user email, who will be tracked. Not use `User` table, because the application don't have `User` table.
Latest version: 5.0.4

## Update for fork repo

Using field `email` to logged user email, who will be tracked. Not use `User` table, because the application don't have `User` table.

# Logger Feature for AdminJS

This is an official [AdminJS](https://github.com/SoftwareBrothers/adminjs) feature which logs changes to resources.

## AdminJS

AdminJS is an automatic admin interface which can be plugged into your application. You, as a developer, provide database models (like posts, comments, stores, products or whatever else your application uses), and AdminJS generates UI which allows you (or other trusted users) to manage content.

Check out the example application here: https://adminjs-demo.herokuapp.com/admin/

Or visit [AdminJS](https://github.com/SoftwareBrothers/adminjs) github page.

## Usage

See an example application in the repository: [Example App](https://github.com/SoftwareBrothers/adminjs-logger/tree/master/example)

## License

AdminJS is copyrighted © 2023 rst.software. It is a free software, and may be redistributed under the terms specified in the [LICENSE](LICENSE.md) file.

## About rst.software

<img src="https://pbs.twimg.com/profile_images/1367119173604810752/dKVlj1YY_400x400.jpg" width=150>

We’re an open, friendly team that helps clients from all over the world to transform their businesses and create astonishing products.

* We are available for [hire](https://www.rst.software/estimate-your-project).
* If you want to work for us - check out the [career page](https://www.rst.software/join-us).
npm package: @kieuquynh/demo
Description: demo
Author: kieuquynh
Latest version: 1.0.0

# demo

> demo

[![NPM](https://img.shields.io/npm/v/demo.svg)](https://www.npmjs.com/package/demo) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save demo
```

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from 'demo'

class Example extends Component {
  render () {
    return (
      <MyComponent />
    )
  }
}
```

## License

MIT © [kieuquynh](https://github.com/kieuquynh)
npm package: @kieutuan218/minswap-sdk
Description: Query Minswap data and build transactions
Author: Minswap Labs
Latest version: 0.2.4-beta

# Minswap SDK

## Features

- [x] Get current pair price
- [x] Get historical pair price
- [x] Calculate trade price
- [x] Calculate price impact
- [x] Create orders and submit with Lucid

## Install

- NPM: `npm install @minswap/sdk`
- Yarn: `yarn add @minswap/sdk`

## ES Module Requirement

This package depends on `lucid-cardano`, which is an ESM package, so it's also an ESM package. To import from ESM package, you need to specify `"type": "module"` in `package.json` and configure other build flags accordingly.

## Examples

### Example 1: Get current price of MIN/ADA pool

```ts
import { BlockFrostAPI } from "@blockfrost/blockfrost-js";
import { BlockfrostAdapter } from "@minswap/sdk";

const api = new BlockfrostAdapter({
  blockFrost: new BlockFrostAPI({
    projectId: "<your_project_id>",
    network: "mainnet",
  }),
});
for (let i = 1; ; i++) {
  const pools = await api.getPools({
    page: i,
  });
  if (pools.length === 0) {
    // last page
    break;
  }
  const minADAPool = pools.find(
    (p) =>
      p.assetA === "lovelace" &&
      p.assetB ===
        "29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c64d494e"
  );
  if (minADAPool) {
    const [a, b] = await api.getPoolPrice({ pool: minADAPool });
    console.log(
      `ADA/MIN price: ${a.toString()}; MIN/ADA price: ${b.toString()}`
    );
    // we can later use this ID to call getPoolById
    console.log(`ADA/MIN pool ID: ${minADAPool.id}`);
    break;
  }
}
```

### Example 2: Get historical prices of MIN/ADA pool

```ts
import { BlockFrostAPI } from "@blockfrost/blockfrost-js";
import { BlockfrostAdapter, NetworkId } from "@minswap/sdk";

const MIN_ADA_POOL_ID =
  "6aa2153e1ae896a95539c9d62f76cedcdabdcdf144e564b8955f609d660cf6a2";

const api = new BlockfrostAdapter({
  blockFrost: new BlockFrostAPI({
    projectId: "<your_project_id>",
    network: "mainnet",
  }),
});
const history = await api.getPoolHistory({ id: MIN_ADA_POOL_ID });
for (const historyPoint of history) {
  const pool = await api.getPoolInTx({ txHash: historyPoint.txHash });
  if (!pool) {
    throw new Error("pool not found");
  }
  const [price0, price1] = await api.getPoolPrice({
    pool,
    decimalsA: 6,
    decimalsB: 6,
  });
  console.log(`${historyPoint.time}: ${price0} ADA/MIN, ${price1} MIN/ADA`);
}
```

### Example 3: Build Order transaction and submit

See `examples/` for more details. You can run a single file like `npm run exec examples/example.ts`.
npm package: @kiforks/prettier-config
Description: prettier shareable config
Author: Kifor Kostiantyn
Latest version: 1.0.4

# @kiforks/prettier-config

[![npm version](https://img.shields.io/npm/v/@kiforks/prettier-config?logo=npm&logoColor=fff)](https://www.npmjs.com/package/@kiforks/prettier-config)
[![Build Status](https://img.shields.io/github/actions/workflow/status/kiforks/prettier-config/cd.yml?query=workflow%3Adeploys&logo=github)](https://github.com/kiforks/prettier-config/actions/workflows/cd.yml?query=workflow%3Adeploy)
[![Downloads per month](https://img.shields.io/npm/dm/@kiforks/prettier-config)](https://npmcharts.com/compare/@kiforks/prettier-config)

## Usage

You first need to install your published configuration, for example:

<!--DOCUSAURUS_CODE_TABS-->
<!--npm-->

```bash
npm install --save-dev prettier @kiforks/prettier-config
```

<!--yarn-->

```bash
yarn add --dev prettier @kiforks/prettier-config
```

<!--pnpm-->

```bash
pnpm add --save-dev prettier @kiforks/prettier-config
```

<!--bun-->

```bash
bun add --dev prettier @kiforks/prettier-config
```

<!--END_DOCUSAURUS_CODE_TABS-->

Then, you can reference it in your `package.json`:

```json
{
  "name": "my-cool-library",
  "version": "1.0.0",
  "prettier": "@kiforks/prettier-config"
}
```

If you don’t want to use `package.json`, you can use any of the supported extensions to export a string, e.g. `.prettierrc`:

```json
"@kiforks/prettier-config"
```

### Extending

To _extend_ the configuration to overwrite some properties from the configuration, import the file in a `.prettierrc.mjs` file and export the modifications, e.g:

```js
import kiforPrettierConfig from "@kiforks/prettier-config";

/**
 * @type {import("prettier").Config}
 */
const config = {
  ...kiforPrettierConfig,
  semi: false,
};

export default config;
```
npm package: @kifs-common/classnames
Description: A reducer in a context
Author: Arthur Agombart
Latest version: 1.0.1

# React-Context-Reducer

[![Release](https://badgen.net/github/release/kifs-common/classnames/main)](https://www.npmjs.com/package/@kifs-common/classnames)
[![Minified](https://badgen.net/bundlephobia/min/@kifs-common/classnames)](https://bundlephobia.com/package/@kifs-common/classnames)
[![Minified + zip](https://badgen.net/bundlephobia/minzip/@kifs-common/classnames)](https://bundlephobia.com/package/@kifs-common/classnames)
[![Dependencies](https://badgen.net/github/dependents-pkg/kifs-common/classnames)](https://bundlephobia.com/package/@kifs-common/classnames)
[![Tech Debt](https://badgen.net/codeclimate/tech-debt/kifs-common/classnames)](https://codeclimate.com/github/kifs-common/classnames)
[![Maintainability](https://badgen.net/codeclimate/maintainability/kifs-common/classnames)](https://codeclimate.com/github/kifs-common/classnames)

Lightweight – no dependencies – functions helper to handle classnames.

## Install

- `npm i @kifs-common/classnames`

## Usage

```js
import { join, } from '@kifs-common/classnames'

console.log(join())
// -> undefined

console.log(join('hello', 'world'))
// -> "hello world"

const hero = {
  firstname: 'Gerard',
  lastname: 'Pichon'
}
console.log(join(obj.firstname, obj.age, false, !obj.age && obj.lastname))
// -> "Gerard Pichon"
```

This is pretty usefull in a css-module context like:

```js
import { join, } from '@kifs-common/classnames'

import style from 'style.css'

function createButton (color, disabled) {
  const button = document.createElement('button')
  button.className = join(style.button, style[color || 'primary'], disabled && style.disabled)
  return button
}

// Or JSX/react

function renderButton (color, disabled) {
  return (
    <button
      className={join(
        style.button,
        style[color || 'primary'],
        disabled && style.disabled
      )}>
    </button>
  )
}

```
npm package: @kifs-react/context-reducer
Description: A reducer in a context
Author: Arthur Agombart
Latest version: 1.0.4

# React-Context-Reducer

[![Release](https://badgen.net/github/release/kifs-react/context-reducer/main)](https://www.npmjs.com/package/@kifs-react/context-reducer)
[![Minified](https://badgen.net/bundlephobia/min/@kifs-react/context-reducer)](https://bundlephobia.com/package/@kifs-react/context-reducer)
[![Minified + zip](https://badgen.net/bundlephobia/minzip/@kifs-react/context-reducer)](https://bundlephobia.com/package/@kifs-react/context-reducer)
[![Dependencies](https://badgen.net/github/dependents-pkg/kifs-react/context-reducer)](https://bundlephobia.com/package/@kifs-react/context-reducer)
[![Tech Debt](https://badgen.net/codeclimate/tech-debt/kifs-react/context-reducer)](https://codeclimate.com/github/kifs-react/context-reducer)
[![Maintainability](https://badgen.net/codeclimate/maintainability/kifs-react/context-reducer)](https://codeclimate.com/github/kifs-react/context-reducer)

Lightweight – no dependencies – React wrapper of a Reducer in a Context.

Features:

- It's just react wrapper

> This package is currently served as-is. With usage of all ES6 features without any bundling and/or specific whatever the system is used.

## Install

- `npm i @kifs-react/context-reducer`

## Usage

`npm i react-rest-api`

```js
// ################################
//
// App.js
//
// ################################


import { ReducerProvider, } from '@kifs-react/context-reducer'

import { Component } from './Component'

export function App() {
  function reducer(state, action) {
    switch (action.type) {
      case 'doABarrelRoll':
        return { ...state, status: 'doing a barrel roll' }
      default:
        return state
    }
  }

  const initialState = { status: '' }

  function initializer(initialState) {
    return {
      ...initialState
    }
  }

  return (
    <ReducerProvider
      // Optionnal (But recommended that's the goal of this repo): default to dummy reducer `function (state) { return state }`
      reducer={reducer}
      // Optionnal: default to undefined
      initialState={initialState}
      // Optionnal: default to undefined
      initializer={initializer} 
    >
      <Component />
    </ReducerProvider>
  )
}


// ################################
//
// Component.js
//
// ################################


import { useReducerProvider } from '@kifs-react/context-reducer'

export function Component() {
  const [appState, appDispatch] = useReducerProvider()

  return (
    <>
      <button onClick={() => appDispatch({ type: 'doABarrelRoll' })}>Do a Barrel Roll</button>
      {JSON.stringify(appState, null, 2)}
    </>
  )
}

```
npm package: @kigiri/pure
Description: A wrapper for creating react PureComponents
Author: kigiri
Latest version: 2.0.2

# `@kigiri/pure`

If you treat your state as immutable, then your components should make use of that.

`@kigiri/pure` allow you to create classes that extend `PureComponent` with less boiler plate.

## Install

```bash
# React is a peer dependencie
npm i @kigiri/pure react
```

## API
The api provide a `Pure` higher order component to create `PureComponents` from a just render function.

```js
// Components.js
import { Pure, React } from '@kigiri/pure'

export const NoOptions = Pure(props =>
  <div className={props.selected ? 'selected' : 'normal' }>
    {props.name}
  </div>
)
```

> `React` is passed down for convenience

### Options

#### .`withEvent`
The api also give a `withEvent` options with a mean to listen to some of the components methods events as functionals props:
 - `onMount` -> `componentDidMount`
 - `onCatch` -> `componentDidCatch`
 - `onUpdate` -> `componentDidUpdate`
 - `onUnmount` -> `componentWillUnmount`

```js
export const WithEvents = Pure({ withEvent: true }, props =>
  <div>
    Look ma, no classes !
  </div>
)
```

#### .`classNames`
The `classNames` options that allow you to merge some classes with the one
you may be given in props.

```js
export const ClassNames = ({ classNames: [ 'b', 'c' ] }, props =>
  <div className={props.className}>
    Merged class names !
  </div>
)
```

#### .`classFlags`
The `classFlags` option generates boolean flags as short hands for applying css classes.
```js
// options can be passed last or first.
export const FlagClass = (props =>
  <div className={props.className}>
    Flag classes
  </div>, {
  classFlags: {
    disabled: 'dis',
    selected: 'bp-selected'
  }
})
```

#### .`name`
The `name` option allow you to specify the expected name of your component.
By default it will try use (in that order):
  - the name given as an option
  - the name of the given function
  - name of the file calling (unreliable, only tested on node)
  - name of the exended class (`PureComponent` or `PureEventComponent`)

Usefull for debuging.  


### Usage

```js
// Demo
import React from 'react'
import ReactDOM from 'react-dom'
import { NoOptions, ClassNames, FlagClass, WithEvents } from './Components.js'

const rootElement = document.getElementById('root')

ReactDOM.render(
  <div>
    <NoOptions selected name="Jean-Michel" />
    {/* render to: <div class='selected'>Jean-Michel</div> */}
    <ClassNames className="a" />
    {/* render to: <div class='a b c'>Merged class names !</div> */}
    <FlagClass disabled selected className="a" />
    {/* render to: <div class='a dis bp-selected'>Flag classes</div> */}
    <WithEvents onMount={event => console.log(event.target)} />
    {/* log the event target on mount */}
  </div>, rootElement)

```
npm package: @kiho/svelte-ts-preprocess
Description: Typescript preprocessor for Svelte 3
Author: PaulMaly
Latest version: 1.1.2

# Typescript preprocessor for Svelte 3

## Install

```bash
npm i @kiho/svelte-ts-preprocess
```

## Rollup config

```javascript
import svelte from "rollup-plugin-svelte";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import { terser } from "rollup-plugin-terser";

import { preprocess } from "@kiho/svelte-ts-preprocess";

const production = !process.env.ROLLUP_WATCH;

export default {
  input: "src/main.js",
  output: {
    sourcemap: true,
    format: "iife",
    name: "app",
    file: "public/bundle.js"
  },
  plugins: [
    svelte({
      // enable run-time checks when not in production
      dev: !production,
      // we'll extract any component CSS out into
      // a separate file — better for performance
      css: css => {
        css.write("public/bundle.css");
      },
      preprocess: preprocess()
    }),

    // If you have external dependencies installed from
    // npm, you'll most likely need these plugins. In
    // some cases you'll need additional configuration —
    // consult the documentation for details:
    // https://github.com/rollup/rollup-plugin-commonjs
    resolve(),
    commonjs(),

    // If we're building for production (npm run build
    // instead of npm run dev), minify
    production && terser()
  ]
};
```

# Quick starter template

[svelte-ts-template](https://github.com/pyoner/svelte-ts-template)

# Typings

[svelte-types](https://github.com/pyoner/svelte-types)