Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

moonwalker/less-to-stylus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Less-to-Stylus

Basic .less to .stylus conversion.

Based on https://github.com/vio/semantic-ui-stylu://gist.github.com/MoOx/3490671

Usage

CLI

$ npm install -g @moonwalker/less-to-stylus

$ less-to-stylus -h
less-to-stylus <file> > output.styl

Convert .less to .stylus

Positionals:
  file  Less file                                                       [string]

Options:
  --version                 Show version number                        [boolean]
  --variable-name-prefix    Prefix variable names with a string,
                            default `''` (`$` is added automatically)   [string]
  --conditional-assignment  Replace all assignments with conditional assignments
                                                                       [boolean]
  --help                    Show help                                  [boolean]

### Javascript

```shell
$ npm install -D @moonwalker/less-to-stylus
const fs = require('fs');
const less2Stylus = require('@moonwalker/less-to-stylus');

fs.readFile('./source.less', 'utf8', (err, source) => {
  const output = less2Stylus.convert(source);

  console.log(output);
});

Use Stylus plugin

Some Less functionality does not have a Stylus correspondent. The plugin can help bridge some of the differences:

  • @import (optional)

About

Basic Less to Stylus conversion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published