New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@wsdot/elc-ui

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wsdot/elc-ui

User interface for ELC map service SOE

latest
Source
npmnpm
Version
4.0.0-0
Version published
Maintainers
1
Created
Source

@wsdot/elc-ui

User interface for wsdot-elc.

Install

npm install @wsdot/elc-ui

Generate required stylesheets

  • Install @wsdot/elc-ui into your project.

  • Copy the following into a new file called generate-css.js.

    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.`);
            }
          });
        }
      }
    });
    
  • Execute the script

    node generate-css.js
    
  • Reference the stylesheets in your HTML file that will have the ELC UI control.

    <!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>
    

Keywords

wsdot

FAQs

Package last updated on 07 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts