grunt-check-constants

Find numbers that should be extracted as a declaration statement

Usage no npm install needed!

<script type="module">
  import gruntCheckConstants from 'https://cdn.skypack.dev/grunt-check-constants';
</script>

README

grunt-check-constants

Find numbers that should be extracted to a declaration statement using check-constants

NPM Version NPM Downloads

Issues with the output should be reported on the check-constants issue tracker.

Install

$ npm install --save-dev grunt-check-constants

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
    'checkConstants': {
        options: {} //add options to pass to check-constants
        validate: {
            src: ['./src/**/*.js']
        }
    }
});

grunt.registerTask('default', ['checkConstants']);

Options

See the check-constants Options except for file which is handled for you.

License

MIT ©Gilad Peleg