{"id":22862187,"url":"https://github.com/webforge-labs/requirejs-config-file","last_synced_at":"2025-10-19T00:12:54.548Z","repository":{"id":56057398,"uuid":"12915781","full_name":"webforge-labs/requirejs-config-file","owner":"webforge-labs","description":"A small api to read and write your requirejs config file","archived":false,"fork":false,"pushed_at":"2020-11-28T04:03:19.000Z","size":64,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T21:50:01.545Z","etag":null,"topics":["javascript","requirejs","requirejs-optimizer"],"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/webforge-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2013-09-18T06:30:26.000Z","updated_at":"2025-02-25T20:44:46.000Z","dependencies_parsed_at":"2022-08-15T12:20:35.895Z","dependency_job_id":null,"html_url":"https://github.com/webforge-labs/requirejs-config-file","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Frequirejs-config-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Frequirejs-config-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Frequirejs-config-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webforge-labs%2Frequirejs-config-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webforge-labs","download_url":"https://codeload.github.com/webforge-labs/requirejs-config-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251789308,"owners_count":21644081,"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":["javascript","requirejs","requirejs-optimizer"],"created_at":"2024-12-13T10:12:36.929Z","updated_at":"2025-10-19T00:12:49.526Z","avatar_url":"https://github.com/webforge-labs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# requirejs-config-file [![Build Status](https://travis-ci.org/webforge-labs/requirejs-config-file.svg?branch=master)](https://travis-ci.org/webforge-labs/requirejs-config-file)\n\n[![NPM](https://nodei.co/npm/requirejs-config-file.png?downloads=true)](https://www.npmjs.org/package/requirejs-config-file)\n\nA small api to read and write your requirejs config file\n\n\n## installation\n\n```\nnpm install requirejs-config-file\n```\n\n## usage\n\n### require the constructor\n```js\nvar ConfigFile = require('requirejs-config-file').ConfigFile;\n```\n\n### read\n```js\n// Read: reading the config\nvar configFile = new ConfigFile('path/to/some/requirejs-config.js'));\n\nvar config = configFile.read();\n\nconsole.log(config); // is an object with the found config\n```\n\n### modify (read and write)\n```js\n// Modify: reading and writing the config\nvar configFile = new ConfigFile('path/to/some/requirejs-config.js'));\n\nvar config = configFile.read();\n\nconfig.baseUrl = '/new';\n\nconfigFile.write();\n```\n\n### create\n```js\n// CreateExample: creating a new config file\nvar configFile = new ConfigFile('path/to/new-config.js'));\n\nconfigFile.createIfNotExists();\n\nconfigFile.write();\n```\n\n### create or modify\n```js\n// CreateAndModifyExample: reading and writing a maybe not existing config file\nvar configFile = new ConfigFile('path/to/new-config.js'));\n\nconfigFile.createIfNotExists();\n\nconfigFile.read();\n\nconfig.baseUrl = '/new';\n\nconfigFile.write();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebforge-labs%2Frequirejs-config-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebforge-labs%2Frequirejs-config-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebforge-labs%2Frequirejs-config-file/lists"}