1

I'd like to create a very simple TypeScript package into Package Control for Sublime Text 2

I've never developed a Sublime Text extension / plugin, but all I want is to package 2 existing files

  • TypeScript syntax highlighting file typescript.tmlanguage (from here)
  • TypeScript build system typescript.sublime-build (thanks to this answer)

The first step according to the docs is

Host your plugin in its own repository on GitHub or BitBucket.
Only include a single plugin, and have the plugin files in the root of the repo.

Do I need to create a plugin? Is there a simple basic one I can fork? (found many complex ones)

Edit:

Found this one https://github.com/danro/LESS-sublime

And created this one per the example https://github.com/eranation/sublime-text-2-typescript

That's all? should I get rid of the folder?

Community
  • 1
  • 1
Eran Medan
  • 44,555
  • 61
  • 184
  • 276
  • I've described the steps you need to follow here: http://stackoverflow.com/questions/12779631/how-to-configure-a-sublime-build-system-for-typescript/12781051#12781051 and here: http://stackoverflow.com/questions/12799237/how-to-watch-and-compile-all-typescript-sources/12800090#12800090 – Endre Simo Oct 16 '12 at 05:18
  • @esimov yes, I'm basing my package on your work (by the way I have issues with the regex on windows, compile error messages are not parsed correctly, but this is another topic) but my question here is how to create a text mate 2 "Package Control" package for it (http://wbond.net/sublime_packages/package_control) which will allow easy installation of both syntax and build system... – Eran Medan Oct 16 '12 at 15:32
  • Appreciate the effort Eran I hope they include it soon. Cloning it manually seems to work just fine. – George Mauer Nov 04 '12 at 14:55

2 Answers2

2

As I understand it (I am about to go through this process for the first time myself) your folder is the package, and it is what is added to the package control.

Packages can have many different things inside them, build settings, plugins, code snippets, keyboard shortcuts, etc...

So yes, just your two files inside the folder should be all you need.

speg
  • 1,959
  • 6
  • 24
  • 34
1

I have not tested your package to see if it works. But what you need to do now is:

  1. a "fork" of sublime package_control_channel repository on this link

  2. change the repositories.json file according to the specification and this on Step 12

  3. Make a pull request to Sublime Text 2 package_control_channel repository

If your pull request is accepted it will become part of the official repository of Sublime Text 2.

Fenton
  • 241,084
  • 71
  • 387
  • 401
Diullei
  • 11,420
  • 2
  • 27
  • 31
  • Thank you, I am aware of these steps, but I'm looking for "step 0", how does my package need to be constructed, is it just a folder with the build and language highlight files? – Eran Medan Oct 16 '12 at 15:34
  • I'll need to test to give you a definitive answer. However I think your design is correct. – Diullei Oct 16 '12 at 15:42
  • For me it worked perfectly. I saved typescript on folder `C:\Users\[my user]\AppData\Roaming\Sublime Text 2\Packages` in my pc and i restarted my Sublime. Very nice plugin! :) – Diullei Oct 16 '12 at 20:43