Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
grunt-statistiks
Advanced tools
Get statistics about files in project (lines, characters, …)
This plugin requires Grunt ~0.4
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-statistiks --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-statistiks');
In your project's Gruntfile, add a section named statistiks
to the data object passed into grunt.initConfig()
.
The "statistiks" task is coded to be used as MultiTask or as a simple task : if you don't define it in your grunt config, calling grunt statistiks
will use the default options.
The minimal usage of grunt-statistics will returns you the count of folders, files, non-empty lines and characters (from trimmed lines).
statistiks: {
src: [
'test/*'
]
}
statistiks: {
options: {
countEmptyLines: false,
trimLines: true,
countFolders: false
},
src: [
'test/*'
]
}
If you omit target files, grunt-statistiks will use all the files in the project, excepting the files in node_modules
folder.
Type: Boolean
Default: false
Set to true
to count empty lines in total lines count.
Type: Boolean
Default: true
By default, all non-empty lines are trimmed before characters counting. Set to false
to avoid trim.
Type: Boolean
Default: false
Set to true
to count folders.
In lieu of a formal styleguide, take care to maintain the existing coding style.
Lint and test your code using Grunt.
Copyright (c) 2014 Leny
Licensed under the MIT license.
FAQs
Get statistics about files in project (lines, characters, …)
We found that grunt-statistiks demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.