smart.objx.models v0.0.2-91
Additional Dependencies
Automatic generation of TypeScript classes for smart.Objx models is enabled by the Reinforced.Typings build process add-on available through NuGet. To ensure that generation of TypeScript files goes smoothly, Reinforced.Typings and its dependencies must be installed into all projects for which code is to be generated. Currently, the projects that use Reinforced.Typings are:
- smart.Objx
- smart.Objx.Profiles
- smart.Objx.Rules
- smart.Objx.Structures
Each of these projects also has a 'Reinforced.Typings.settings.xml' file in its root directory. This file contains configuration information and is required in order for Reinforced.Typings to function.
Source Location
Generated TypeScript sources are written to the $(smart.Objx)/ModelsTS/smart directory, where $(smart.Objx) is the directory that contains the smartObjx.sln file and all associated project directories. One file will be generated for each of the projects that uses Reinforced.Typings; each file will contain all the generatead sources for that project.
Packaging
The provided package.json file and mkindex.bat script should be placed in the aforementioned ModelsTS folder; ModelsTS is the root of an NPM package which can be generated by running
npm pack
once the package.json and mkindex.bat files are in place. Due to limitations of the Reinforced.Typings tool, a manifest file (index.ts) for use as the entry point (package.json 'main' property) is not automatically generated; the provided mkindex.bat script is automatically executed by NPM when the aforementioned packaging command is run and generates the necessary index.ts file based on the presence of other TypeScript files in the 'smart' directory where sources produced by Reinforced.Typings are placed.
2 years ago