# @snowsvex/snowsvex-plugin

> > Snowpack plugin for building svex-y static sites with svelte

Latest version **0.1.7** (published 2021-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @snowsvex/snowsvex-plugin
pnpm add @snowsvex/snowsvex-plugin
yarn add @snowsvex/snowsvex-plugin
bun add @snowsvex/snowsvex-plugin
```

## 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.1.7 |
| Published | 2021-03-05 |
| First published | 2021-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 235.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Conor Sinclair |
| Maintainers | c-sinclair, snowsvexer |

## Links

- npm: https://www.npmjs.com/package/@snowsvex/snowsvex-plugin
- Repository: https://github.com/snowsvex/snowsvex-plugin
- Homepage: https://github.com/snowsvex/snowsvex-plugin#readme
- Issues: https://github.com/snowsvex/snowsvex-plugin/issues
- npm.io page: https://npm.io/package/@snowsvex/snowsvex-plugin

## Dependencies (1)

- [js-yaml](https://npm.io/package/js-yaml.md) ^4.0.0

## Recent versions

- 0.1.7 (latest) — 2021-03-05
- 0.1.6 — 2021-03-05
- 0.1.5 — 2021-03-03
- 0.1.4 — 2021-03-03
- 0.1.3 — 2021-03-02
- 0.1.2 — 2021-02-27
- 0.1.1 — 2021-02-27

## README

# Snowsvex Plugin

> Snowpack plugin for building svex-y static sites with svelte

Compile Svelte and svelte-scented markdown _(aka MDSvex)_ into static pages using Snowpack.

## Installation

📦 Install with your favourite package manager

```sh
npm i -D @snowsvex/snowsvex-plugin
yarn add -D @snowsvex/snowsvex-plugin
pnpm i -D @snowsvex/snowsvex-plugin
```

❄️ And then add it to your `snowpack.config.js` plugins

```json
  "plugins": [
    ...
    '@snowsvex/snowsvex-plugin',
  ],
  ...
```

## Configuration

By default any `.svelte` or `.svx` files in your `src/pages` directory will generate html files.

You can change this by adding to the plugin config in `snowpack.config.js`

```json
  "plugins": [
    ...
    ['@snowsvex/snowsvex-plugin', {
      pagesDirs: ['pages', 'articles', 'foo', 'superfoo']
    }],
  ],
  ...
```

`pagesDirs` expects a `string[]` of directory names to look in for files to generate static pages from.

## Output Files

Issues currently exist with file names keeping their `.svelte` / `.svx` extensions

This can be circumvented by using the `@snowsvex/snowsvex-builder` package to build or writing your own custom node script to move/rename the files as you wish!

Using `@snowsvex/snowsvex`, add the build script to your `package.json` scripts.

```json
  "scripts": {
    "build": "snowsvex build",
    ...
  },
```

The `pages` directory is special and if present will generate html files at the root of your build directory. This is so no special routing needs to take place when your awesome new static site hits the server. All other directories will be placed in `[DIR]/[FILE_NAME]` in your build directory.

### Dev Mode

Issues exist with snowpack not understanding multiple output files when in dev mode. This can be avoided

## TODO

- [ ] Setup Github action to autodeploy to npm
- [ ] gif showing output directory structure

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