I Wrote a Book!

I wrote a book. To call it a passion project would be an egregious understatement. It’s unlike anything I’ve ever made, and I’m extremely proud of it. If you follow me on Medium, you’ve probably…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Background

Since TypeScript 2.2, developers have been able to write language service plugins to enrich the TypeScript development experience. However, as smooth as these plugins might make development, the same did not extend to the plugin installation process.

There are a few excellent TypeScript plugins out there, each of which fine-tunes your editor to add support for some specific tools. Most of the current plugins seem to fall into the “embedded language” category, like:

TypeScript Plugins have a lot of potential, but currently, there seems to be only a handful of projects which take advantage of this powerful tool.

My hope is that ts-plugin can help change that, by allowing developers to manage their TypeScript plugins as easily as they manage project dependencies with NPM.

That’s all there is to it!

In the background, ts-plugin will figure out which Node package you’re trying to install, install it as a devDependency, and add it to the plugins section of your tsconfig.json or jsconfig.json file.

One of the cool things about ts-plugin is that it automatically matches a plugin name, like styled or graphql, to the correct package on NPM, in this case typescript-styled-plugin or ts-graphql-plugin.

How does that work? Given a name, styled, it will check the NPM registry for the existence of typescript-plugin-styled | typescript-styled-plugin | ts-plugin-styled | ts-styled-plugin.

It’s just as easy as you’d expect. This command will uninstall the Node package and remove it from the plugins section of your config file.

Add a comment

Related posts:

An Open Letter to Elon Musk

I am aware that you receive literally thousands of ideas daily, from would-be entrepreneurs, scientists, budding investors, soothsayers — whatever. You no doubt have heard that GM announced a few…

234. Perspectiva y sobremesa

Entiendo perfectamente a quien piensa que hacer sobremesa es una pérdida de tiempo porque realmente es cuestión de perspectiva. Al final el tiempo se va de las manos hagamos lo que hagamos, si…

Iterating on Design

There were a couple of goals we’d set for this week. The first one was coming to a decision on building out the new maps that were needed to test out the gameplay changes. The other goal was trying…