GithubHelp home page GithubHelp logo

tsconfig.json's Introduction

tsconfig.json

Video

Usage

Install as a dev dependency on a particular project:

yarn add -D tsconfig.json
npx tsconfig.json

Install globally(recommended if you are using typescript very often):

yarn global add tsconfig.json
# now you don't have to prefix this command with npx!
tsconfig.json

tsconfig.json's People

Contributors

amoshydra avatar benawad avatar bsitruk avatar developerdavi avatar divyanshu-parihar avatar fr3fou avatar harshitjoshi9152 avatar jltwheeler avatar mahieyin-rahmun avatar marcobiedermann avatar mrbeepot avatar suryadevelops avatar timthedev07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsconfig.json's Issues

adding more info/tutorial in readme

Hello!
this repo is very interesting on creating tsconfig, but is there any tutorial on using this?

or maybe @benawad has some tutorial in his youtube channel that i can create more informational README based on?

Cannot use import outside a module

For some reason this tsconfig does not allow es modules:

(node:4907) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
Waiting for the debugger to disconnect...
/home/jasterv/crud/dist/index.js:1
import app from './api/server';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1025:15)
    at Module._compile (node:internal/modules/cjs/loader:1059:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47

feat: pull tsconfig from public github repos

Hey Ben, this project would be a lot nicer if it has a feature of pulling tsconfig.json from any public GitHub repo that has it. This way everyone can use this package to create "your opinionated" and "<user> opinionated" tsconfig.

Example

npx tsconfig.json -t benawad:dogehouse/baklava/tsconfig.json
npx tsconfig.json -t 41y08h:jstube-api

Looking forward to this feature, thanks.

I am getting the following code while running the command

C:\Users\Saif\AppData\Local\npm-cache\_npx\bb22b66c4c94b5c9\node_modules\.bin\tsconfig.json

the code says:

`#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")

case uname in
CYGWIN|MINGW|MSYS) basedir=cygpath -w "$basedir";;
esac

if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../tsconfig.json/src/index.js" "$@"
else
exec node "$basedir/../tsconfig.json/src/index.js" "$@"
fi`

Tsconfig VueJs

Could you know tsconfig for VueJs? If u know, can you create one? Thank's you!

Remote reading

Hi Ben, I'm planning to change the way we read and write config files. I feel like downloading the scripts along with the files is a little bit redundant, and I am not sure if it would be a good idea to stick the files in your github repo and read it using the github api which will effectively reduce the size.

Publish request.

Hi Ben,

I was wondering if you could publish the package with all the new modifications so the people using it since then can benefit from them?

Opens Notepad, instead of running command.

When i type npx tsconfig.json and hit enter, a notepad called tsconfig.json opens containing:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  exec "$basedir/node"  "$basedir/node_modules/tsconfig.json/src/index.js" "$@"
else 
  exec node  "$basedir/node_modules/tsconfig.json/src/index.js" "$@"
fi

The shell waits while the notepad is open. The shell now contains:

C:\Users\simon>npx tsconfig.json

C:\Users\simon>

This is the case for

  • CMD
  • CMD Admin
  • PowerShell
  • Git Bash

On a Windows 10 Desktop
I don't know if this is a problem on my end.

Node versions

The tsconfig for node is not optimal if using node v14.
Could we add new configs suffixed with node version ?
And maybe we could use process.version to infer the correct config.

More information about optimal tsconfig for node v14 can be found here

I can do a PR, if you are ok with that

Running npx tsconfig.json opens a bash script (WIndows)

The ouput:

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
else 
  node  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
fi
exit $ret

Doing npx tsconfig.json creates a file, but doesn't prompt me to choose the framework I'm using

It should let me choose between react, react native or node (as per this video https://www.youtube.com/watch?v=I6ypD7qv3Z8&t=296s) but it only create a file with the following


#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
else 
  node  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
fi
exit $ret

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.