Git Product home page Git Product logo

hex-scraper's Introduction

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.

hex-scraper's People

Contributors

jrmykolyn avatar

Watchers

James Cloos avatar  avatar Nathan Foon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.