# grunt-stripjscomments

> Remove comments from production js code

Latest version **0.1.0** (published 2015-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-stripjscomments
pnpm add grunt-stripjscomments
yarn add grunt-stripjscomments
bun add grunt-stripjscomments
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-04-03 |
| First published | 2015-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Keppel |
| Maintainers | kahlzarg |
| Keywords | gruntplugin, strip, comments, strip comments, remove, remove comments |

## Links

- npm: https://www.npmjs.com/package/grunt-stripjscomments
- Repository: https://github.com/kahlzarg/grunt-stripjscomments
- Issues: https://github.com/kahlzarg/grunt-stripjscomments/issues
- npm.io page: https://npm.io/package/grunt-stripjscomments

## Recent versions

- 0.1.0 (latest) — 2015-04-03

## README

# grunt-stripjscomments

forked from kkemple/grunt-stripcomments

> Remove comments from production ready code

## Getting Started
This plugin requires Grunt `~0.4.1`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-stripjscomments --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-stripjscomments');
```

## The "comments" task

### Overview
In your project's Gruntfile, add a section named `comments` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  comments: {
    your_target: {
      // Target-specific file lists and/or options go here.
      options: {
          singleline: true,
          multiline: true
      },
      src: [ 'src/*.js'] // files to remove comments from
    },
  },
});
```

### Options

#### options.singleline
Type: `Boolean`
Default value: `true`

Determines whether or not to remove single line comments

#### options.multiline
Type: `Boolean`
Default value: `true`

Determines whether or not to remove multi line comments

### Usage Examples

```js
grunt.initConfig({
  comments: {
    js: {
      options: {
        singleline: true,
        multiline: false
      },
      src: [ 'src/*.js' ]
    },
    php: {
      options: {
        singleline: true,
        multiline: true
      },
      src: [ 'lib/*.php' ]
    }
  },
});
```

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History
v 0.1.0 - alpha release

---
_Source: https://npm.io/package/grunt-stripjscomments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
