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

Support ts file #76

Open
halink0803 opened this issue Feb 10, 2017 · 5 comments
Open

Support ts file #76

halink0803 opened this issue Feb 10, 2017 · 5 comments

Comments

@halink0803
Copy link

I am working with typescript and file header seems do not work with ts file? Can you guys add file header to support ts file or tell me how can I add it by myself?

@shiyanhui
Copy link
Owner

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

@halink0803
Copy link
Author

I tried as you said but it does not work. Are you are it's extension_equivalence ?

@justbefree
Copy link

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

It works , thanks

@justbefree
Copy link

Just add "ts": "js" to extension_equivalence in your settings. It may looks like:

"extension_equivalence": {
    "blade.php": "html",
    "ts": "js"
}

But I have a question, Why isn't work if i created a TypeScrpt.tmpl file and put it in /template/header folder? Does that mean I can not create my own template ?

@dawindd
Copy link

dawindd commented Jul 11, 2020

But I have a question, Why isn't work if i created a TypeScrpt.tmpl file and put it in /template/header folder? Does that mean I can not create my own template ?

I did it for a few custom templates, following this:

  • create a custom folder and define it in "custom_template_header_path" in your settings - afaik using the sublime-text-3/Packages/FileHeader/ folder would erase everything in case of update
  • put your "TypeScript.tmpl" there
  • set this in your settings:
	"file_suffix_mapping": {
		"ts": "TypeScript",
	},
  • remove the "ts": "js" you added earlier

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

No branches or pull requests

4 participants