npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-libsass-e

v0.1.0

Published

Fast grunt sass compiler using libsass via node-sass (modified)

Downloads

4

Readme

#Not Actively Maintained

This project was built as an attempt to fit libsass into our build process at project collins more comfortably than grunt-sass but at the time libsass had not reached a level of feature parity which would allow it to use it. While that may no longer be the case I don't have time right now to come back to this project. It's not quite dead, but definitely sleeping.

For fast sass compilation with libsass look at grunt-sass which is an actively maintained grunt sass compiler using libsass

grunt-libsass

Fast grunt sass compiler using libsass via node-sass

Getting Started

This plugin requires Grunt 0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-libsass --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-libsass');

The "libsass" task

Run this task with the grunt libsass command

This plugin automates fast compilation of scss files using libsass via the node-sass module. It aims to make coexistence with and transition from the grunt-contrib-sass library as painless as possible.

Please not that grunt-libsass is incomplete and only very lightly tested at this point.

Sass compatibility

As noted in the documentation for the node-sass module

The libsass library is not currently at feature parity with the 3.2 Ruby Gem that most Sass users will use, and has little-to-no support for 3.3 syntax.

In other words, you may find that there are scss files it cannot compile and if there are sass 3.3 features you simply must have then the afforementioned grunt-contrib-sass plugin would be a better choice.

Options

options.loadPath

Type: [String] Default value: []

An array of paths to search for files to @import

options.sourcemap

Type: [String] Default value false

When set to true a sourcemap named <css-file-name>.map will be generated in the same location as the compiled css file.

Usage Examples

Compile a single file

In this example, the default options are used to compile a sass file

grunt.initConfig({
  libsass: {
      myTarget{
          src: 'src/my.scss'
          dest: 'dist/my.css',
      }
  }
});

Compile all files in a directory, with a loadPath set and sourcemaps enabled

In this example, all the scss files in a directory will be compiled. Paths are set to search for files to @import

grunt.initConfig({
  libsass: {
    options: {
      loadPath: ['my/load/path'],
      sourcemap: true
    },
    files: {[
        {
            expand: true,
            cwd: 'my/src/dir',
            src: ['**/*.scss'],
            dest: 'dist',
            ext: '.css'
        }
    ]},
  }
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

0.1.0 Alpha release. Limited functionality.

0.1.1 Better documentation

0.1.2 Screwed up 0.1.1 ...

0.2.0 Added sourcemap option