Skip to content

Commit 2964caa

Browse files
committed
init for test
1 parent 2665135 commit 2964caa

File tree

8 files changed

+122
-2
lines changed

8 files changed

+122
-2
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
insert_final_newline = false
9+
indent_style = tab
10+
indent_size = 4
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: node_js
2+
node_js:
3+
- 0.10

Gruntfile.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
bump: {
4+
options: {
5+
files: ['package.json'],
6+
commit: true,
7+
commitMessage: 'Release v%VERSION%',
8+
commitFiles: ['package.json'],
9+
createTag: true,
10+
tagName: '%VERSION%',
11+
tagMessage: '',
12+
push: true,
13+
pushTo: 'origin'
14+
}
15+
},
16+
17+
lintspaces: {
18+
all: {
19+
src: ['*'],
20+
options: {
21+
editorconfig: '.editorconfig'
22+
}
23+
}
24+
}
25+
});
26+
27+
grunt.loadNpmTasks('grunt-bump');
28+
grunt.loadNpmTasks('grunt-lintspaces');
29+
30+
grunt.registerTask('default', ['lintspaces']);
31+
};

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# sublime-js-snippets
2-
a plugin of sublime text with javascript snippets
1+
# 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)
2+
3+
## Install
4+
5+
To install through [Package Control](http://wbond.net/sublime_packages/package_control),
6+
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).
7+
It's pure awesomeness.
8+
9+
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.
10+
11+
## Console
12+
13+
### [cd] console.dir
14+
15+
```javascript
16+
console.dir(${1:obj});
17+
```
18+
19+
## MISC
20+
21+
### [mi] new Image
22+
23+
```javascript
24+
new Image().src = '/${1}';
25+
```
26+
27+
## Contributing
28+
29+
1. Fork it!
30+
2. Create your feature branch: `git checkout -b my-new-feature`
31+
3. Commit your changes: `git commit -m 'Add some feature'`
32+
4. Push to the branch: `git push origin my-new-feature`
33+
5. Submit a pull request :D
34+
35+
## History
36+
37+
Check [Releases](https://github.com/imweb/sublime-js-snippets/releases) for detailed changelog.
38+

console-log.sublime-snippet

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<snippet>
2+
<content><![CDATA[
3+
console.log(${1:obj});
4+
]]></content>
5+
<tabTrigger>cl</tabTrigger>
6+
<scope>source.js</scope>
7+
<description>console.log</description>
8+
</snippet>

misc-new-image.sublime-snippet

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<snippet>
2+
<!-- Example: Hello, ${1:this} is a ${2:snippet}. -->
3+
<content><![CDATA[
4+
new Image().src = '/${1}';
5+
]]></content>
6+
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
7+
<tabTrigger>mi</tabTrigger>
8+
<description>new Image().src</description>
9+
<!-- Optional: Set a scope to limit where the snippet will trigger -->
10+
<scope>source.js, meta.class.instance.constructor, keyword.operator.new.js</scope>
11+
</snippet>

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "sublime-js-snippets",
3+
"version": "0.0.1",
4+
"repository": {
5+
"type": "git",
6+
"url": "https://github.com/imweb/sublime-js-snippets.git"
7+
},
8+
"devDependencies": {
9+
"grunt": "0.4.2",
10+
"grunt-bump": "0.0.13",
11+
"grunt-cli": "0.1.11",
12+
"grunt-lintspaces": "0.3.1"
13+
},
14+
"scripts": {
15+
"test": "grunt"
16+
}
17+
}

0 commit comments

Comments
 (0)