Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/stevemao/uncomment-it
- Owner: stevemao
- Created: 2015-05-22T23:23:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-13T08:04:08.000Z (over 9 years ago)
- Last Synced: 2025-01-05T11:35:39.949Z (13 days ago)
- Language: JavaScript
- Homepage:
- Size: 160 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 divuncommentIt('// var test = \'test\'', 'js');
//=> var test = 'test'uncommentIt('/*body {background: blue}*/', 'css');
//=> body {background: blue}
``````sh
$ npm install --global uncomment-it
$ uncomment-it --helpUsage
uncomment-it
uncomment-it
cat | uncomment-itExample
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.htmlOptions
-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