grunt-fixclosure

3.0.0 • Public • Published

grunt-fixclosure

Grunt plugin for fixclosure.

NPM version Node.js version support Build Status MIT License

Getting Started

This plugin requires Grunt >=0.4.0

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 -D grunt-fixclosure fixclosure

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

grunt.loadNpmTasks("grunt-fixclosure");

The "fixclosure" task

Overview

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

grunt.initConfig({
  fixclosure: {
    options: {
      fixInPlace: true,
    },
    all: {
      src: ["path/to/**/*.js"],
    },
  },
});

Options

options.fixInPlace

Type: Boolean Default value: false

Enable --fix-in-place option of fixclosure. If true, fixclosure fixes invalid files in place.

Usage Examples

Lint

By default, grunt-fixclosure just lint JS files. If invalid files found, grunt fixclosrue exits with non-zero error code. It's useful for CI task.

grunt.initConfig({
  fixclosure: {
    lint: {
      src: ["path/to/**/*.js"],
    },
  },
});

Fix

With fixInPlace option, grunt fixclosure finds invalid files and fixes them.

grunt.initConfig({
  fixclosure: {
    fix: {
      fixInPlace: true,
      src: ["path/to/**/*.js"],
    },
  },
});

Also you can specify it with command-line option --fixclosure-fix-in-place.

$ grunt fixclosure --fixclosure-fix-in-place

Release History

  • v2+: See GitHub releases
  • 2016-04-06 v1.0.0 Update grunt to v1.0 and other deps.
  • 2016-03-16 v0.3.1 Cleanup, fix main in package.json and support for grunt@v1.0.0 #11
  • 2014-06-12 v0.3.0 Update fixclosure-1.3.0 and use caret ^1.3.0 instead of tilde ~1.3.0.
  • 2014-05-02 v0.2.0 Update fixclosure-1.2.0.
  • 2014-04-28 v0.1.0 Update fixclosure-1.1.0.
  • 2014-02-17 v0.0.1 Initial release with fixclosure 1.0.0 !

License

Copyright (c) 2016 Teppei Sato <teppeis@gmail.com>. Licensed under the MIT license.

Package Sidebar

Install

npm i grunt-fixclosure

Weekly Downloads

116

Version

3.0.0

License

MIT

Unpacked Size

6 kB

Total Files

3

Last publish

Collaborators

  • ama-ch
  • teppeis