Socket
Book a DemoInstallSign in
Socket

@map-colonies/code-generator

Package Overview
Dependencies
Maintainers
10
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@map-colonies/code-generator

This is template for map colonies typescript packages

latest
Source
npmnpm
Version
1.7.2
Version published
Maintainers
10
Created
Source

code-generator

package includes:

code-generator is using 'ts-morph' (https://www.npmjs.com/package/ts-morph) os package to generate ts classes, interfaces, enum, etc. dynamically based on map-colonies/mc-models (https://github.com/MapColonies/mc-models) profiles.

package usage:

the package can be installed with npm install @map-colonies/mc-code-generator.

building the package:

run npm install to install project dependencies.

to create local package tgz file run npm pack after the build

run package

in your project package.json add script for generate: generate: 'node **/index.js -tf='path/to/file -p=your-project-name (raster, 3d, etc..) -gt=type-of-source (orm, graphQl, etc..)

parameters

  • -p --project - name of the project, available values: raster, 3d, polygonParts. (no default)

  • -tf --targetFile - path to the generated file, override file if exists. (no default)

  • -gt --generateType - type of the wished generated code, avaiable values: orm, graphQl. (no default)

  • -ormd --ORMDecorators - ORM additional decorators of the wished generated file, avaiable values: index, check. (no default)

FAQs

Package last updated on 06 Apr 2025

Did you know?

Socket

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.

Install

Related posts