-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2665135
commit 2964caa
Showing
8 changed files
with
122 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = false | ||
indent_style = tab | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
bump: { | ||
options: { | ||
files: ['package.json'], | ||
commit: true, | ||
commitMessage: 'Release v%VERSION%', | ||
commitFiles: ['package.json'], | ||
createTag: true, | ||
tagName: '%VERSION%', | ||
tagMessage: '', | ||
push: true, | ||
pushTo: 'origin' | ||
} | ||
}, | ||
|
||
lintspaces: { | ||
all: { | ||
src: ['*'], | ||
options: { | ||
editorconfig: '.editorconfig' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-bump'); | ||
grunt.loadNpmTasks('grunt-lintspaces'); | ||
|
||
grunt.registerTask('default', ['lintspaces']); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
# sublime-js-snippets | ||
a plugin of sublime text with javascript snippets | ||
# JavaScript Snippets for Sublime [![Build Status](https://travis-ci.org/imweb/sublime-js-snippets.svg?branch=master)](https://travis-ci.org/imweb/sublime-js-snippets) | ||
|
||
## Install | ||
|
||
To install through [Package Control](http://wbond.net/sublime_packages/package_control), | ||
search for **JavaScript Snippets for IMWeb**. If you still don't have Package Control in Sublime Text, [go get it](http://wbond.net/sublime_packages/package_control/installation). | ||
It's pure awesomeness. | ||
|
||
If you prefer to install it manually, you can download the package and put it inside your `Packages` directory. It should work but will not update automatically. | ||
|
||
## Console | ||
|
||
### [cd] console.dir | ||
|
||
```javascript | ||
console.dir(${1:obj}); | ||
``` | ||
|
||
## MISC | ||
|
||
### [mi] new Image | ||
|
||
```javascript | ||
new Image().src = '/${1}'; | ||
``` | ||
|
||
## Contributing | ||
|
||
1. Fork it! | ||
2. Create your feature branch: `git checkout -b my-new-feature` | ||
3. Commit your changes: `git commit -m 'Add some feature'` | ||
4. Push to the branch: `git push origin my-new-feature` | ||
5. Submit a pull request :D | ||
|
||
## History | ||
|
||
Check [Releases](https://github.com/imweb/sublime-js-snippets/releases) for detailed changelog. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
console.log(${1:obj}); | ||
]]></content> | ||
<tabTrigger>cl</tabTrigger> | ||
<scope>source.js</scope> | ||
<description>console.log</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<snippet> | ||
<!-- Example: Hello, ${1:this} is a ${2:snippet}. --> | ||
<content><![CDATA[ | ||
new Image().src = '/${1}'; | ||
]]></content> | ||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | ||
<tabTrigger>mi</tabTrigger> | ||
<description>new Image().src</description> | ||
<!-- Optional: Set a scope to limit where the snippet will trigger --> | ||
<scope>source.js, meta.class.instance.constructor, keyword.operator.new.js</scope> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "sublime-js-snippets", | ||
"version": "0.0.1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/imweb/sublime-js-snippets.git" | ||
}, | ||
"devDependencies": { | ||
"grunt": "0.4.2", | ||
"grunt-bump": "0.0.13", | ||
"grunt-cli": "0.1.11", | ||
"grunt-lintspaces": "0.3.1" | ||
}, | ||
"scripts": { | ||
"test": "grunt" | ||
} | ||
} |