Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update package.json and package-lock.json #59

Merged
merged 1 commit into from
Oct 14, 2022
Merged

update package.json and package-lock.json #59

merged 1 commit into from
Oct 14, 2022

Conversation

agustinseifert
Copy link
Collaborator

Welcome to Codeverter!

Codeverter is a tool to convert a TypeScript source file (*.ts) into different languages (go, c# or Visual Basic by the moment).

Codeverter Build
Codeverter tests
Codeverter Playground
NPM
GH Package


Playground

If you want to try it, click here!

Installing

NPM

Public registry

npm install -g @southworks/codeverter

Locally

cd ./path-to-codeverter
npm run build:prod
npm install -g

Building

Prerequisites

Dependencies

In order to build the project you must install the required dependencies by running the following command npm install

Compilation

The project is written in TypeScript so you need to call the tsc compiler. To start the compilation process use the command npm run build once finished you will have all the final JavaScript files at ./out folder.

For production use the command npm run build:prod

Testing

To run the available test suites run the command npm test

  • The test framework is Jest so you can use any flag you want. For example: npm test -- -t "constant"

Usage

Command 'cdv'

cdv is the command to execute the tool

For example:
cdv --src xxx --lang zzz --dest yyy <path>

Args

--src: Path to the source file or directory.

  • Default value: .

--lang: Target language.

  • Values: csharp | go | vb
  • Default value: go

--template: Custom template to perform the transformation. The extension must be '.t' followed by the language extension, for example: csharp => .tcs.

  • Values: Path to the custom tempate
  • Default value: ''

--dest: Destination

  • Values: console | file
    • file has an extra parameter <destination path>
  • Default value: console

Support

Fully documented support at Wiki

Constants/Variables

C# GO Visual Basic
Global ✔️ ✔️ ✔️
Function/Constructor body ✔️ ✔️ ✔️

Enums

C# GO Visual Basic
Numeric ✔️ ✔️ ✔️
String ✔️ ✔️
Implicit ✔️ ✔️ ✔️

Interfaces

C# GO Visual Basic
Members ✔️ ✔️
Method/Functions ✔️ ✔️ ✔️
Inheritance ✔️ ✔️
Implementation ✔️ ✔️ ✔️

Classes

C# GO Visual Basic
Inheritance ✔️ ✔️* ✔️
Interfaces ✔️ ✔️ ✔️
Visibility ✔️ ✔️** ✔️
Static P P

*In a go way, using composition

**Using naming conventions

Constructors

C# GO Visual Basic
Visibility ✔️ ✔️
Parameters ✔️ ✔️ ✔️
Body AS COMMENT AS COMMENT AS COMMENT

Properties

C# GO Visual Basic
Visibility ✔️ ✔️* ✔️

*Naming convention for pubic or private, protected is considered private

Methods/Functions

C# GO Visual Basic
Visibility ✔️ ✔️* ✔️
Parameters ✔️ ✔️ ✔️
Return type ✔️ ✔️ ✔️**
Default return value ✔️ ✔️ ✔️**

*Naming convention for pubic or private, protected is considered private

**As functions

@sancalle sancalle merged commit 48f3108 into main Oct 14, 2022
@sancalle sancalle deleted the 2.1.0 branch October 14, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants