diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..aef6648 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,18 @@ +Please prefix your issue with one of the following: **[BUG]** **[PROPOSAL]** **[QUESTION]**. + +**In raising this issue, I confirm the following (please check boxes):** + +- [ ] I have read and understood the contributors guide. +- [ ] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. +- [ ] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. + +**My familiarity with the project is as follows (check one):** + +- [ ] I have never used the project. +- [ ] I have used the project briefly. +- [ ] I have used the project extensively, but have not contributed previously. +- [ ] I am an active contributor to the project. + +--- + +{issue content here} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..192c0d1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. + +**In raising this pull request, I confirm the following (please check boxes):** + +- [ ] I have read and understood the contributors guide. +- [ ] I have checked that another pull request for this purpose does not exist. +- [ ] I have considered, and confirmed that this submission will be valuable to others. +- [ ] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. +- [ ] I give this submission freely, and claim no ownership to its content. + +**My familiarity with the project is as follows (check one):** + +- [ ] I have never used the project. +- [ ] I have used the project briefly. +- [ ] I have used the project extensively, but have not contributed previously. +- [ ] I am an active contributor to the project. + +--- + +{pull request content here} diff --git a/.gitignore b/.gitignore index 86989b8..0d20b64 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -source/json_generator.pyc -source/duplicates.pyc +*.pyc diff --git a/.travis.yml b/.travis.yml index 81fc333..6b29619 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,10 @@ +sudo: true + language: python python: - "3.3" -#run tests -script: python -m unittest +# command to install dependencies +#install: "pip install -r requirements.txt" +# command to run tests +script: python tests/test.py diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index be90725..71ded4e 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -1,3 +1,3 @@ { - "word_separators": "/\\()\"‘-:,;><~!@#$%^&*|+=[]{}`~?" + "word_separators": "/\\()\"'-:,;><~!@#$%^&*|+=[]{}`~?" } diff --git a/README.md b/README.md index 8328aa2..37d5858 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,30 @@ # Front-end Project Snippets -[![Travis](https://img.shields.io/travis/brazilian-dev/sublime-front-end-snippets.svg?style=flat-square)](https://travis-ci.org/brazilian-dev/sublime-front-end-snippets) -[![issues](https://img.shields.io/github/issues/brazilian-dev/sublime-front-end-snippets.svg?style=flat-square)](https://github.com/brazilian-dev/sublime-front-end-snippets/issues) +[![licence mit](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://hemersonvianna.mit-license.org/) +[![GitHub issues](https://img.shields.io/github/issues/w3dotdev/sublime-front-end-snippets.svg)](https://github.com/w3dotdev/sublime-front-end-snippets/issues) +![GitHub Release Date](https://img.shields.io/github/release-date/w3dotdev/sublime-front-end-snippets.svg) +![GitHub top language](https://img.shields.io/github/languages/top/w3dotdev/sublime-front-end-snippets.svg) +![GitHub repo size](https://img.shields.io/github/repo-size/w3dotdev/sublime-front-end-snippets.svg) +![GitHub All Releases](https://img.shields.io/github/downloads/w3dotdev/sublime-front-end-snippets/total.svg) +[![Travis](https://img.shields.io/travis/w3dotdev/sublime-front-end-snippets.svg?style=flat-square)](https://travis-ci.org/w3dotdev/sublime-front-end-snippets) [![Package Control](https://img.shields.io/packagecontrol/dt/Front-end%20Project%20Snippets.svg?style=flat-square)](https://packagecontrol.io/packages/Front-end%20Project%20Snippets) -[![GitHub release](https://img.shields.io/github/release/brazilian-dev/sublime-front-end-snippets.svg?style=flat-square)](https://github.com/brazilian-dev/sublime-front-end-snippets/releases) -[![licence mit](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/brazilian-dev/sublime-front-end-snippets/blob/master/LICENSE.md) ![animation](https://cloud.githubusercontent.com/assets/1963897/12625364/a94decc8-c51a-11e5-8546-ca331af65982.gif) +## Translations + +* [Portuguese - Brazil](translations/pt_BR) + ## Install -If you already have the [Package Control](http://wbond.net/sublime_packages/package_control) installed , just search for ***Front-end Project Snippets***. If you have not installed in the Sublime, you can do it [here](http://wbond.net/sublime_packages/package_control/installation). +If you already have the [Package Control](http://wbond.net/sublime_packages/package_control) installed , just search for `Front-end Project Snippets`. If you have not installed in the Sublime, you can do it [here](http://wbond.net/sublime_packages/package_control/installation). You can manually download the package and place it within your `Packages` directory. It will work, but it will not be automatically updated. You can see all installed snippets in `Tools > Snippets...`, in the Sublime Text. +[Tested on windows] When the "."(dot) is used, the autocomplete disappears.. Solve this problem, just put in your user `Preferences > Settings - User`, the property `word_separators` with value without the "."(dot). You can see an example [here](Preferences.sublime-settings). + ## Snippets and prefixes/keys - [HTML - h.*](snippets/html/) @@ -82,7 +91,7 @@ You can see all installed snippets in `Tools > Snippets...`, in the Sublime Text ## Log -Check [Releases](https://github.com/brazilian-dev/sublime-front-end-snippets/releases) for detailed changelog. +Check [Releases](https://github.com/w3dotdev/sublime-front-end-snippets/releases) for detailed changelog. ## License diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/snippets.json b/snippets.json index 0d2dd2a..a103015 100644 --- a/snippets.json +++ b/snippets.json @@ -3152,7 +3152,7 @@ { "description": "r - Brazilian CNPJ", "id": 631, - "trigger": "r.bcnpj" + "trigger": "r.bcpfcnpj" }, { "description": "r - Brazilian CPF/CNPJ", diff --git a/snippets/js/libraries/react/lifecycle/README.md b/snippets/js/libraries/react/lifecycle/README.md index 33b5001..8c36f74 100644 --- a/snippets/js/libraries/react/lifecycle/README.md +++ b/snippets/js/libraries/react/lifecycle/README.md @@ -3,41 +3,57 @@ ### [jr.cdmount] componentDidMount ```javascript - +componentDidMount: function () { + // invoked once (client-only), after initial 'render' + // good for AJAX, setTimeout, setInterval +} ``` ### [jr.cdupdate] componentDidUpdate ```javascript - +componentDidUpdate: function (prevProps, prevState) { + // invoked immediately after DOM updates, not for initial 'render' +} ``` ### [jr.cwmount] componentWillMount ```javascript - +componentWillMount: function () { + // invoked once, before initial 'render' +} ``` ### [jr.cwrprops] componentWillReceiveProps ```javascript - +componentWillReceiveProps: function (nextProps) { + // invoked when component is receiving props, not for initial 'render' +} ``` ### [jr.cwunmount] componentWillUnmount ```javascript - +componentWillUnmount: function () { + // invoked immediately before a component is unmounted from the DOM +} ``` ### [jr.cwupdate] componentWillUpdate ```javascript - +componentWillUpdate: function (nextProps, nextState) { + // invoked immediately before rendering with new props or state, not for initial 'render' + // see componentWillReceiveProps if you need to call setState +} ``` ### [jr.scupdate] shouldComponentUpdate ```javascript - +shouldComponentUpdate: function (nextProps, nextState) { + // invoked before rendering with new props, not for initial 'render' +} ``` diff --git a/snippets/js/libraries/react/prop-types/README.md b/snippets/js/libraries/react/prop-types/README.md index b38482c..4c4e719 100644 --- a/snippets/js/libraries/react/prop-types/README.md +++ b/snippets/js/libraries/react/prop-types/README.md @@ -3,89 +3,152 @@ ### [jr.ptany] PropTypes.any ```javascript - +{ + requiredAny: React.PropTypes.any.isRequired +} ``` ### [jr.ptarrayof] PropTypes.arrayOf ```javascript - +{ + optionalArrayOf: React.PropTypes.arrayOf(React.PropTypes.string), + requiredArrayOf: React.PropTypes.arrayOf(React.PropTypes.string).isRequired +} ``` ### [jr.ptarray] PropTypes.array ```javascript - +{ + optionalArray: React.PropTypes.array, + requiredArray: React.PropTypes.array.isRequired +} ``` ### [jr.ptbool] PropTypes.bool ```javascript - +{ + optionalBoolean: React.PropTypes.bool, + requiredBoolean: React.PropTypes.bool.isRequired +} ``` ### [jr.ptelement] PropTypes.element ```javascript - +{ + optionalElement: React.PropTypes.element, + requiredElement: React.PropTypes.element.isRequired +} ``` ### [jr.ptfunc] PropTypes.func ```javascript - +{ + optionalFunction: React.PropTypes.func, + requiredFunction: React.PropTypes.func.isRequired +} ``` ### [jr.ptiof] PropTypes.instanceOf ```javascript - +{ + optionalClass: React.PropTypes.instanceOf(MyClass), + requiredClass: React.PropTypes.instanceOf(MyClass).isRequired +} ``` ### [jr.ptnode] PropTypes.node ```javascript - +{ + optionalNode: React.PropTypes.node, + requiredNode: React.PropTypes.node.isRequired +}; ``` ### [jr.ptnumber] PropTypes.number ```javascript - +{ + optionalNumber: React.PropTypes.number, + requiredNumber: React.PropTypes.number.isRequired +} ``` ### [jr.ptobjectof] PropTypes.objectOf ```javascript - +{ + optionalObjectOf: React.PropTypes.objectOf(React.PropTypes.string), + requiredObjectOf: React.PropTypes.objectOf(React.PropTypes.string).isRequired +} ``` ### [jr.ptobject] PropTypes.object ```javascript - +{ + optionalObject: React.PropTypes.object, + requiredObject: React.PropTypes.object.isRequired +} ``` ### [jr.ptootype] PropTypes.oneOfType ```javascript - +{ + optionalUnion: React.PropTypes.oneOfType([ + React.PropTypes.bool, + React.PropTypes.string + ]), + + requiredUnion: React.PropTypes.oneOfType([ + React.PropTypes.bool, + React.PropTypes.string + ]).isRequired, +} ``` ### [jr.ptoneof] PropTypes.oneOf ```javascript - +{ + optionalEnum: React.PropTypes.oneOf(['Thing 1', 'Thing 2']), + optionalEnum: React.PropTypes.oneOf(['Thing 1', 'Thing 2']).isRequired +} ``` ### [jr.ptshape] PropTypes.shape ```javascript - +{ + optionalObjectWithShape: React.PropTypes.shape({ + age: React.PropTypes.number, + name: React.PropTypes.string + }), + + requiredObjectWithShape: React.PropTypes.shape({ + age: React.PropTypes.number, + name: React.PropTypes.string + }).isRequired, + + requiredObjectWithRequiredShape: React.PropTypes.shape({ + age: React.PropTypes.number.isRequired, + name: React.PropTypes.string.isRequired + }).isRequired, +} ``` ### [jr.ptstring] PropTypes.string ```javascript - +{ + optionalString: React.PropTypes.string, + requiredString: React.PropTypes.string.isRequired +} ``` diff --git a/snippets/js/libraries/react/spec/README.md b/snippets/js/libraries/react/spec/README.md index 0f29d28..802f6a6 100644 --- a/snippets/js/libraries/react/spec/README.md +++ b/snippets/js/libraries/react/spec/README.md @@ -3,41 +3,53 @@ ### [jr.dname] displayName ```javascript - +displayName: "MyComponent" ``` ### [jr.gdprops] getDefaultProps ```javascript - +getDefaultProps: function () { + return ${1:\{ key: value \}}; +} ``` ### [jr.gistate] getInitialState ```javascript - +getInitialState: function () { + return ${1:\{ key: value \}}; +} ``` ### [jr.mixins] mixins ```javascript - +mixins: [ AMixinObject, AnotherMixinObject ]; ``` ### [jr.ptypes] propTypes ```javascript - +propTypes: { + myProp: React.PropTypes.bool +} ``` ### [jr.srender] render ```javascript - +render: function () { + return ${1}; +} ``` ### [jr.statics] statics ```javascript - +statics: { + customMethod: function(foo) { + return foo === 'bar'; + } +} ``` diff --git a/snippets/js/patterns/design-patterns/README.md b/snippets/js/patterns/design-patterns/README.md index e76acdd..0e8df75 100644 --- a/snippets/js/patterns/design-patterns/README.md +++ b/snippets/js/patterns/design-patterns/README.md @@ -106,25 +106,92 @@ var ${1:MyModule} = ( function( window, undefined ) { ### [jdp.factory] Factory ```javascript +function ${1:Animal}(${2:name}) { + ${9} +} + +function ${3:Rabbit}(${2:name}) { + var ${4:rabbit} = ${1:Animal}(${2:name}) + + var ${5:parentRun} = ${4:rabbit}.${6:run} + + ${4:rabbit}.${7:jump} = function() { + ${10:alert(${2:name} + " jumped!");} + } + + ${4:rabbit}.${6:run} = function() { + ${5:parentRun}.call(this) + ${11:alert("fast");} + } + + return ${4:rabbit} +} +${4:rabbit} = ${3:Rabbit}("${8:rab}"); ``` ### [jdp.flyweight] Flyweight ```javascript +${0:'use strict';} + +var ${1:Flyweight} = function (${2:intrinisicState}) { + this.${2:intrinisicState} = ${2:intrinisicState}; +}; +${1:Flyweight}.prototype.operation = function (${4:extrinsicState}) { + ${3:// Perform some action using intrinsic and extrinsic state} + return this.${2:intrinisicState} * ${4:extrinsicState}; +}; + +module.exports = ${1:Flyweight}; ``` ### [jdp.mediator] Mediator ```javascript - +var mediator = (function(){ + var subscribe = function(channel, fn){ + if(!mediator.channels[channel]) mediator.channels[channel] = []; + mediator.channels[channel].push({ context : this, callback : fn }); + return this; + }; + var publish = function(channel){ + if(!mediator.channels[channel]) return false; + var args = Array.prototype.slice.call(arguments, 1); + for(var i = 0, l = mediator.channels[channel].length; i < l; i++){ + var subscription = mediator.channels[channel][i]; + subscription.callback.apply(subscription.context.args); + }; + return this; + }; + return { + channels : {}, + publish : publish, + subscribe : subscribe, + installTo : function(obj){ + obj.subscribe = subscribe; + obj.publish = publish; + } + }; +}());${1} ``` ### [jdp.mixin] Mixin ```javascript - +var ${1:Circle} = function() {}; +${1:Circle}.prototype = { + ${2:area}: function() { + ${3:return Math.PI * this.radius * this.radius}; + }, + ${4:grow}: function() { + ${5:this.radius++;} + }, + ${6:shrink}: function() { + ${7:this.radius--;} + } +};${8} ``` ### [jdp.module] Module @@ -144,7 +211,46 @@ var ${1:moduleName} = (function() { ### [jdp.observer] Observer ```javascript +var ${1:Publisher} = { + ${2:subscribers}: { + ${6:any}: [] + }, + + ${3:subscribe}: function(fn, type) { + + type = type || "${6:any}"; + if (typeof this.${2:subscribers}[type] === "undefined") { + this.${2:subscribers}[type] = []; + } + + this.${2:subscribers}[type].push(fn); + }, + + ${4:unsubscribe}: function(fn, type) { + if (typeof this.${2:subscribers}[type] !== undefined) { + this.${2:subscribers}[type].pull(fn); + } + }, + + ${5:publish}: function(type, obj) { + var ${2:subscribers} = this.${2:subscribers}[type]; + + for (var i = 0, max = ${2:subscribers}.length; i < max; i++) { + ${2:subscribers}[i](obj); + } + } +}; + + +${7://var paper = Object.create(${1:Publisher}); +//var joe = { +// shout : function(obj){ +// console.log("oh i got issue" + obj); +// } +//}; +//paper.${3:subscribe}(joe.shout, "new issue"); +//paper.${5:publish}("new issue", 27);} ``` ### [jdp.prototype] Prototype diff --git a/snippets/js/patterns/design-patterns/js-design-patterns-factory.sublime-snippet b/snippets/js/patterns/design-patterns/js-design-patterns-factory.sublime-snippet index 57ff6b7..7039336 100644 --- a/snippets/js/patterns/design-patterns/js-design-patterns-factory.sublime-snippet +++ b/snippets/js/patterns/design-patterns/js-design-patterns-factory.sublime-snippet @@ -1,6 +1,27 @@ jdp.factory jdp - Factory diff --git a/snippets/js/patterns/design-patterns/js-design-patterns-flyweight.sublime-snippet b/snippets/js/patterns/design-patterns/js-design-patterns-flyweight.sublime-snippet index a17880e..e34d30e 100644 --- a/snippets/js/patterns/design-patterns/js-design-patterns-flyweight.sublime-snippet +++ b/snippets/js/patterns/design-patterns/js-design-patterns-flyweight.sublime-snippet @@ -1,6 +1,17 @@ jdp.flyweight jdp - Flyweight diff --git a/snippets/js/patterns/design-patterns/js-design-patterns-mediator.sublime-snippet b/snippets/js/patterns/design-patterns/js-design-patterns-mediator.sublime-snippet index b3f71b8..d334868 100644 --- a/snippets/js/patterns/design-patterns/js-design-patterns-mediator.sublime-snippet +++ b/snippets/js/patterns/design-patterns/js-design-patterns-mediator.sublime-snippet @@ -1,6 +1,30 @@ jdp.mediator jdp - Mediator diff --git a/snippets/js/patterns/design-patterns/js-design-patterns-mixin.sublime-snippet b/snippets/js/patterns/design-patterns/js-design-patterns-mixin.sublime-snippet index a671ed0..1c78143 100644 --- a/snippets/js/patterns/design-patterns/js-design-patterns-mixin.sublime-snippet +++ b/snippets/js/patterns/design-patterns/js-design-patterns-mixin.sublime-snippet @@ -1,6 +1,17 @@ jdp.mixin jdp - Mixin diff --git a/snippets/js/patterns/design-patterns/js-design-patterns-observer.sublime-snippet b/snippets/js/patterns/design-patterns/js-design-patterns-observer.sublime-snippet index c08ea5c..820c9b2 100644 --- a/snippets/js/patterns/design-patterns/js-design-patterns-observer.sublime-snippet +++ b/snippets/js/patterns/design-patterns/js-design-patterns-observer.sublime-snippet @@ -1,6 +1,45 @@ jdp.observer jdp - Observer diff --git a/snippets/schema/README.md b/snippets/schema/README.md index 920bf9f..7b47ff6 100644 --- a/snippets/schema/README.md +++ b/snippets/schema/README.md @@ -2,6 +2,4 @@ - [JSON-LD](json-ld/) - [Microdata](microdata/) - - Action - - Organization - [RDFa](rdfa/) diff --git a/snippets/schema/json-ld/README.md b/snippets/schema/json-ld/README.md index f493592..bdeea6f 100644 --- a/snippets/schema/json-ld/README.md +++ b/snippets/schema/json-ld/README.md @@ -4,8 +4,15 @@ ## Organization -### [sj.org] Organization +### [sj.logo] Logotype ```html - + ``` diff --git a/snippets/schema/json-ld/json-ld-logotype.sublime-snippet b/snippets/schema/json-ld/json-ld-logotype.sublime-snippet new file mode 100644 index 0000000..c65f18d --- /dev/null +++ b/snippets/schema/json-ld/json-ld-logotype.sublime-snippet @@ -0,0 +1,14 @@ + + +{ + "@context": "http://schema.org", + "@type": "Organization", + "url": "${1:http://www.example.com}", + "logo": "${2:http://www.example.com/images/logo.png}" +} + +]]> + sj.logo + sj - Logotype + diff --git a/snippets/schema/rdfa/README.md b/snippets/schema/rdfa/README.md index f369f73..222ce11 100644 --- a/snippets/schema/rdfa/README.md +++ b/snippets/schema/rdfa/README.md @@ -2,10 +2,24 @@ ## Prefix `sr.*` -## Organization - -### [sr.org] Organization +### [sr.breadcrumb] Breadcrumb ```html - + ``` diff --git a/snippets/schema/rdfa/redfa-breadcrumb.sublime-snippet b/snippets/schema/rdfa/redfa-breadcrumb.sublime-snippet new file mode 100644 index 0000000..4881428 --- /dev/null +++ b/snippets/schema/rdfa/redfa-breadcrumb.sublime-snippet @@ -0,0 +1,23 @@ + + + + + ${2:Dresses} + › + + + + ${4:Real Dresses} + › + + + + ${6:Real Green Dresses} + › + + +]]> + sr.breadcrumb + sr - Breadcrumb + diff --git a/source/__init__.pyc b/source/__init__.pyc new file mode 100644 index 0000000..5203163 Binary files /dev/null and b/source/__init__.pyc differ diff --git a/source/json_generator.py b/source/json_generator.py index c9cafa8..c6c1876 100644 --- a/source/json_generator.py +++ b/source/json_generator.py @@ -11,7 +11,7 @@ def write_json(data, filename): fd.write(jsondata) fd.close() except: - print 'ERROR writing', filename + #print "ERROR writing %s"%filename pass def get_dir(path, ext): @@ -21,11 +21,12 @@ def get_dir(path, ext): matches.append(os.path.join(root, filename)) return matches -def get_json(): +def get_json(path): result = [] - for count, file in enumerate(get_dir('../snippets/', '*.sublime-snippet'), start=1): - line = open(file) - content = line.read() + for count, file in enumerate(get_dir( path, '*.sublime-snippet'), start=1): + with open(file) as line: + content = line.read() + trigger = content.split('')[1].split('')[0] description = content.split('')[1].split('')[0] @@ -34,5 +35,4 @@ def get_json(): return result -write_json(get_json(), "../snippets.json") - +# write_json(get_json('../snippets/'), "../snippets.json") diff --git a/tests/test.py b/tests/test.py index 572201c..1841095 100644 --- a/tests/test.py +++ b/tests/test.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import sys -sys.path.append('../source/') +sys.path.append('source/') from json_generator import get_json from duplicates import list_duplicates import json @@ -11,9 +11,8 @@ class TestDuplicatesMethods(unittest.TestCase): def test_duplicates(self): - json = get_json() + json = get_json('snippets/') triggers = [] - for snippet in json: trigger = snippet['trigger'] if re.search(r'z.', trigger) is None: diff --git a/translations/pt_BR/README.md b/translations/pt_BR/README.md new file mode 100644 index 0000000..b4492ee --- /dev/null +++ b/translations/pt_BR/README.md @@ -0,0 +1,95 @@ +# Front-end Project Snippets + +[![Travis](https://img.shields.io/travis/w3dotdev/sublime-front-end-snippets.svg?style=flat-square)](https://travis-ci.org/w3dotdev/sublime-front-end-snippets) +[![issues](https://img.shields.io/github/issues/w3dotdev/sublime-front-end-snippets.svg?style=flat-square)](https://github.com/w3dotdev/sublime-front-end-snippets/issues) +[![Package Control](https://img.shields.io/packagecontrol/dt/Front-end%20Project%20Snippets.svg?style=flat-square)](https://packagecontrol.io/packages/Front-end%20Project%20Snippets) +[![GitHub release](https://img.shields.io/github/release/w3dotdev/sublime-front-end-snippets.svg?style=flat-square)](https://github.com/w3dotdev/sublime-front-end-snippets/releases) +[![licence mit](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](http://hemersonvianna.mit-license.org/) + +![animation](https://cloud.githubusercontent.com/assets/1963897/12625364/a94decc8-c51a-11e5-8546-ca331af65982.gif) + +## Traduções + +* [ORIGINAL](https://github.com/w3dotdev/sublime-front-end-snippets/) + +## Instalação + +Se você já tem o [Package Control](http://wbond.net/sublime_packages/package_control) instalado, basta procurar por `Front-end Project Snippets`. Se você não tiver instalado no Sublime, você pode fazê-lo [aqui](http://wbond.net/sublime_packages/package_control/installation). + +Você pode baixar manualmente o pacote e colocá-lo dentro do seu diretório `Packages`. Ele vai funcionar, mas ele não será atualizado automaticamente. + +Você pode ver os snippets instalados em `Tools > Snippets...`, no Sublime Text. + +[Testado no windows] Quando o "."(ponto) é utilizado, o autocomplete desaparece. Para resolver esse problema, basta colocar em seu usuário `Preferences > Settings - User`, a propriedade `word_separators` com o valor sem "."(ponto). Você pode ver um exemplo [aqui](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/Preferences.sublime-settings). + +## Snippets e prefixos/chaves + +- [HTML - h.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/html/) + - [Microdata - hm.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/html/schema/microdata) + - [WAI-ARIA - hw.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/html/wai-aria) +- [CSS - c.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/css/) +- [JavaScript - j.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/vanilla) + - [EcmaScript 2015 - je.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/es6/) + - [Libraries](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/libraries) + - [jQuery - jq.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/libraries/jquery) + - [React - jr.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/libraries/react) + - [Patterns](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/patterns) + - [Design Patterns - jdp.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/patterns/design-patterns) + - [UMD - jumd.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/patterns/umd) + - [Tests](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests) + - [Common - t.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/common) + - [Chai - tc.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/chai) + - [Jasmine - tj.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/jasmine) + - [Mocha - tm.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/mocha) + - [Node - tn.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/node) + - [QUnit - tq.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/qunit) + - [Sinon - ts.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/js/tests/sinon) +- [Regex](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/regex/) +- [Schema.org](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/schema) + - [JSON-LD - sj.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/schema/json-ld) + - [Microdata - sm.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/schema/microdata) + - [RDFa - sr.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/schema/rdfa) +- [External - e.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/external/) +- [Comment](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/comment/) + - [HTML - hc.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/comment/html) + - [CSS - cc.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/comment/css) + - [JavaScript - jc.*](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/comment/js) +- [Structure data](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/structured-data) (***examples***) + - [Microdata - z.microdata](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/structured-data/microdata) + - [JSON-LD - z.jsonld](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/structured-data/json-ld) + - [RDFa - z.rdfa](https://github.com/w3dotdev/sublime-front-end-snippets/blob/master/snippets/structured-data/rdfa) + +## Referências + +* [@caiogondim](https://github.com/caiogondim) (Caio Gondim) + [https://github.com/caiogondim/js-patterns-sublime-snippets](https://github.com/caiogondim/js-patterns-sublime-snippets) +* [@zenorocha](https://github.com/zenorocha) (Zeno Rocha) + [https://github.com/zenorocha/sublime-javascript-snippets](https://github.com/zenorocha/sublime-javascript-snippets) +* [@joshnh](https://github.com/joshnh) (Joshua Hibbert) + [https://github.com/joshnh/CSS-Snippets](https://github.com/joshnh/CSS-Snippets) +* (Schema.org) [http://schema.org/](http://schema.org/) +* (jQuery) [https://api.jquery.com/](https://api.jquery.com/) +* (jQuery Boilerplate)[https://jqueryboilerplate.com/](https://jqueryboilerplate.com/) +* (JSDuck) [https://github.com/senchalabs/jsduck](https://github.com/senchalabs/jsduck) +* (idiomatic CSS) [https://github.com/necolas/idiomatic-css](https://github.com/necolas/idiomatic-css) +* (JS Design Patterns) [https://addyosmani.com/resources/essentialjsdesignpatterns/book/](https://addyosmani.com/resources/essentialjsdesignpatterns/book/) +* (Node.js Assert) [https://nodejs.org/api/assert.html](https://nodejs.org/api/assert.html) +* (Jasmine) [http://jasmine.github.io/2.0/introduction.html](http://jasmine.github.io/2.0/introduction.html) +* (ReactJS cheatsheet) [http://reactcheatsheet.com/](http://reactcheatsheet.com/) +* (ES6 Features) [https://github.com/lukehoban/es6features#readme](https://github.com/lukehoban/es6features#readme) + +## Contribuindo + +- Faça o fork! +- Crie a sua branch feature: `git checkout -b my-new-feature` +- Faça o commit das suas alterações: `git commit -m 'Add some feature'` +- Faça o push para o servidor: `git push origin my-new-feature` +- E realize o pull request + +## Log + +Verifique os [Releases](https://github.com/w3dotdev/sublime-front-end-snippets/releases) ver detalhado o log de alterações. + +## Licença + +[MIT license](http://hemersonvianna.mit-license.org/) © Hemerson Vianna