@xpring-eng/ts-project-generator
v1.0.3
Published
A command line app for generating TypeScript applications at Xpring.
Downloads
1
Keywords
Readme
ts-project-generator
Node command line application for generating project boilerplate with linter settings
Guide
This application accepts the following arguments:
--type, -t Type of the project. Valid values are express and lib [string] [required]
--name, -n Name of the project [string] [required]
--package, -p Name of the package for the npm repository, typically '@org/package-name' [string] [required]
--github, -g Name of the github location, typically 'org/repo-name' [string] [required]
Artifacts
Basic library
The generated project includes an empty index.ts
file in the src
directory, as well as the linter settings used by the Xpring organization. The package.json
file is prepopulated with github and NPM information.
express
The generated project will have what's included in the basic library, as well as the express
dependency in its package.json
file and a functional basic server written in the src/index.ts
file.
To start the example server, run npm start dev
which will build, lint, and run the server on the default port of 8000
.
Examples
To generate an express project:
npx @xpring-eng/ts-project-generator -t express -n my-app -p @my-npm-org/my-app -g my-github-org/my-app
To generate an basic library project:
npx @xpring-eng/ts-project-generator -t library -n my-app -p @my-npm-org/my-app -g my-github-org/my-app