GithubHelp home page GithubHelp logo

sass2stylus's Introduction

Sass2stylus

Convert any number of sass files to stylus files in a ruby script or on the command line. If you're looking for an online option, you should use sass2stylus.com. This project is essentially an all-ruby version of @mojotech's work meant to be used on the command line.

Installation

To use Sass2Stylus as a command line utility, install the gem:

$ gem install sass2stylus

To use in your ruby project, add this line to your application's Gemfile:

gem 'sass2stylus'

And then install with your other dependencies:

$ bundle install

Usage

$ sass2stylus sass/folder/**/*.scss stylus/folder

First argument is a glob-formatted pattern which explains where the sass files are. These can be .sass or .scss files. Use the ** pattern to recursively search a directory for sass files.

The second argument is a folder where you'd like to dump the generated stylus files. Note The folder structure of the sass folder will be preserved in the stylus folder.

Usage in Ruby Project

To use this gem in a ruby project, just import it and set up a new instance of the Sass2stylus::Utilities class and pass a blob of sass files into stylus by calling:

require 'sass2stylus'
s2s = Sass2stylus::Utilities.new
s2s.batch(Pathname.pwd, '**/*.scss', 'stylus')

Pass in the base directory, the path to the sass files, and the relative path to the folder you'd like to use for output. (If you supply a folder that doesn't exist, the script will make it for you.)

Contributing

  1. Fork it ( https://github.com/paulcpederson/sass2stylus/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

sass2stylus's People

Contributors

paulcpederson avatar

Watchers

 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.