Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
A workflow utility to ease localization in JS(X) apps by automizing the following steps:
narp push
narp pull
The JSON translations are formatted for node-gettext, so using this as the gettext frameform is a really good idea. :)
To use it easily, install narp globally with:
npm install -g narp
To use it in an automatization pipeline in your project, install it as a dev dependency:
npm install --save-dev narp
# get help
narp -h
# extract + merge pots + upload pot
node push --password MY_TRANSIFEX_PASS
# download po's + convert to json + write to file
node pull --password MY_TRANSIFEX_PASS
--password
is also available as -p
.
import { push, pull } from 'narp';
const configs = {
transifex: {
password: 'retrieve this somehow, don\'t check it in'
},
};
push(configs);
pull(configs);
.narprc
is narp's configuration file. There you specify configs for the different tasks that require so.
You only need to specify the configs that you want to overwrite.
The defaults are:
{
"transifex": {
"username": null,
"project": null,
"resource": null,
"sourceLang": "en"
},
// Configs that are passed to react-gettext-parser
"extract": {
// A glob string (npmjs.com/glob) that matches all source files
// that may contain translatable strings.
"source": null,
// These two are passed directly to react-gettext-parser,
// see the react-gettext-parser readme
"componentPropsMap": { /* react-gettext-parser defaults */ },
"funcArgumentsMap": { /* react-gettext-parser defaults */ }
},
// Where to put all the translations
"output": "messages.json"
}
# Create a build from source
npm run build
# Build continuously as you save files
npm run build -- --watch
cd path/to/narp && npm link
Follow semver when bumping the version number, commit it and run
npm publish
FAQs
The worlds best super translation manager package handler
The npm package narp receives a total of 29 weekly downloads. As such, narp popularity was classified as not popular.
We found that narp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.