Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stpettersens/dt-init
:blue_book: Like npm init but for generating TypeScript definitions and tests stubs.
https://github.com/stpettersens/dt-init
Last synced: about 1 month ago
JSON representation
:blue_book: Like npm init but for generating TypeScript definitions and tests stubs.
- Host: GitHub
- URL: https://github.com/stpettersens/dt-init
- Owner: stpettersens
- License: other
- Created: 2015-07-19T00:11:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-10T14:26:51.000Z (about 9 years ago)
- Last Synced: 2024-11-02T04:19:35.214Z (about 2 months ago)
- Language: TypeScript
- Homepage: http://npmjs.com/package/dt-init
- Size: 51.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
### dt-init
[![Build Status](https://travis-ci.org/stpettersens/dt-init.png?branch=master)](https://travis-ci.org/stpettersens/dt-init)
[![npm version](https://badge.fury.io/js/dt-init.svg)](http://npmjs.org/package/dt-init)
[![Dependency Status](https://david-dm.org/stpettersens/dt-init.png?theme=shields.io)](https://david-dm.org/stpettersens/dt-init) [![Development Dependency Status](https://david-dm.org/stpettersens/dt-init/dev-status.png?theme=shields.io)](https://david-dm.org/stpettersens/dt-init#info=devDependencies)> :blue_book: Like `npm init` but for generating TypeScript definitions and tests stubs.
Install: `npm install -g dt-init`
Usage: dt-init module-name [-b|--bower|-d|--def-only gitconfig][-h|--help|-v|--version|
-c|--configure]module-name : Module to generate stubs for.
-b | --bower : Also generate a bower.json package file for client-side dependencies.
-d | --def-only : Only generate definition and tests.
gitconfig : Git configuration file to use for user values (instead of default).
-h | --help : Display this usage information and exit.
-v | --version : Display application version and exit.
-c | --configure : Write configuration file and exit (destructive).Running `dt-init module-name -b` will generate the stubs (with *package.json* and *bower.json*) and retrieve the module you plan to write the definitions and tests for. This results in a directory tree such as:
module-name/
├── bower.json
├── bower_components
├── node_modules
├── module-name.d.ts
├── module-name-tests.ts
├── node_modules
└── package.jsonAfter you have finished your TypeScript definitions and tests,
within *module-name* you can invoke `npm test` to compile and run them.Install the [TypeScript compiler](http://www.typescriptlang.org) first if necessary with:
`npm install -g typescript`If you want to use the -b option, you will need to have [Bower](http://bower.io) installed:
`npm install -g bower`Specify *.gitconfig* parameter if you want to use a different Git configuration
file to the user's default. These values are used in the generated type definitions stubs.