The last piece of the code is to perform the packaging. TextMate exposes some essential properties to us which are accessible with Python's os library: TEXTMATE XML BUNDLE ARCHIVEFor example, if you are using CodeKit in your project, you may want to exclude CodeKit's settings files codekit-config.json and config.rbīefore we can archive any of the project files, we first need to know where our TextMate project is located. You can extend these arrays to tailor it to your own needs. On the other hand, the includedFiles array forces the inclusion of English (US) only language files. We've included language files here since while testing your project, you might have created multiple language files that you don't want to be included in your final package. The excludedFiles array specifies not to include hidden files, Photoshop assets, and language files from our package. TEXTMATE XML BUNDLE ZIPWe need a way to specify which types of files should and should not be included in our output zip file.ĮxcludedFiles = The main function of our command is output a clean package our project. Our code will be in Python, so we need to put this as the first line of our code: Remove that code and let's start writing our own.įirst off, we need to specify what interpreter to use for our code. #!/System/Library/Frameworks/amework/Versions/1.8/usr/bin/ruby -wKU Since the command is new, TextMate was kind enough to put in some sample hello world code for us: On the bottom pane of the window is the code which will be executed when our command is triggered. In the Edit Bundle window, click on the command which we have just created. The version I'm using is 2.0-alpha.9503, the screenshots here might differ from your screen, but the contents should be the same.Īs of the moment, we have a new Bundle with a command which does nothing yet. With your Bundle selected, head again to the menu bar, then create a new file ( File > New) but this time select Command:Ĭhange the name of your "untitled" command into something more descriptive like "Package WP Project". With the Bundle window open and currently in your view, create a new file from the menu bar ( File > New) then select to create a new Bundle:īy default your Bundle is going to be named "YourUserName's Bundle", you can change that on the right pane of the Edit Bundle window. A window should pop up with that looks like this: Open the Bundle editor from TextMate's menu bar ( Bundles > Edit Bundles.).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |