
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: whatβs affected and how to update safely.
@roninoss/plugin-primitives
Advanced tools
A collection of type-safe config plugin primitives that handle common native configuration tasks
A collection of type-safe config plugin primitives that handle common native configuration tasks.
withColor π€Adds, modifies, or removes a color value from the colors.xml file. Supports both normal and night modes.
withColor(config, {
name: "primaryColor",
value: "#000000",
night: true,
});
withString π€Adds, modifies, or removes a string value from the strings.xml file.
withString(config, {
name: "stringName",
value: "Hello, world!",
translatable: true,
});
withEntitlement πAdds, modifies, or removes an entitlement to your app, allowing it to access a feature on the device.
withEntitlement(config, {
key: "com.apple.developer.healthkit.access",
value: "yes",
});
withInfo πAdds, modifies, or removes a key/value pair to the Info.plist file.
withInfo(config, {
key: "NSHealthShareUsageDescription",
value: "We need access to your health data.",
});
withPbxProject πModifies the project.pbxproj file by overwritting it with an updated version. The plugin will use the project.pbxproj file found in the parallelDir directory, which defaults to plugins and overwitten. This ensures that the iOS project is always in a consistent state.
withPbxProject(config);
withModifyFile π€ πModifies an arbitrary file by
withModifyFile(config, {
filePath: "ios/AppDelegate.m",
find: "something",
replace: "something else",
});
withModifyFile(config, {
filePath: "ios/myapp/AppDelegate.mmm",
newSrc: "hello",
anchor: "something",
offset: 0,
});
This is primaririly used to modify unstructured files that don't have a specific format. For structured files, use more specific plugins like withInfo, withColor, etc.
withSourceFile π€ πAdds a source file to the project. Accepts an optional contents parameter to specify the contents of the file. If not provided, the contents will be read from the file at plugins/<filePath>. Also accepts an optional parallelDir parameter (which defaults to plugins) to specify a directory (relative to the project root) to place the file in. The parallel directory mirrors the ios or android directory structure.
withSourceFile(config, {
filePath: "ios/myapp/NewFile.swift",
});
Example file structure:
ios/
βββ myapp/
β βββ NewFile.swift
| βββ ...
plugins/
βββ ios/
β βββ myapp/
β βββ NewFile.swift
βββ ...
withResourceFile π€ πAdd a resource file to the project. Accepts an optional parallelDir parameter (which defaults to plugins) to specify a directory (relative to the project root) to place the file in. The parallel directory mirrors the ios or android directory structure.
withResourceFile(config, {
filePath: "android/src/main/res/values/strings2.xml",
});
Example file structure:
android/
βββ src/
| βββ ...
β βββ main/
β βββ res/
β βββ values/
β βββ strings2.xml
|
plugins/
βββ android/
β βββ src/
β βββ main/
β βββ res/
β βββ values/
β βββ strings2.xml
βββ ...
withRemoveFile π€ πRemoves a file and any references to it from the project.
withRemoveFile(config, {
filePath: "path/to/file",
});
withPlugins π€ πApplies multiple plugins. Accepts an array of plugins, where each element is either a plugin or a tuple of a plugin and its (type-safe) options.
withPlugins(config, [
withPbxProject,
[withEntitlement, { key: "aps-environment", value: "development" }],
[withColor, { name: "primaryColor", value: "#000000", night: true }],
]);
FAQs
A collection of type-safe config plugin primitives that handle common native configuration tasks
We found that @roninoss/plugin-primitives demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 0 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
New DoS and source code exposure bugs in React Server Components and Next.js: whatβs affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.