Node-sass is a library that provides binding for Node.js to LibSass, the C version of the popular stylesheet preprocessor, Sass. It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware. A custom importer allows extension of the LibSass engine in both a synchronous and asynchronous manner. In both cases, the goal is to either return or call done() with an object literal. When returning or calling done() with { file: "String" }, the new file path will be assumed for the @import. It's recommended to be mindful of the value of prev in instances where relative path resolution may be required. When returning or calling done() with { contents: "String" }, the string value will be used as if the file was read in through an external source.

Features

  • node-sass supports standard node style asynchronous callbacks
  • The interface for command-line usage is fairly simplistic
  • In error conditions, the error argument is populated with the error
  • In success conditions, the result object is populated with an object describing the result of the render call
  • node-sass/libsass will compile a mixed library of scss and indented syntax (.sass) files with the Default setting (false) as long as .sass and .scss extensions are used in filenames
  • Importers can return error and LibSass will emit that error in response

Project Samples

Project Activity

See All Activity >

Categories

Compilers

License

MIT License

Follow node-sass

node-sass Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of node-sass!

Additional Project Details

Operating Systems

Mac, Windows

Programming Language

C++

Related Categories

C++ Compilers

Registered

2021-07-19