2.1.0 • Published 6 months ago

@dintecom/resx-to-typescript v2.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

@dintecom/resx-to-typescript

Node module for generating TypeScript (models) files based on resx files.

Installation

npm install @dintecom/resx-to-typescript

Usage

The script requires two parameter, the path to the ResX file and the path to the TypeScript file you want to add.

So, to use the module in for instance a gulp task:

const { resxToTypeScript } = require("resx-to-typescript");

resxToTypeScript({
  resxFolder: "./Source/Resources",
  typeScriptFolder: "./target/resources",
});

Options

NameTypeDefaultDescription
indentSizenumber2A whole number defining the number of columns used for each indentation level
indentStyle'space' | 'tab''space'set to tab or space to use hard tabs or soft tabs respectively
resxFolderstring-Folder to scan for .resx files
resxEmpty'export' | 'skip' | 'throw''skip'Defines how to process resx files that do not contain any keys
typeScriptFolderstring-Output directory for TypeScript files
typeScriptNamespacestringnullTypeScript namespace for the resource models
typeScriptAccessModifier'public' | 'protected'nullAccess modifiers change the visibility of the properties of a class
typeScriptPropertyTypebooleanfalseEnables explicit definition of property types
2.1.0

6 months ago

2.0.2

8 months ago

2.0.1

8 months ago

2.0.0

8 months ago