hex-scraper

0.2.0 • Public • Published

Hex Scraper

Table of Contents

About

Hex Scraper compiles an HTML file of swatches corresponding to the colors used within a given stylesheet or CSS string.

Installation

npm install hex-scraper

Setup

hex-scraper does not require any additional setup.

Usage

After installation, import the hexScraper function as follows:

var hexScraper = require( 'hex-scraper' );

To scrape a given stylesheet, invoke the hexScraper function as follows:

hexScraper( {
    input: 'path/to/stylesheet',
    outFile: 'path/to/output/file.ext',
} );

Please note, if the outFile key is not present on the options object, the output will be written to the current working directory.

Documentation

The hexScraper takes a single argument: the options object. See the keys section below for a list of valid options.

Keys

data: string

String of CSS to 'scrape'. If present, the value of the data key will be used instead of the input.

input: string

Path to the CSS file to 'scrape'. If the data key is present, this value will be ignored.

outFile: string

Full path to desired location of output, including: path; filename; extension. If this key is omitted, the output will be written to the current working directory.

Readme

Keywords

none

Package Sidebar

Install

npm i hex-scraper

Weekly Downloads

1

Version

0.2.0

License

ISC

Last publish

Collaborators

  • jrmykolyn