Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a bin available #4

Closed
pocesar opened this issue May 31, 2015 · 4 comments
Closed

Make a bin available #4

pocesar opened this issue May 31, 2015 · 4 comments

Comments

@pocesar
Copy link

pocesar commented May 31, 2015

Putting it in scripts section of package.json to update the tsconfig.json (mainly interested in this because of filesGlob)

right now I'm using node.repl to do this

@MicahZoltu
Copy link
Contributor

Can you go into more detail on what you mean by, make a bin available? I'm having trouble understanding exactly what it is you are looking for with this request.

Can you show what you are doing with node.repl to achieve your goals currently?

@pocesar
Copy link
Author

pocesar commented May 31, 2015

filesGlob isn't 'natively' supported by tsc currently. tsconfig, atomscript, sublime tsscript support it. When working outside a text editor that doesn't have either of those plugins installed, the files inside tsconfig.json never gets updated.

I'm using node.repl to emulate a command line derived from tsconfig:

> var tsconfig = require('tsconfig');
undefined
> var fs = require('fs');
undefined
> fs.writeFileSync('tsconfig.json', JSON.stringify(tsconfig.getProjectSync('.').project));
undefined

by having it install to the .bin folder, I could place it in package.json as:

{
   "scripts": {
      "tsconfig": "tsconfig --save"  
   }
}

type npm tsconfig and it would update the tsconfig.json file for me

@MicahZoltu
Copy link
Contributor

While I don't believe this would be hard to do, if your only use case is for tsconfig --save then I am not sure how much work it would be worth since (hopefully) file pattern matching will be added to TSC soon: microsoft/TypeScript#3232

@blakeembrey
Copy link
Member

This module no longer expands filesGlob (as of 4.0) and includes will be an official option in 2.0. I never condoned the use filesGlob personally, but do know people relied on it. However, staying in sync with official TypeScript releases and other clients is more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants