Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
es-resx-to-js
Advanced tools
This is a small helper module which is transforming the localization files from RESX files into JS files.
JS files are being created by template.
#!json
"devDependencies": {
"es-resx-to-js": "^1.0.0"
}
#!javascript
// Import the RESX to JS module
var resxtojs = require('es-resx-to-js');
gulp.task('TAKS_NAME', function() {
// Module Build Function
resxtojs.build(
{
// Define all mappings between RESX files and JS files
// An array of mapping objects
mapping: [
{
// Relative/Absolute path to RESX files
// RESX files for additional languages are being automatically resolved:
// - Based on the langs param
// - RESX files have to follow the expected filename convention, see the section Expected RESX file format
resx: '[...]/ExampleModule.resx',
// Relative/Absolute path to JS file
// JS files for additional languages are being automatically resolved.
// - Based on the langs param
js: '[...]/example-module.js',
// Resource base name
// Used as the localization root object
resName: 'ExampleModule'
}
],
// Relative/Absolute path to the JS file template
// This file content is being used for the JS file creating
// See the JS File Template Section
template: '[...]/template.txt',
// List of all "non-default" languages
// OPTIONAL: If there are no other languages than just delete this param
langs: ['es']
},
// Callback function which contains the log messages from the module
function(log) {
console.log(log);
}
);
});
RESX files containing additional languages should use this name convention:
#!javascript
// Root namespace
var Evoke = Evoke || {};
// Localization namespace
Evoke.App.Localization = Evoke.App.Localization || {};
/*
* Auto-generated localization file
* Source file: {filename}
* Lang: {lang}
*/
// Name of the localization resource
var resName = '{resname}';
// Declare all localization strings as object paramers
Evoke.App.Localization[resName] = {
{keyValuePairs}
};
FAQs
Helper module for transforming RESX loc files to JS file.
The npm package es-resx-to-js receives a total of 1 weekly downloads. As such, es-resx-to-js popularity was classified as not popular.
We found that es-resx-to-js 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.