# haml-transpiler-server-loader

> Uses Ruby haml-transpiler-server gem to transpile HAML files to HTML with decent speed using ruby executable

Latest version **4.0.0** (published 2016-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install haml-transpiler-server-loader
pnpm add haml-transpiler-server-loader
yarn add haml-transpiler-server-loader
bun add haml-transpiler-server-loader
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2016-04-29 |
| First published | 2016-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| Author | Francesco Belladonna |
| Maintainers | fire-dragon-dol |
| Keywords | haml, html, ruby, webpack, loader |

## Links

- npm: https://www.npmjs.com/package/haml-transpiler-server-loader
- Repository: https://github.com/Fire-Dragon-DoL/haml-transpiler-server-loader
- Homepage: https://github.com/Fire-Dragon-DoL/haml-transpiler-server-loader#readme
- Issues: https://github.com/Fire-Dragon-DoL/haml-transpiler-server-loader/issues
- npm.io page: https://npm.io/package/haml-transpiler-server-loader

## Dependencies (4)

- [bluebird](https://npm.io/package/bluebird.md) 3.3.4
- [form-data](https://npm.io/package/form-data.md) 1.0.0-rc4
- [node-fetch](https://npm.io/package/node-fetch.md) 1.4.1
- [loader-utils](https://npm.io/package/loader-utils.md) 0.2.14

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2016-04-29
- 3.0.0 — 2016-04-05

## README

# haml-transpiler-server-loader

Simple loader to transpile HAML files into HTML while using
[haml-transpiler-server](https://github.com/Fire-Dragon-DoL/haml-transpiler-server),
which allows proper transpiling with decent performance while using the Ruby
executable (which is the original HAML implementation).

## Requirements

- Ruby
- [haml-transpiler-server](https://github.com/Fire-Dragon-DoL/haml-transpiler-server)

## Installation

    gem install haml-transpiler-server
    npm install haml-transpiler-server-loader --save-dev

## Usage

Use it as a simple loader in your webpack configuration:

```js
{
  test: /\.html\.haml$/,
  loader: "file-loader?name=[path][name].html!haml-transpiler-server-loader",
  exclude: [
    /node_modules/
  ]
}
```

Then, before starting webpack, start the transpiler server:

    hamlts

At this point, you are good to go. Start your webpack config and everything
should work properly.

Check our
[usage example](https://github.com/Fire-Dragon-DoL/haml-transpiler-server-loader/tree/master/example)

## Configuration

You can configure which server `haml-transpiler-server-loader` listens to by
setting the following query values or by setting in webpack config the key
`hamlTranspilerServerLoader` (query has priority):

- `ip` the server hostname or IP, defaults to `"127.0.0.1"`
- `port` the server port, defaults to `5487`
- `moduleExport` boolean, if the loader should output a simple string or a
  `module.exports = "templateContent";`

### Example

Remember that in query `-moduleExport` sets it to false, `moduleExport` sets it
to true.

```js
var webpackConfig = {
  module: {
    loaders: [
      {
        test: /\.haml$/,
        loader: "haml-transpiler-server-loader?-moduleExport&port=1234",
        exclude: [
          /node_modules/
        ]
      }
    ]
  },
  hamlTranspilerServerLoader: {
    ip:           "127.0.0.1",
    port:         5487,
    moduleExport: true
  }
};
```

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