-
Notifications
You must be signed in to change notification settings - Fork 88
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
Showing
22 changed files
with
222 additions
and
2,124 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,9 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false |
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,51 @@ | ||
{ | ||
"predef" : [ | ||
"jQuery" | ||
], | ||
|
||
"bitwise": false, | ||
"camelcase": false, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"forin": false, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nonew": false, | ||
"plusplus": false, | ||
"quotmark": false, | ||
"regexp": false, | ||
"undef": true, | ||
"unused": true, | ||
"strict": true, | ||
"trailing": true, | ||
|
||
"asi": false, | ||
"boss": false, | ||
"debug": false, | ||
"eqnull": true, | ||
"es5": false, | ||
"esnext": false, | ||
"evil": false, | ||
"expr": false, | ||
"funcscope": false, | ||
"globalstrict": false, | ||
"iterator": false, | ||
"lastsemic": false, | ||
"laxbreak": false, | ||
"laxcomma": true, | ||
"loopfunc": false, | ||
"multistr": false, | ||
"onecase": true, | ||
"proto": false, | ||
"regexdash": false, | ||
"scripturl": false, | ||
"smarttabs": true, | ||
"shadow": false, | ||
"sub": false, | ||
"supernew": false, | ||
|
||
"browser": 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,33 @@ | ||
## Submitting an issue | ||
|
||
When reporting a bug, please describe it thoroughly, with attached code showcasing how are you using the library. The | ||
best way how to make it easy for developers, and ensure that your issue will be looked at, is to replicate it on | ||
[jsfiddle](http://jsfiddle.net/) or a similar service. | ||
|
||
## Contributions | ||
|
||
Contributions are welcome! But please, follow these few simple rules: | ||
|
||
**Maintain the coding style** used throughout the project, and defined in the `.editorconfig` file. You can use the | ||
[Editorconfig](http://editorconfig.org) plugin for your editor of choice: | ||
|
||
- [Sublime Text 2](https://github.com/sindresorhus/editorconfig-sublime) | ||
- [Textmate](https://github.com/Mr0grog/editorconfig-textmate) | ||
- [Notepad++](https://github.com/editorconfig/editorconfig-notepad-plus-plus) | ||
- [Emacs](https://github.com/editorconfig/editorconfig-emacs) | ||
- [Vim](https://github.com/editorconfig/editorconfig-vim) | ||
- [Visual Studio](https://github.com/editorconfig/editorconfig-visualstudio) | ||
- [... other editors](http://editorconfig.org/#download) | ||
|
||
--- | ||
|
||
**Code has to pass JSHint** with options defined in the `.jshintrc` file. You can use `grunt jshint` task to lint | ||
manually, or again, there are amazing plugins for a lot of popular editors consuming this file and linting as you code: | ||
|
||
- [Sublim Text 2](https://github.com/SublimeLinter/SublimeLinter) | ||
- [TextMate](http://rondevera.github.com/jslintmate/), or [alternative](http://fgnass.posterous.com/jslint-in-textmate) | ||
- [Notepad++](http://sourceforge.net/projects/jslintnpp/) | ||
- [Emacs](https://github.com/daleharvey/jshint-mode) | ||
- [Vim](https://github.com/walm/jshint.vim) | ||
- [Visual Studio](https://github.com/jamietre/SharpLinter), or [alternative](http://jslint4vs2010.codeplex.com/) | ||
- [... other editors](http://www.jshint.com/platforms/) |
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,115 @@ | ||
/*jshint node:true */ | ||
module.exports = function(grunt) { | ||
'use strict'; | ||
|
||
// Override environment based line endings enforced by Grunt | ||
grunt.util.linefeed = '\n'; | ||
|
||
// Grunt configuration | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('component.json'), | ||
meta: { | ||
banner: '/*!\n' + | ||
' * <%= pkg.name %> <%= pkg.version %> - <%= grunt.template.today("dS mmm yyyy") %>\n' + | ||
' * <%= pkg.homepage %>\n' + | ||
' *\n' + | ||
' * Licensed under the <%= pkg.licenses[0].type %> license.\n' + | ||
' * <%= pkg.licenses[0].url %>\n' + | ||
' */\n', | ||
bannerLight: '/*! <%= pkg.name %> <%= pkg.version %>' + | ||
' - <%= grunt.template.today("dS mmm yyyy") %> | <%= pkg.homepage %> */' | ||
}, | ||
|
||
// JSHint the code. | ||
jshint: { | ||
options: { | ||
jshintrc: '.jshintrc' | ||
}, | ||
all: ['src/*.js'] | ||
}, | ||
|
||
// Clean folders. | ||
clean: { | ||
dist: ['dist/**', '!dist'] | ||
}, | ||
|
||
// Concatenate files. | ||
concat: { | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
}, | ||
vanilla: { | ||
src: 'src/<%= pkg.name %>.js', | ||
dest: 'dist/<%= pkg.name %>.js' | ||
}, | ||
jquery: { | ||
src: ['src/<%= pkg.name %>.js', 'src/jquery.js'], | ||
dest: 'dist/jquery.<%= pkg.name %>.js' | ||
} | ||
}, | ||
|
||
// Minify with Google Closure Compiler. | ||
gcc: { | ||
options: { | ||
banner: '<%= meta.bannerLight %>' | ||
}, | ||
vanilla: { | ||
src: 'src/<%= pkg.name %>.js', | ||
dest: 'dist/<%= pkg.name %>.min.js' | ||
}, | ||
jquery: { | ||
src: ['src/<%= pkg.name %>.js', 'src/jquery.js'], | ||
dest: 'dist/jquery.<%= pkg.name %>.min.js' | ||
} | ||
}, | ||
|
||
// Compress files. | ||
compress: { | ||
options: { | ||
mode: 'gzip' | ||
}, | ||
vanilla: { | ||
src: 'dist/<%= pkg.name %>.min.js', | ||
dest: 'dist/<%= pkg.name %>.min.js.gz' | ||
}, | ||
jquery: { | ||
src: 'dist/<%= pkg.name %>.jquery.min.js', | ||
dest: 'dist/<%= pkg.name %>.jquery.min.js.gz' | ||
} | ||
}, | ||
|
||
// Bump up fields in JSON files. | ||
bumpup: ['component.json', '<%= pkg.name %>.jquery.json'], | ||
|
||
// Commit changes and tag the latest commit with a version from JSON file. | ||
tagrelease: ['component.json'] | ||
}); | ||
|
||
// These plugins provide necessary tasks. | ||
grunt.loadNpmTasks('grunt-contrib-compress'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-tagrelease'); | ||
grunt.loadNpmTasks('grunt-bumpup'); | ||
grunt.loadNpmTasks('grunt-gcc'); | ||
|
||
// Build task. | ||
grunt.registerTask('build', function () { | ||
grunt.task.run('jshint'); | ||
grunt.task.run('clean'); | ||
grunt.task.run('concat'); | ||
grunt.task.run('gcc'); | ||
}); | ||
|
||
// Release task. | ||
grunt.registerTask('release', function (type) { | ||
type = type ? type : 'patch'; | ||
grunt.task.run('build'); | ||
grunt.task.run('bumpup:' + type); | ||
grunt.task.run('tagrelease'); | ||
}); | ||
|
||
// Default task. | ||
grunt.registerTask('default', ['jshint']); | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.