New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-var-utils

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-var-utils

Utils for common variable usages.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

grunt-var-utils

Utils for common variable usages.

Getting Started

This plugin requires Grunt 0.4.x

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-var-utils --save-dev

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

grunt.loadNpmTasks('grunt-var-utils');

The "var_utils" task

Overview

In your project's Gruntfile, add a section named var_utils to the data object passed into grunt.initConfig().

grunt.initConfig({
  var_utils:{
    options: {
       includeJS: true
      ,includeSCSS: true
      ,addCommonConfigVars: true
      ,addCommonAngularJSConfigVars: true
    },
    rootDir:"./"
  }
});

Options

options.addCommonConfigVars

Type: Boolean Default value: false

Specify if you want common variables set.

options.addCommonAngularJSConfigVars

Type: Boolean Default value: false

Specify if you want common variables set for AngularJS.

options.includeJS

Type: Boolean Default value: false

Specify if you want common variables to include javascript variables.

options.includeSCSS

Type: Boolean Default value: false

Specify if you want common variables to include Sass (SCSS) variables.

Usage Examples

Default Options

In this example, the 'rootDir' is set to one level above the Grunt directory. Only 'getVar' will become available by default.

grunt.initConfig({
  var_utils:{
    rootDir:"../"
  }
});
Custom Options

In this example, the 'rootDir' is set to two levels above the Grunt directory. The options have all been set to true to include all featured variables on the main config object.

grunt.initConfig({
  var_utils:{
      options: {
         addCommonConfigVars: true
        ,addCommonAngularJSConfigVars: true
        ,includeJS: true
        ,includeSCSS: true
      },
      rootDir:"../../"
    }
});

Release History

  • 0.1.1: Fixed 'rootDir' variable to be adjustable.
  • 0.1.0: Initial port over from grunt.jimd.utils. 'getNestedConfigVariable' changed to 'getVar' and heavily simplified.

Keywords

FAQs

Package last updated on 28 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc