Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

KonstantinKai/css-to-stylus-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status npm version Dependency Status

Css To Stylus

Css to Stylus converter

=> Try VSCODE extension here <=

Install:

npm install -g css-to-stylus-converter

Node usage:

const cssToStylus = require('css-to-stylus-converter');

/**
 unprefix: boolean,
 indent: number,
 keepColons: boolean,
 cssSyntax: boolean,
 separateRules: boolean,
 removeComments: boolean,
 colorVariables: boolean,
 colorPrefix: string
 */

const stylusResult = cssToStylus(cssContent, converterOptions);

CLI usage:

Usage: css-to-stylus [options] <file ...>

  Options:

    -h, --help                   output usage information
    -V, --version                output the version number
    -u, --unprefix               remove vendor prefixes
    -i, --indent [n]             set indentation (number|tab)
    -c, --css-syntax             keep css syntax
    -l, --keep-colons            keep colons
    -s, --separate-rules         add new line before next rule
    -r, --remove-comments        remove comments
    -o, --color-variables        create color variables at top of file
    -p, --color-prefix [prefix]  color variables prefix
    -d, --output-dir [dir]       output dir
    -v, --verbose                show information

  Examples:

    # Generate file1.styl & file2.styl in current folder
    css-to-stylus [options] file1.css file2.css

    # Generate file.styl in current folder from style.css
    cat style.css | css-to-stylus [options] >> file.styl

    # Generate random name file in dir folder
    cat style.css | css-to-stylus -d dir