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

Add a "name" property to tsconfig.json to allow for naming of a project #2938

Closed
paulvanbrenk opened this issue Apr 28, 2015 · 7 comments
Closed
Labels
Suggestion An idea for TypeScript

Comments

@paulvanbrenk
Copy link
Contributor

This is an editor only addition to the tsconfig.json project, which allows an IDE to show a custom name for a tsconfig.json based project.

{
    "name": "Language Service Server",
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "out": "../../built/local/tsserver.js",
        "sourceMap": true
    },
    "files": [
        "node.d.ts",
        "editorServices.ts",
        "protocol.d.ts",
        "server.ts",
        "session.ts"
    ]
}```
@paulvanbrenk paulvanbrenk added the Suggestion An idea for TypeScript label Apr 28, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Apr 28, 2015

Tsconfig is based on directory based project system ideas; the name of the directory vibrating tsconfig should be your project name; this way we are not creating a set of parallel concepts.

@niemyjski
Copy link

I think we should support this suggestion and the concept of multiple tsconfig files by default. If we continue to go down this path, it kind of enforces two ideas:

  1. Monolithic huge apps as you're telling vendors to only ever support one file in the root.
  2. Use multiple repos / folders for shared code with copy and pasting or tons of file defs in the tsconfig that get out of sync.

@mhegazy
Copy link
Contributor

mhegazy commented Apr 28, 2015

I do not really understand the issue.. why would it be hard to configure your projects to have one per project? there are already parallels to this in npm with package.json, and git repos; these seem to be working fine with users, and do not lead to such issues.

the suggestion here is to add an additional "name" field. i am arguing that it is redundant as there is only a single tsconfig file allowed in a folder, so why have two "names" if you can have one. The suggestion to have multiple tsconfig files is tracked in another issue.

@paulvanbrenk
Copy link
Contributor Author

My reasoning was that users may prefer a friendly name for their projects, since foldernames are usually short and may be artificially shortened due to max. path limitation on windows.

No strong preference either way, if others chime in I'll make the change..

@niemyjski
Copy link

@mhegazy you can have more than one per folder:#2869

@mhegazy
Copy link
Contributor

mhegazy commented Apr 28, 2015

but #2869 does not affect "project name" that would be used in an editor. with #2869, you are providing a custom tsconfig.json file, and the editors have no way of automatically picking these up. i would expect you are using some sort of .csproj in VS or a sublime project in sublime or other editor-specific project system to manage these, and in this case you can provide the name separably.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 9, 2015

Adding an additional property to tsconfig should not be an issue. I do not think there is an action item here. please reopen if this is not the case.

@mhegazy mhegazy closed this as completed Dec 9, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants