-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit 274e03c
Showing
12 changed files
with
693 additions
and
0 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,6 @@ | ||
# OS | ||
.DS_Store | ||
._* | ||
|
||
# NPM dependencies | ||
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,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 | ||
} |
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,59 @@ | ||
module.exports = function(grunt) { | ||
|
||
grunt.initConfig({ | ||
|
||
// Import package manifest | ||
pkg: grunt.file.readJSON("autotyper.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.<%= pkg.name %>.js"], | ||
dest: "dist/jquery.<%= pkg.name %>.js" | ||
}, | ||
options: { | ||
banner: "<%= meta.banner %>" | ||
} | ||
}, | ||
|
||
// Lint definitions | ||
jshint: { | ||
files: ["src/jquery.<%= pkg.name %>.js"], | ||
options: { | ||
jshintrc: ".jshintrc" | ||
} | ||
}, | ||
|
||
// Minify definitions | ||
uglify: { | ||
my_target: { | ||
src: ["dist/jquery.<%= pkg.name %>.js"], | ||
dest: "dist/jquery.<%= pkg.name %>.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"]); | ||
|
||
}; |
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,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Saul Hardman | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
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,40 @@ | ||
# Autotyper | ||
|
||
A simple JavaScript (currently jQuery) plugin to automatically type out text. | ||
|
||
## Instructions | ||
|
||
`bower install --save autotyper` | ||
|
||
```javascript | ||
$('.js-element').autotyper(); | ||
``` | ||
|
||
## Options | ||
|
||
### Text | ||
|
||
### Interval | ||
|
||
### Loop | ||
|
||
## Methods | ||
|
||
Entire API is exposed and methods can be called by passing their name to the plugin function like so:- | ||
|
||
```javascript | ||
var $element = $('.js-element').autotyper({ autoStart: false }); | ||
|
||
// somewhere later in your code... | ||
|
||
$element.autotyper('start'); | ||
``` | ||
|
||
## Events | ||
|
||
### Init | ||
### Start | ||
### Type | ||
### Stop | ||
### Loop | ||
### Destroy |
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,35 @@ | ||
{ | ||
"name": "autotyper", | ||
"title": "Autotyper", | ||
"description": "A simple JavaScript (currently jQuery) plugin to automatically type out text.", | ||
"keywords": [ | ||
"jquery", | ||
"jquery-plugin", | ||
"automatic", | ||
"auto", | ||
"typer", | ||
"autotyper" | ||
], | ||
"version": "0.1.0", | ||
"author": { | ||
"name": "Saul Hardman", | ||
"email": "[email protected]", | ||
"url": "https://github.com/saulhardman" | ||
}, | ||
"maintainers": [{ | ||
"name": "Saul Hardman", | ||
"email": "[email protected]", | ||
"url": "https://github.com/saulhardman" | ||
}], | ||
"licenses": [{ | ||
"type": "MIT", | ||
"url": "http://saulhardman.mit-license.org/" | ||
}], | ||
"bugs": "https://github.com/saulhardman/autotyper/issues", | ||
"homepage": "https://github.com/saulhardman/autotyper", | ||
"docs": "https://github.com/saulhardman/autotyper#readme", | ||
"download": "https://github.com/saulhardman/autotyper/archive/master.zip", | ||
"dependencies": { | ||
"jquery": ">=1.4" | ||
} | ||
} |
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 @@ | ||
{ | ||
"name": "autotyper", | ||
"version": "0.1.0", | ||
"authors": [ | ||
"Saul Hardman <[email protected]>" | ||
], | ||
"description": "A simple JavaScript (currently jQuery) plugin to automatically type out text.", | ||
"main": "dist/jquery.autotyper.js", | ||
"keywords": [ | ||
"jquery", | ||
"jquery-plugin", | ||
"automatic", | ||
"auto", | ||
"typer", | ||
"autotyper" | ||
], | ||
"license": "MIT", | ||
"homepage": "http://github.com/saulhardman/autotyper", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests", | ||
"demo", | ||
"src", | ||
"*.json", | ||
"*.js", | ||
"*.md" | ||
] | ||
} |
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,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Autotyper</title> | ||
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | ||
<script src="../dist/jquery.autotyper.js"></script> | ||
</head> | ||
<body> | ||
<h1>Autotyper</h1> | ||
<p>A simple JavaScript (currently jQuery) plugin to automatically type out text.</p> | ||
<div id="js-terminal" class="terminal" data-autotyper-text="This is some text being typed out automatically!">This is the no-JavaScript fallback.</div> | ||
<script> | ||
$(function() { | ||
$("#js-terminal").autotyper(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.