Skip to content

Instantly share code, notes, and snippets.

@cam-stitt
Last active December 25, 2015 17:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cam-stitt/7017466 to your computer and use it in GitHub Desktop.
Save cam-stitt/7017466 to your computer and use it in GitHub Desktop.
Sublime Text snippet for coffee script flight component
<snippet>
<content><![CDATA[
define(function(require) {
var defineComponent = require('flight/lib/component');
return defineComponent(${1});
function ${1}() {
this.defaultAttrs({
});
this.after('initialize', function() {
});
}
});
]]></content>
<tabTrigger>fc</tabTrigger>
<scope>source.js</scope>
<description>default flight component</description>
</snippet>
<snippet>
<content><![CDATA[
define (require) ->
defineComponent = require 'flight/lib/component'
${1} = ->
@defaultAttrs
@after 'initialize', ->
${2}
defineComponent ${1}
]]></content>
<scope>source.coffee</scope>
<description>CoffeeScript Flight Component</description>
</snippet>
<snippet>
<content><![CDATA[
'use strict';
describeComponent('${1}', function() {
beforeEach(function() {
setupComponent();
});
it('${2}', function() {
${3}
});
});
]]></content>
<tabTrigger>fct</tabTrigger>
<scope>source.js</scope>
<description>default flight component test</description>
</snippet>
<snippet>
<content><![CDATA[
expect(${1}).${2:toEqual}(${3});
]]></content>
<tabTrigger>exp</tabTrigger>
<scope>source.js</scope>
<description>jasmine expectation</description>
</snippet>
<snippet>
<content><![CDATA[
it('${1}', function() {
${2}
});
]]></content>
<tabTrigger>it</tabTrigger>
<scope>source.js</scope>
<description>jasmine it block</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment