Skip to content

Commit

Permalink
feat(Init): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
saulhardman committed Jun 1, 2015
0 parents commit 274e03c
Show file tree
Hide file tree
Showing 12 changed files with 693 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# OS
.DS_Store
._*

# NPM dependencies
node_modules/
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
}
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("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"]);

};
22 changes: 22 additions & 0 deletions LICENSE
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.

40 changes: 40 additions & 0 deletions README.md
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
35 changes: 35 additions & 0 deletions autotyper.jquery.json
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"
}
}
31 changes: 31 additions & 0 deletions bower.json
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"
]
}
18 changes: 18 additions & 0 deletions demo/index.html
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>
Loading

0 comments on commit 274e03c

Please sign in to comment.