Tsed: [TOOLS] tsed-cli

Created on 18 Feb 2018  路  39Comments  路  Source: tsedio/tsed

Informations

Type |聽Version
---|---
Tools | 3.x


Description

Create a command line tools to scaffold a project like angular-cli.

  • Project configuration. Ability to choose basic Ts.ED extensions (Swagger, Socket.io, etc...),
  • Generate a Service,
  • Generate a Controller,
  • Generate a Middleware.
In progress

Most helpful comment

Proposal:

Usage: tsed [options] [command]


  Options:

    -V, --version  output the version number
    -h, --help     output usage information


  Commands:

    new              Scaffold a new Ts.ED project
    generate, g  Create a new components (Controller, Service, Middleware, etc...) 
    help [cmd]   Display help for [cmd]

All 39 comments

Proposal:

Usage: tsed [options] [command]


  Options:

    -V, --version  output the version number
    -h, --help     output usage information


  Commands:

    new              Scaffold a new Ts.ED project
    generate, g  Create a new components (Controller, Service, Middleware, etc...) 
    help [cmd]   Display help for [cmd]

@Romakita I am in the process of creating a CLI based on Commander.js and Inquirer.js. Do you think it will be helpful?

@OskarLebuda Yes, it could be helpul for new developers ;)

Ok, so I鈥檒l try to finish it ASAP ;)

Any update?

On my side, I'm not able to work on currently ^^. @OskarLebuda want to work on. Tell me if you need help.

It鈥檚 almost done. I think I鈥檒l create a pull request this week

Nice. Take your time. I won鈥檛 be able to review it and merge the branch until two weeks. No computer and small network 馃槣.

See you ;) (I sent you an invite to the tsed repo ;))

Any update?

Sorry for late, but I had some personal issues. I'll try to create PR this week

@OskarLebuda is there any updates?
I think I can help with this.

We have to plan features first, like:

  • Project Initializer (we need templates like create-react-app or vue-cli)
  • yarn create compatibility
  • Codegen: Service, Controller, etc...
  • Debug/Test/Run, new version check in debug environment
  • Upgrade mechanism use ts-simple-ast or just a simple git diff(like rn)

Seems the project initializer and codegen is the pain point of CLI and should have higher priority.

^ @Romakita

Hello @edgesite,
Currently, I'm really busy, I work on issue and enhancement on core framework. I know the CLI really importante and contributors are welcome. I can help on this topics to create dedicated repository or given any things required for the project (deployment, tasks, infos, etc...). I worked on projects examples last week which can be reused for a project template.

@OskarLebuda is the first to work on the cli (branch feat/cli).

Tell what can I do to advance the subject and work togother :)

See you
Romain

CLI can be develop on this repository https://github.com/TypedProject/tsed-cli if it's more comfortable for you :)

Okay thanks for update. I think I can make the CLI works and make an iterate plan in a few weeks.

Any progress on this feature? I can help if need be.

Hello @shakilsiraj

Your help is welcome ;)

@Romakita could you initialize cli repo with some default config, like prettier or eslint or whatever you want to have? I was going to start with cli but I miss the basic skeleton, I started creating the basic features but I don't know which are your preferences

Thanks

@d0whc3r Yes I doing that :)

@d0whc3r I you write the cli in typescript or pure js ?

typescript and rollup to transpile should be a good choise, also eslint instead of tslint

rollup ?

Ok rollup isn't necessary. We haven't needs about bundle creation. isn't a front-end application :)

ok, then you plan to execute with ts-node?

No, I'll compile the source to js (with tsc) and deploy it on npm :)
It's almost done :)

ok, perfect

The project base code is ready :)
I already implemented an example to generate a Controller.

The stack is based on:

  • Inquirer
  • Commander
  • TsED DI
  • TsED decorators
  • Lerna.js (monorepo)
  • Consolidate/handlebars for template
  • Typescript

I sent you an invitation to the repo ;)
See you

The cli is available in alpha version:

npm i -g @tsed/cli@alpha

Your feedback are welcome :)

See you

Also I published the @tsed/cli-core package. This package is designed to help developer to create his own CLI with TypeScript and the Ts.ED DI framework + Plugins.

Here the readme:
https://github.com/TypedProject/tsed-cli/tree/master/packages/cli-core

CLI is now in beta. Website is available: https://cli.tsed.io/

See you :)

@Romakita
If I select "Database -> TypeORM" installation gets stuck on "Resolve versions" step.

@tsed/cli 1.6.3
node 10.19.0
yarn 1.22.4
npm 6.13.4
Ubuntu 18.04

Hello @NachtRitter
I released a fix to print an error log when Resolves versions step fail. Can you reinstall the CLI and run again the same command please :).

See you
Romain

@Romakita
Unfortunately, there is no error. Only an endless step of resolving versions.

image

Have you a network restrict or a proxy configured?

I鈥檒l try reproduce the bug by installing postgres.

You can also run the command in verbose mode. Maybe the logs will be more interesting.

tsed init . 鈥攙erbose

Are you on windows ?

@Romakita
Nevermind, I guess it was really some issue with my router. I've checked and realized that I have a big latency between my notebook and router (during packages installation it was ~300-800 ms). After router rebooting looks like it works fine.

Hoo coool xD.

Latest version add docker-compose generation, by adding service (database) according to your database choice :D

See you
Romain

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomer-amir-vonage picture tomer-amir-vonage  路  7Comments

vorph1 picture vorph1  路  6Comments

royibernthal picture royibernthal  路  4Comments

thanhchuongitc picture thanhchuongitc  路  6Comments

yangukmo picture yangukmo  路  6Comments