Gathering detailed insights and metrics for grunt-properties-reader
Gathering detailed insights and metrics for grunt-properties-reader
Gathering detailed insights and metrics for grunt-properties-reader
Gathering detailed insights and metrics for grunt-properties-reader
npm install grunt-properties-reader
Typescript
Module System
Min. Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
13 Commits
7 Forks
2 Watchers
1 Branches
4 Contributors
Updated on Sep 15, 2018
Latest Version
0.1.3
Package Id
grunt-properties-reader@0.1.3
Size
4.81 kB
NPM Version
1.3.9
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
4
Grunt plugin that reads java properties files.
This plugin requires Grunt ~0.4.1
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:
1npm install grunt-properties-reader --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
1grunt.loadNpmTasks('grunt-properties-reader');
In your project's Gruntfile, add a section named properties
to the data object passed into grunt.initConfig()
.
1grunt.initConfig({
2 properties: {
3 props: 'configFile.properties'
4 }
5});
Options are passed directly into the second argument of the grunt.file.read
operation. See grunt.file
In this example, a properties file is used to read a server deployment location. The deployDir
property is then used in a clean task.
The example application.properties
file:
1deployDir=C:\server\deployment
And example Gruntfile.js
:
1grunt.initConfig({
2 properties: {
3 app: 'application.properties'
4 },
5 clean: {
6 deployDir: '<%= app.deployDir %>'
7 }
8})
9
10grunt.loadNpmTasks('grunt-contrib-clean');
11grunt.loadNpmTasks('grunt-properties-reader');
12
13grunt.registerTask('cleanDeploy', ['properties', 'clean:deployDir'])
Running grunt cleanDeploy
from the command line will delete the directory.
In this example, multiple properties files are read in the order specified. Values from subsequent files are merged with those from the proceeding. Therefore, values from proceeding files will overwrite those from the preceeding files. Consider the following properties files:
1deployDir=C:\server\deployment
1deployDir=/opt/server 2debug=true
1grunt.initConfig({
2 properties: {
3 app: [ 'default.properties', 'overrides.properties' ]
4 },
5 clean: {
6 deployDir: '<%= app.deployDir %>'
7 }
8})
9
10grunt.loadNpmTasks('grunt-contrib-clean');
11grunt.loadNpmTasks('grunt-properties-reader');
12
13grunt.registerTask('cleanDeploy', ['properties', 'clean:deployDir'])
When executed, the app variable will contain the following values:
1{ 2 deployDir=/opt/server 3 debug=true 4}
Finally, when using multiple files, the first file in the list must be present. All subsequent files are optional, and will not cause the task to fail if they are not present.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/13 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More