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-compass-compiler

v0.1.0

Published

Grunt task to compile multiple Compass projects

Downloads

11

Readme

grunt-compass-compiler

A Grunt plugin for compiling multiple Compass projects (ie. it compiles against many config.rb targets). This is useful for highly modular project structures such as those of Drupal and Wordpress.

Getting Started

IMPORTANT: This plugin requires at least Grunt 0.4 or higher and Compass 1.X.X or higher - it is recommended that you always run the latest versions of both.

Ensure you have Compass installed and in your PATH by checking for its version. If you get an error, install it.

$ compass --version   # you should see version 1.X.X or higher
$ gem install compass # if you get an error

Now install the Grunt task:

$ npm install grunt-compass-compiler

Then add this line to your project's Gruntfile.js:

grunt.loadNpmTasks('grunt-compass-compiler');

This allows you to use the 'compass' task to specify targets!

	compass: {
		modules: {
			options: {
				css_dir: 'css',
				sass_dir: 'sass',
				javascripts_dir: 'js',
				output_style: (grunt.option('env') === 'prod') ? 'compressed' : 'expanded',
				c: 'prod.rb'	// look for something other than config.rb and use it to compile
				ignore_pattern: /sass|css|js|img|images|inc|includes/,	// paths you know won't contain a compass config
			},
			files: {
				src: ['sites/all/modules/**/*']
			}
		}
	}

The task will look for a 'prod.rb' (instead of config.rb) file in each target directory found. It will execute 'compass compile' along with any given option on each target.

$ grunt compass:modules --env=prod

Would compile each prod.rb found anywhere inside "sites/all/modules" by executing this command:

$ compass compile -c prod.rb --sass-dir=sass --javascripts-dir=js --css-dir=css --output-style=compressed

Documentation

  • The compass task is a multi task, meaning that it will implicitly iterate over all of its targets if no target is specified.

  • Windows support is predictably absent

  • You must have Compass in your system PATH or this task won't work

Contributing

Feel free to fork if you see possible improvements or contact me directly if you want to contribute to this project (or just submit a pull request): [email protected]

Author

License

This project is licensed under the MIT license.