# insiw

> This is the new interactive widget made for the SI widget.

Latest version **0.6.6** (published 2022-08-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install insiw
pnpm add insiw
yarn add insiw
bun add insiw
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.6 |
| Published | 2022-08-22 |
| First published | 2022-07-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 4.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fstorm |

## Links

- npm: https://www.npmjs.com/package/insiw
- npm.io page: https://npm.io/package/insiw

## Dependencies (6)

- [preact](https://npm.io/package/preact.md) ^10.3.1
- [@emotion/css](https://npm.io/package/@emotion/css.md) ^11.7.1
- [preact-habitat](https://npm.io/package/preact-habitat.md) ^3.3.0
- [preact-custom-element](https://npm.io/package/preact-custom-element.md) ^4.2.1
- [preact-render-to-string](https://npm.io/package/preact-render-to-string.md) ^5.1.11
- [@serendipityai/tm-visual](https://npm.io/package/@serendipityai/tm-visual.md) 1.39.7

## Recent versions

- 0.6.6 (latest) — 2022-08-22
- 0.6.4 — 2022-08-19
- 0.6.3 — 2022-08-18
- 0.5.7 — 2022-07-14
- 0.5.5 — 2022-07-06

## README

# Interactive SI Widget (InSIW)
This is the new interactive widget made for the SI widget. 

## How to run

Due to the irritation that is switching local node versions all the time, there is a docker image that handles node for you.
Note that due to .npmrc reasons, `npm i` needs to be run from outside the container. A future improvement would be to handle this better, but it's not a priority for now.

In order to build it:
```bash
./tools/dev/build.sh
```
In order to run it:
```bash
./tools/dev/run.sh
```
The `dev` command should be run from within the container, to make sure that it works for all.

### CLI Commands
*   `npm install`: Installs dependencies

*   `npm run dev`: Run a development, HMR server

*   `npm run serve`: Run a production-like server

*   `npm run build`: Production-ready build

*   `npm run lint`: Pass TypeScript files using ESLint

*   `npm run test`: Run Jest and Enzyme with
    [`enzyme-adapter-preact-pure`](https://github.com/preactjs/enzyme-adapter-preact-pure) for
    your tests


For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).

## How to deploy

### QA
Deploying the iframe to qa is done by pushing a commit. The new version of the code will be available [here](https://serendipity-ai.github.io/insiw/qa) after a few minutes.

### Staging
Deployment is done using git tags. When you are happy with what you have developed, and want to cut a new version, run 

```bash
git tag -a <version> -m '<message>'
```
Please make sure to add a sensible message, as this is the main way of documenting what your new version will introduce.

NOTE: Also change the version in the package.json file!

Once you have tagged the version you are happy with, remember to push the tag.
```bash
git push --tag
```

Also remember to push your code changes.

You can now, at any time, deploy that version to either staging or prod, using the setup manual workflows in [Github](https://github.com/Serendipity-AI/insiw/actions).

Run 
```bash
git tag -n
```
in order to list all tags.
### Prod
The deployment to prod is done in the same way as to staging. Note that this step will also publish a new version to npm!

---
_Source: https://npm.io/package/insiw · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
