https://github.com/pgilad/gulp-check-constants
Find numbers that should be extracted to a declaration statement
https://github.com/pgilad/gulp-check-constants
Last synced: about 1 year ago
JSON representation
Find numbers that should be extracted to a declaration statement
- Host: GitHub
- URL: https://github.com/pgilad/gulp-check-constants
- Owner: pgilad
- License: mit
- Created: 2014-10-17T23:41:54.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-05-22T17:26:33.000Z (about 11 years ago)
- Last Synced: 2025-03-18T18:44:31.001Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 207 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [gulp](https://github.com/wearefractal/gulp)-check-constants
> Find numbers that should be extracted to a declaration statement using [check-constants](https://github.com/pgilad/check-constants)
[](https://npmjs.org/package/gulp-check-constants)
[](https://npmjs.org/package/gulp-check-constants)
[](https://travis-ci.org/pgilad/gulp-check-constants)
*Issues with the output should be reported on the check-constants [issue tracker](https://github.com/pgilad/check-constants/issues).*
## Install
Install with [npm](https://npmjs.org/package/gulp-check-constants)
```bash
$ npm install --save-dev gulp-check-constants
```
## Usage
```js
var gulp = require('gulp');
var checkConstants = require('gulp-check-constants');
//example with basic css copying
gulp.task('js', function() {
gulp.src('./src/js/**/*.js')
.pipe(checkConstants())
.pipe(gulp.dest('./public/js'));
});
//example with custom options
gulp.task('js', function() {
gulp.src('./src/js/**/*.js')
.pipe(checkConstants({
enforceConst: true,
ignore: [0, 1, 2, 3, 10]
}))
.pipe(gulp.dest('./public/js'));
});
```
## API
See the `check-constants` [Options](https://github.com/pgilad/check-constants#api)
except for `file` which is handled for you.
## License
MIT @[Gilad Peleg](http://giladpeleg.com)