{"id":20631851,"url":"https://github.com/andrelmlins/rollup-plugin-variables","last_synced_at":"2025-10-26T02:38:02.650Z","repository":{"id":57355623,"uuid":"246106222","full_name":"andrelmlins/rollup-plugin-variables","owner":"andrelmlins","description":"Rollup plugin from parse variables","archived":false,"fork":false,"pushed_at":"2020-03-09T19:14:36.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T20:46:50.780Z","etag":null,"topics":["parser","plugin","rollup","variables"],"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/andrelmlins.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-03-09T17:59:33.000Z","updated_at":"2020-03-09T19:07:27.000Z","dependencies_parsed_at":"2022-09-26T16:31:41.878Z","dependency_job_id":null,"html_url":"https://github.com/andrelmlins/rollup-plugin-variables","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/andrelmlins/rollup-plugin-variables","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrelmlins%2Frollup-plugin-variables","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrelmlins%2Frollup-plugin-variables/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrelmlins%2Frollup-plugin-variables/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrelmlins%2Frollup-plugin-variables/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrelmlins","download_url":"https://codeload.github.com/andrelmlins/rollup-plugin-variables/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrelmlins%2Frollup-plugin-variables/sbom","scorecard":{"id":192909,"data":{"date":"2025-08-11","repo":{"name":"github.com/andrelmlins/rollup-plugin-variables","commit":"0850ec295ef9ca61ee3920cf3294a22b2923a2e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T21:09:45.027Z","repository_id":57355623,"created_at":"2025-08-16T21:09:45.027Z","updated_at":"2025-08-16T21:09:45.027Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281049693,"owners_count":26435536,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["parser","plugin","rollup","variables"],"created_at":"2024-11-16T14:13:55.833Z","updated_at":"2025-10-26T02:38:02.606Z","avatar_url":"https://github.com/andrelmlins.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rollup Plugin Variables\n\nRollup plugin for parse variables\n\n[![npm version](https://badge.fury.io/js/rollup-plugin-variables.svg)](https://www.npmjs.com/package/rollup-plugin-variables) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/andrelmlins/rollup-plugin-variables/blob/master/LICENSE) [![Build Status](https://travis-ci.com/andrelmlins/rollup-plugin-variables.svg?branch=master)](https://travis-ci.com/andrelmlins/rollup-plugin-variables)\n\n## Install\n\n```\nnpm install rollup-plugin-variables\n```\n\nor\n\n```\nyarn add rollup-plugin-variables\n```\n\n## Usage\n\n**env.js**\n\n```js\nmodule.exports = () =\u003e {\n  return {\n    URL: 'http://www.example.com'\n  };\n};\n```\n\n**rollup.config.js**\n\n```js\nimport variables from 'rollup-plugin-variables';\n\nexport default {\n  plugins: [variables()]\n};\n```\n\n### How will the result be?\n\n**before in Link.jsx**\n\n```jsx\nimport React from 'react';\n\nconst LinkComponent = () =\u003e \u003ca href=\"[[URL]]\"\u003eLink\u003c/a\u003e;\n\nexport default LinkComponent;\n```\n\n**after in Link.jsx**\n\n```jsx\nimport React from 'react';\n\nconst LinkComponent = () =\u003e \u003ca href=\"http://www.example.com\"\u003eLink\u003c/a\u003e;\n\nexport default LinkComponent;\n```\n\n## Options\n\n### `fileName`\n\nType `String|Function` Default: `env.js`\n\n**rollup.config.js**\n\n#### `String`\n\n```js\nexport default {\n  plugins: [variables({ fileName: 'environments.js' })]\n};\n```\n\n#### `Function`\n\n```js\nexport default {\n  plugins: [\n    variables({\n      fileName: () =\u003e {\n        if (process.env.NODE_ENV === 'development') {\n          return 'environments.test.js';\n        }\n\n        return 'environments.js';\n      }\n    })\n  ]\n};\n```\n\n### `format`\n\nType `String\u003cjs,json,txt\u003e|Function\u003cjs,json,env\u003e` Default: `js`\n\n**rollup.config.js**\n\n#### `String`\n\n```js\nexport default {\n  plugins: [variables({ format: 'js' })]\n};\n```\n\n#### `Function`\n\n```js\nexport default {\n  plugins: [\n    variables({\n      format: () =\u003e {\n        if (process.env.NODE_ENV === 'development') {\n          return 'json';\n        }\n\n        return 'js';\n      }\n    })\n  ]\n};\n```\n\n### `marker`\n\nType `String|Function|Array` Default: `[[]]`\n\n**rollup.config.js**\n\n#### `String`\n\n```js\nexport default {\n  plugins: [variables({ marker: '{{}}' })]\n};\n```\n\n#### `Function`\n\n```js\nexport default {\n  plugins: [\n    variables({\n      marker: () =\u003e {\n        if (process.env.NODE_ENV === 'development') {\n          return '{{}}';\n        }\n\n        return '[[]]';\n      }\n    })\n  ]\n};\n```\n\n## NPM Statistics\n\nDownload stats for this NPM package\n\n[![NPM](https://nodei.co/npm/rollup-plugin-variables.png)](https://nodei.co/npm/rollup-plugin-variables/)\n\n## License\n\nRollup Plugin Variables is open source software [licensed as MIT](https://github.com/andrelmlins/rollup-plugin-variables/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrelmlins%2Frollup-plugin-variables","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrelmlins%2Frollup-plugin-variables","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrelmlins%2Frollup-plugin-variables/lists"}