SproutCore Snippets and JSHint Integration
A SproutCore package for Sublime Text 2
Details
Installs
- Total 2K
- Win 2K
- Mac 544
- Linux 235
Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 |
Readme
- Source
- raw.githubusercontent.com
sublime-text-package
A SproutCore package for Sublime Text 2 and 3.
This package includes several useful SproutCore specific snippets and integration with JSHint.
To use this package you must first install jshint
and ensure that jshint
is in your environment path.
Install node-jshint using npm
$ npm install -g jshint
Install the SproutCore package using Package Control in Sublime Text
⇧⌘P
or⇧⌃P
(Linux/Windows)- select
Package Control: Install Package
- select
SproutCore
JSHint
This package runs jshint
on all JavaScript files on every save. This allows you
to catch errors early before going to the browser and testing. It also allows
you to catch potentially dangerous code like implied globals and redeclared
variables.
JSHint also enforces a very standard clean style of JavaScript, which is what the SproutCore framework adheres too. While you may initially find the style warnings to be annoying, following them is easy and in the end it makes for easily recognizable and shareable code.
As part of the JSHint integration, this package also includes a default .jshintrc file that it uses to add the SproutCore specific globals.
Snippets
There are several snippets available to significantly reduce the amount of
typing you need to do. To use a snippet, start typing the keyword and select
the appropriate snippet to insert useful predefined code. You can then use
the tab
key to jump between the configurable aspects of the snippet to
modify it very quickly without using the mouse.
SCButtonView
- An SC.ButtonView template.SCLabelView
- An SC.LabelView template.SCListView
- An SC.ListView template.SCRecord
- An SC.Record template with several attributes and aprimaryKey
.SCState
- An SC.State template with enterState and exitState.SCScrollView
- An SC.ScrollView template.SCTextFieldView
- An SC.TextFieldView template.SCView
- An SC.View template.SCView (Class)
- An SC.View as a Class template with render and update.SCBinding
- A oneWay binding.childViews
- Adds childViews property.childViewLayout
- Adds childViewLayout & childViewLayoutOptions properties.for
- A forwardfor
loop using.get('length')
&.objectAt()
for
- A reversefor
loop using.get('length')
&.objectAt()
function (observes)
- A .observes function.function (property)
- A .property function.function (cacheable)
- A .property.cacheable function.