Last active
December 25, 2015 17:59
-
-
Save cam-stitt/7017466 to your computer and use it in GitHub Desktop.
Sublime Text snippet for coffee script flight component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
expect(${1}).${2:toEqual}(${3}); | |
]]></content> | |
<tabTrigger>exp</tabTrigger> | |
<scope>source.js</scope> | |
<description>jasmine expectation</description> | |
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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