Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schult committed May 15, 2014
0 parents commit a8f4e97
Show file tree
Hide file tree
Showing 12 changed files with 393 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
dist
15 changes: 15 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"expr": true,
"immed": true,
"noarg": true,
"onevar": true,
"quotmark": "double",
"smarttabs": true,
"trailing": true,
"unused": true,
"node": true
}
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.8
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contributing

Before sending a pull request remember to follow [jQuery Core Style Guide](http://contribute.jquery.org/style-guide/js/).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Make your changes on the `src` folder, never on the `dist` folder.
4. Commit your changes: `git commit -m 'Add some feature'`
5. Push to the branch: `git push origin my-new-feature`
6. Submit a pull request :D

#### Have you created a plugin from our boilerplate?

[Let us know!](https://github.com/jquery-boilerplate/boilerplate/wiki/Sites) It’s interesting to see what features others have come up with.
59 changes: 59 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module.exports = function(grunt) {

grunt.initConfig({

// Import package manifest
pkg: grunt.file.readJSON("boilerplate.jquery.json"),

// Banner definitions
meta: {
banner: "/*\n" +
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" +
" * <%= pkg.description %>\n" +
" * <%= pkg.homepage %>\n" +
" *\n" +
" * Made by <%= pkg.author.name %>\n" +
" * Under <%= pkg.licenses[0].type %> License\n" +
" */\n"
},

// Concat definitions
concat: {
dist: {
src: ["src/jquery.countdown360.js"],
dest: "dist/jquery.countdown360.js"
},
options: {
banner: "<%= meta.banner %>"
}
},

// Lint definitions
jshint: {
files: ["src/jquery.countdown360.js"],
options: {
jshintrc: ".jshintrc"
}
},

// Minify definitions
uglify: {
my_target: {
src: ["dist/jquery.countdown360.js"],
dest: "dist/jquery.countdown360.min.js"
},
options: {
banner: "<%= meta.banner %>"
}
}

});

grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");

grunt.registerTask("default", ["jshint", "concat", "uglify"]);
grunt.registerTask("travis", ["jshint"]);

};
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# jQuery countdown360

### A simple countdown timer in seconds

This plugin provides a simple circular countdown timer with customizable settings.

## Usage

1. Include jQuery:

```html
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
```

2. Include plugin's code:

```html
<script src="dist/jquery.countdown360.min.js"></script>
```

3. Include the plugin container in your HTML:

```html
<div id="countdown"></div>
```

3. Call the plugin:

```javascript
$("#countdown").countdown360({
radius : 60.5,
seconds : 5,
strokeWidth : 15,
fillColor : '#0276FD',
strokeColor : '#003F87',
fontSize : 50,
fontColor : '#FFFFFF',
autostart: false,
onComplete : function () { console.log('completed') }
}).start()
```

## License

[MIT License](http://johnschult.mit-license.org/) © John Schult
39 changes: 39 additions & 0 deletions boilerplate.jquery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "jquery.countdown360",
"title": "jQuery countdown360",
"description": "A simple circular countdown timer in seconds",
"keywords": [
"jquery",
"plugin",
"countdown",
"timer",
"circular",
"jquery-plugin"
],
"version": "0.1",
"author": {
"name": "John Schult",
"email": "john@schult.us",
"url": "https://github.com/johnschult"
},
"maintainers": [
{
"name": "John Schult",
"email": "john@schult.us",
"url": "https://github.com/johnschult"
}
],
"licenses": [
{
"type": "MIT",
"url": "http://johnschult.mit-license.org/"
}
],
"bugs": "https://github.com/johnschult/jquery.countdown360/issues",
"homepage": "https://github.com/johnschult/jquery.countdown360",
"docs": "https://github.com/johnschult/jquery.countdown360#readme",
"download": "https://github.com/johnschult/jquery.countdown360/archive/master.zip",
"dependencies": {
"jquery": ">=1.4"
}
}
19 changes: 19 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "jquery.countdown360",
"version": "0.1",
"homepage": "http://jqueryboilerplate.com",
"authors": [
"John Schult <john@schult.us>"
],
"description": "A simple circular countdown timer in seconds",
"main": "src/jquery.countdown360.js",
"keywords": [
"jquery",
"plugin",
"countdown",
"timer",
"circular",
"jquery-plugin"
],
"license": "MIT"
}
31 changes: 31 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>countdown360</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script src="../src/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>
<div id="container">
<div id="countdown"></div>
<script type="text/javascript" charset="utf-8">
$("#countdown").countdown360({
radius : 60.5,
seconds : 5,
strokeWidth : 15,
fillColor : '#0276FD',
strokeColor : '#003F87',
fontSize : 50,
fontColor : '#FFFFFF',
autostart : false,
onComplete : function () { console.log('done') }
}).start()
</script>
</div>
</body>
</html>

13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"private": true,
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.13",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.3.2"
},
"scripts": {
"test": "grunt travis --verbose"
}
}
Loading

0 comments on commit a8f4e97

Please sign in to comment.