1.0.0 • Published 8 years ago

compass-version v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

compass-version

NPM version Build Status Coverage Status Dependency Status devDependency Status

A Node module to get the version of a compass binary in semver format

const compassVersion = require('compass-version');

compassVersion().then(version => {
  version; //=> '1.0.3'
});

Installation

Use npm.

npm install compass-version

API

const compassVersion = require('compass-version');

compassVersion(options)

options: Object (directly passed to child_process#spawn)
Return: Object (Promise instance)

It detects the installed Compass version in compass version command.

When it finish resolving the version, it will be fulfilled with a String of the semver-valid version number.

When it fails, it will be rejected with an error object.

options

In addition to child_process#spawn, you can set bundleExec option:

options.bundleExec

Type: Boolean
Default: false

Detect the version in bundle exec compass version, instead of compass version.

const compassVersion = require('compass-version');

compassVersion({bundleExec: true}).then(version => {
  version; //=> '1.0.3'
});

Related project

License

The Unlicense