{"id":19044563,"url":"https://github.com/crissdev/gulp-props","last_synced_at":"2025-04-23T23:29:34.791Z","repository":{"id":21035287,"uuid":"24331822","full_name":"crissdev/gulp-props","owner":"crissdev","description":"Convert Java .properties to JSON","archived":false,"fork":false,"pushed_at":"2018-04-22T14:47:16.000Z","size":44,"stargazers_count":1,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T16:37:17.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crissdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-22T14:26:51.000Z","updated_at":"2024-11-21T16:02:31.000Z","dependencies_parsed_at":"2022-09-13T22:22:18.949Z","dependency_job_id":null,"html_url":"https://github.com/crissdev/gulp-props","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-props","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-props/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-props/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crissdev%2Fgulp-props/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crissdev","download_url":"https://codeload.github.com/crissdev/gulp-props/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250531664,"owners_count":21446035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:46:42.829Z","updated_at":"2025-04-23T23:29:34.765Z","avatar_url":"https://github.com/crissdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-props\n\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![npm version](https://badge.fury.io/js/gulp-props.svg)](http://badge.fury.io/js/gulp-props)\n[![Build Status](https://travis-ci.org/crissdev/gulp-props.svg?branch=master)](https://travis-ci.org/crissdev/gulp-props)\n[![Build status](https://ci.appveyor.com/api/projects/status/7qnfbed3lts8xgvp/branch/master?svg=true\u0026passingText=master%20-%20OK)](https://ci.appveyor.com/project/crissdev/gulp-props/branch/master)\n[![Dependency Status](https://david-dm.org/crissdev/gulp-props.svg)](https://david-dm.org/crissdev/gulp-props)\n\n\u003e A [Gulp](https://github.com/gulpjs/gulp) plugin to convert [Java .properties](http://en.wikipedia.org/wiki/.properties) to [JSON](http://en.wikipedia.org/wiki/JSON)\n\n\n## Install\n\n```sh\nnpm install --save-dev gulp-props\n```\n\n## Usage\n\n```js\nconst props = require('gulp-props');\n\n// Generate a .js file with default namespace (config)\ngulp.src('./src/*.properties')\n  .pipe(props())\n  .pipe(gulp.dest('./dist/'))\n\n// Generate a .json file indented with 2 spaces\ngulp.src('./src/*.properties')\n  .pipe(props({ namespace: '', space: 2 }))\n  .pipe(gulp.dest('./dist/'))\n\n// Generate a .js file with a custom namespace (state)\ngulp.src('./src/*.properties')\n  .pipe(props({ namespace: 'state' }))\n  .pipe(gulp.dest('./dist/'))\n```\n\n\n## API\n\n### props([options])\n\n\n#### options.namespace\n\nType: `String`\n\nDefault: `config`\n\nThe namespace to use when defining properties. Javascript reserved words cannot be used here.\nInvalid identifiers will be adjusted to be valid, and a warning will be printed in the console.\n\n**Note**: To force a `JSON` output set this option to an empty string.\n\n\n#### options.space\n\nType: `Number` or `String`\n\nDefault: `null`\n\nControl spacing in the resulting output. It has the same usage as for [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n_The option is used only when namespace option is an empty string._\n\n\n#### options.replacer\n\nType: `Function` or `Array`\n\nDefault: `null`\n\nFurther transform the resulting output. It has the same usage as for [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n_The option is used only when namespace option is an empty string._\n\n\n#### options.appendExt\n\nType: `Boolean`\n\nDefault: `false`\n\nAppend the extension (`.js` or `.json`) instead of replacing it.\n\nUseful if the property file doesn't have an extension.\n\n## License\n\nMIT © [Cristian Trifan](https://crissdev.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fgulp-props","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrissdev%2Fgulp-props","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrissdev%2Fgulp-props/lists"}