Skip to content

diamondpkg/css-to-stylus-converter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Css to Stylus converter

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

About

Convert css to stylus syntax

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%