Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stevemao/uncomment-it

Uncomment html, js or css
https://github.com/stevemao/uncomment-it

Last synced: 2 days ago
JSON representation

Uncomment html, js or css

Awesome Lists containing this project

README

        

# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]

> Uncomment html, js or css

**NOTE**: This is using regex and therefore is pretty fragile. Created for simplicity and perf reasons. Read more at https://github.com/sindresorhus/comment-regex/issues/1.

**HINT**: In order to make it work properly, adjusting some space around the comments might help.

## Install

```sh
$ npm install --save uncomment-it
```

## Usage

```js
var uncommentIt = require('uncomment-it');

uncommentIt('', 'html');
//=>

a div

uncommentIt('// var test = \'test\'', 'js');
//=> var test = 'test'

uncommentIt('/*body {background: blue}*/', 'css');
//=> body {background: blue}
```

```sh
$ npm install --global uncomment-it
$ uncomment-it --help

Usage
uncomment-it
uncomment-it
cat | uncomment-it

Example
uncomment-it index.html html
uncomment-it index.js js uncommented.html
cat index.css | uncomment-its css
cat index.html | uncomment-it html > uncommented.html

Options
-v, --verbose Verbose output
```

## License

MIT © [Steve Mao](https://github.com/stevemao)

[npm-image]: https://badge.fury.io/js/uncomment-it.svg
[npm-url]: https://npmjs.org/package/uncomment-it
[travis-image]: https://travis-ci.org/stevemao/uncomment-it.svg?branch=master
[travis-url]: https://travis-ci.org/stevemao/uncomment-it
[daviddm-image]: https://david-dm.org/stevemao/uncomment-it.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/stevemao/uncomment-it