Skip to content

Commit

Permalink
init for test
Browse files Browse the repository at this point in the history
  • Loading branch information
longyiyiyu committed Oct 10, 2015
1 parent 2665135 commit 2964caa
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: node_js
node_js:
- 0.10
31 changes: 31 additions & 0 deletions Gruntfile.js
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']);
};
40 changes: 38 additions & 2 deletions README.md
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.

8 changes: 8 additions & 0 deletions console-log.sublime-snippet
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>
11 changes: 11 additions & 0 deletions misc-new-image.sublime-snippet
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>
17 changes: 17 additions & 0 deletions package.json
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"
}
}

0 comments on commit 2964caa

Please sign in to comment.