Browse files

Initial commit

  • Loading branch information...
0 parents commit 6929a1c4449aa97156687b9ed068ed85b7336cdb @creationix committed May 5, 2010
Showing with 89 additions and 0 deletions.
  1. +35 −0 Commands/Save to CSS.tmCommand
  2. +39 −0 Syntaxes/LESS.tmLanguage
  3. +15 −0 info.plist
35 Commands/Save to CSS.tmCommand
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>saveActiveFile</string>
+ <key>command</key>
+ <string>#!/usr/bin/env node
+var sys = require('sys');
+var fs = require('fs');
+var less = require('less');
+
+var less_file = process.env.TM_FILEPATH;
+var css_file = less_file.replace(/\.less$/, ".css");
+
+var input = fs.readFileSync(less_file);
+less.render(input, function (e, css) {
+ if (e) { throw e; }
+ fs.writeFileSync(css_file, css);
+});
+</string>
+ <key>input</key>
+ <string>document</string>
+ <key>keyEquivalent</key>
+ <string>@s</string>
+ <key>name</key>
+ <string>Save to CSS</string>
+ <key>output</key>
+ <string>showAsTooltip</string>
+ <key>scope</key>
+ <string>source.css.less</string>
+ <key>uuid</key>
+ <string>78788223-5E5E-434E-98BE-17BCDF600611</string>
+</dict>
+</plist>
39 Syntaxes/LESS.tmLanguage
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>comment</key>
+ <string></string>
+ <key>fileTypes</key>
+ <array>
+ <string>less</string>
+ </array>
+ <key>foldingStartMarker</key>
+ <string>/\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))</string>
+ <key>foldingStopMarker</key>
+ <string>(?&lt;!\*)\*\*/|^\s*\}</string>
+ <key>keyEquivalent</key>
+ <string>^~L</string>
+ <key>name</key>
+ <string>LESS</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>source.css</string>
+ </dict>
+ <dict>
+ <key>begin</key>
+ <string>//</string>
+ <key>end</key>
+ <string>$\n?</string>
+ <key>name</key>
+ <string>comment.line.double-slash</string>
+ </dict>
+ </array>
+ <key>scopeName</key>
+ <string>source.css.less</string>
+ <key>uuid</key>
+ <string>9343D324-75A1-4733-A5C0-5D1D4B6182D0</string>
+</dict>
+</plist>
15 info.plist
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>LESS</string>
+ <key>ordering</key>
+ <array>
+ <string>78788223-5E5E-434E-98BE-17BCDF600611</string>
+ <string>9343D324-75A1-4733-A5C0-5D1D4B6182D0</string>
+ </array>
+ <key>uuid</key>
+ <string>5C457657-CAFA-4CA7-9FAC-36348FF7AAD2</string>
+</dict>
+</plist>

0 comments on commit 6929a1c

Please sign in to comment.