# @wsdot/elc-ui

> User interface for ELC map service SOE

Latest version **4.0.0-0** (published 2018-06-07) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install @wsdot/elc-ui
pnpm add @wsdot/elc-ui
yarn add @wsdot/elc-ui
bun add @wsdot/elc-ui
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0-0 |
| Published | 2018-06-07 |
| First published | 2018-06-07 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 30.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | WSDOT |
| Maintainers | jeff-jacobson |
| Keywords | wsdot, lrs, elc |

## Links

- npm: https://www.npmjs.com/package/@wsdot/elc-ui
- Repository: https://github.com/WSDOT-GIS/elc-ui
- Homepage: https://github.com/WSDOT-GIS/elc-ui#readme
- Issues: https://github.com/WSDOT-GIS/elc-ui/issues
- npm.io page: https://npm.io/package/@wsdot/elc-ui

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^1.9.2
- [wsdot-elc](https://npm.io/package/wsdot-elc.md) ^4.0.0-0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.0.0-0 (latest) — 2018-06-07

## README

# @wsdot/elc-ui

User interface for _wsdot-elc_.

## Install

```console
npm install @wsdot/elc-ui
```

## Generate required stylesheets

1.  Install _@wsdot/elc-ui_ into your project.
2.  Copy the following into a new file called `generate-css.js`.

    ```javascript
    const css = require("@wsdot/elc-ui").css;
    const fs = require("fs");
    const path = require("path");

    // Modify the output path here to point to your desired location.
    const outCssDir = path.resolve(__dirname, "..", "Style");

    // Create the output directory.
    fs.mkdir(outCssDir, err => {
      if (err) {
        if (err.code == "EEXIST") {
          console.log(
            `Directory already exists: ${outCssDir}. Skipping creation.`
          );
        } else {
          console.error(err);
        }
      }

      // For each property of the css object, write a new CSS file.
      for (const cssName in css) {
        if (css.hasOwnProperty(cssName)) {
          const cssData = css[cssName];
          let file = `${cssName}.css`;
          if (!file.match(/^elc-ui/)) {
            file = `elc-ui-${file}`;
          }
          const destPath = path.resolve(outCssDir, file);
          fs.writeFile(destPath, cssData, err => {
            if (err) {
              console.error(err);
            } else {
              console.log(`file ${destPath} has been written.`);
            }
          });
        }
      }
    });
    ```

3.  Execute the script

    ```console
    node generate-css.js
    ```

4.  Reference the stylesheets in your HTML file that will have the ELC UI control.

    ```html
    <!DOCTYPE html>
    <html>
    <head>
        <title>My example page</title>
        <link rel="stylesheet" href="Style/elc-ui-behavior.css" /> <!-- required -->
        <link rel="stylesheet" href="Style/elc-ui.css" /> <!-- optional. You can omit and specify your own styling. -->
        ...
    </head>
    ...
    </html>
    ```

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