Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including @vtex/grunt-defaults with all npm packages installed. Try it out:

var gruntDefaults = require("@vtex/grunt-defaults")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@vtex/grunt-defaults v0.5.0

Grunt config mixins


A Grunt convention-over-configuration meta-project.


Add @vtex/grunt-defaults as a dependency on your project:

npm i --save-dev @vtex/grunt-defaults

Each file in configs/ exports a function that returns some piece of grunt configuration.

Use them to build the config object in your Gruntfile:

defaults = require '@vtex/grunt-defaults'
_ = require 'underscore'

module.exports = (grunt) ->
  pkg = grunt.file.readJSON 'package.json'

  config = _.extend(
          delay: 500
          path: 'http://localhost:<%= connect.options.port %>/webpack-dev-server/'

  tasks =
    default: ['open:dev', 'webpack-dev-server']

  grunt.config.init config
  require('load-grunt-tasks')(grunt, {pattern: ['grunt-*']})
  grunt.registerTask taskName, taskArray for taskName, taskArray of tasks


Add a file to configs/ that exports a function returning a grunt config object. auto-discovers new files.

VTEX - 2015


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free