Coder Social home page Coder Social logo

dtsm's Introduction

DTSM Circle CI

The .d.ts manager

.d.ts is TypeScript definition file. DefinitelyTyped!

Install

$ npm install -g dtsm

dtsm depends on Node.js, npm and git command. please install git client.

Usage

# fetch from remote repository
$ dtsm fetch

# search .d.ts
$ dtsm search atom
Search results.

	atom/atom.d.ts
	dojo/dojox.atom.d.ts

# install .d.ts
$ dtsm install atom
atom/atom.d.ts
q/Q.d.ts
jquery/jquery.d.ts
space-pen/space-pen.d.ts
emissary/emissary.d.ts
pathwatcher/pathwatcher.d.ts
text-buffer/text-buffer.d.ts
status-bar/status-bar.d.ts
mixto/mixto.d.ts
node/node.d.ts

$ tree typings
  typings
  ├── atom
  │   └── atom.d.ts
  ├── emissary
  │   └── emissary.d.ts
  ├── jquery
  │   └── jquery.d.ts
  ├── mixto
  │   └── mixto.d.ts
  ├── node
  │   └── node.d.ts
  ├── pathwatcher
  │   └── pathwatcher.d.ts
  ├── q
  │   └── Q.d.ts
  ├── space-pen
  │   └── space-pen.d.ts
  ├── status-bar
  │   └── status-bar.d.ts
  └── text-buffer
      └── text-buffer.d.ts

# create dtsm.json and save dependencies
$ dtsm init
write to dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/borisyankov/DefinitelyTyped.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {}
}

$ dtsm install --save atom
atom/atom.d.ts
q/Q.d.ts
jquery/jquery.d.ts
space-pen/space-pen.d.ts
emissary/emissary.d.ts
pathwatcher/pathwatcher.d.ts
text-buffer/text-buffer.d.ts
status-bar/status-bar.d.ts
mixto/mixto.d.ts
node/node.d.ts

$ cat dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/borisyankov/DefinitelyTyped.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {
    "atom/atom.d.ts": {
      "ref": "0605ebbdbdd8183c70b4a14e1e34ecb3f2b446bf"
    }
  }
}

$ rm -rf typings/

$ dtsm install
atom/atom.d.ts
q/Q.d.ts
jquery/jquery.d.ts
space-pen/space-pen.d.ts
emissary/emissary.d.ts
pathwatcher/pathwatcher.d.ts
text-buffer/text-buffer.d.ts
status-bar/status-bar.d.ts
mixto/mixto.d.ts
node/node.d.ts

$ ls -la | grep typings
  drwxr-xr-x   12 vvakame  staff   408 10  6 17:36 typings

$ dtsm update --save
atom/atom.d.ts
q/Q.d.ts
jquery/jquery.d.ts
space-pen/space-pen.d.ts
emissary/emissary.d.ts
pathwatcher/pathwatcher.d.ts
text-buffer/text-buffer.d.ts
status-bar/status-bar.d.ts
node/node.d.ts
mixto/mixto.d.ts

Advanced usage

reference other repository

# search for another repository
$ dtsm --remote https://github.com/vvakame/gapidts.git search bigquery
Search results.

	test/valid/bigquery-v2-browser.d.ts
	test/valid/bigquery-v2-nodejs.d.ts

example

reference mixed repository

$ cat dtsm.json
{
  "repos": [
    {
      "url": "https://github.com/borisyankov/DefinitelyTyped.git",
      "ref": "master"
    },
    {
      "url": "https://github.com/vvakame/gapidts.git",
      "ref": "master"
    }
  ],
  "path": "typings",
  "bundle": "typings/bundle.d.ts",
  "dependencies": {
    "jquery/jquery.d.ts": {
      "ref": "0605ebbdbdd8183c70b4a14e1e34ecb3f2b446bf"
    },
    "gapidts/bigquery-v2-browser.d.ts": {
      "repo": "https://github.com/vvakame/gapidts.git",
      "ref": "4edbcca555936a931407d667f8687f175ecbd5ed",
      "path": "test/valid/bigquery-v2-browser.d.ts"
    }
  }
}
$ dtsm install
jquery/jquery.d.ts
gapi/bigquery-v2-browser.d.ts
gapi/googleapis-browser-common.d.ts

example

Install with interactive filtering

If you use peco, you can install .d.ts file interactive.

$ dtsm search -i
$ dtsm install -i

dtsm install -i

Change log

See CHANGELOG

Contributing

This package's author vvakame is not native english speaker. My first language is Japanese. If you are native english speaker. I wish received a pull request for document and anything.

TODO

  • write document
  • list sub-command
  • create pull request
    • generate self check todo list
  • Windows support

dtsm's People

Contributors

vvakame avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.