Skip to content
Grunt task for downloading Topcoat build dependencies.
CSS JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tasks
test
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
LICENSE
README.md
package.json

README.md

grunt-topcoat

Build Status

NPM

TOC

  1. Install
  2. Usage
  3. Options

Install

npm install grunt-topcoat --save-dev

Usage

Load the npm task in your Gruntfile:

grunt.loadNpmTasks('grunt-topcoat');

Add a TopCoat section to your package.json:

topcoat: {
    options: {
        // This is where you would specify target browsers for build.
        browsers: ['last 2 versions'],
        namespace: 'topcoat',
        license: 'test/fixtures/license.txt',
        vars: true,
        extend: true
    },
    compile: {
        files: [{
                src: ['test/fixtures/mobile-dark-button.css'],
                dest: 'tmp/mobile-dark-button.out.css'
            }
        ]
    },
    debug: {
        options: {
            debug: true
        },
        files: [{
                src: ['test/fixtures/mobile-dark-button.css'],
                dest: 'tmp/mobile-dark-button.out.css'
            }
        ]
    },
    compile_all: {
        files: [{
                expand: true,
                cwd: 'test/fixtures',
                src: ['*.css'],
                dest: 'tmp/',
                ext: '.out.css'
            }
        ]
    }
}

Options

  • browsers:
    • Your target browsers
    • defaults to the last two releases
  • namespace:
    • The namespace to prefix your class selectors with. This can be used to avoid class name collisions
    • defaults to 'topcoat'
  • license:
    • The license file you want to add to the final output

Something went wrong with that request. Please try again.