Skip to content

Commit

Permalink
Adding Bower and NPM support
Browse files Browse the repository at this point in the history
  • Loading branch information
j-beckman committed Dec 15, 2014
1 parent 3225882 commit 52288dc
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
*.DS_Store

package.json
gruntfile.js
node_modules/

npm-debug.log
29 changes: 29 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "gatrack",
"version": "1.3.0",
"homepage": "http://jbckmn.github.io/gatrack.js/",
"authors": [
"jbckmn <[email protected]>"
],
"description": "Easily track user (or any) events and errors with Google Analytics",
"main": "dist/gatrack.min.js",
"dependencies": {},
"keywords": [
"Google",
"Analytics",
"error",
"tracking",
"event",
"tracking",
"user",
"interaction"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
36 changes: 36 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
general: {
options: {
banner: '/*! <%= pkg.name %> v<%= pkg.version %> By <%= pkg.author %>, <%= grunt.template.today("dd-mm-yyyy") %>, <%= pkg.repository.url %>, License: <%= pkg.license %> */\n',
mangle: {
except: ['gatrack']
}
},
files: {
'dist/gatrack.min.js': ['src/gatrack.js']
}
}
},
jshint: {
files: ['gruntfile.js', 'src/gatrack.js'],
options: {
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.registerTask('test', ['jshint']);
grunt.registerTask('crush', ['uglify']);
grunt.registerTask('default', ['jshint', 'uglify']);
};
38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "gatrack",
"version": "1.3.0",
"description": "Easily track user (or any) events and errors with Google Analytics",
"main": "dist/gatrack.min.js",
"directories": {
"example": "example"
},
"devDependencies": {
"grunt": "^0.4.2",
"grunt-contrib-jshint": "^0.8.0",
"grunt-contrib-uglify": "^0.3.0"
},
"dependencies": {},
"scripts": {
"test": "grunt test"
},
"repository": {
"type": "git",
"url": "https://github.com/jbckmn/gatrack.js.git"
},
"keywords": [
"Google",
"Analytics",
"error",
"tracking",
"event",
"tracking",
"user",
"interaction"
],
"author": "jbckmn <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/jbckmn/gatrack.js/issues"
},
"homepage": "http://jbckmn.github.io/gatrack.js/"
}
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

You betcha. Check out the [provided index.html](https://github.com/jbckmn/gatrack.js/blob/master/exampl/index.html) demo for working examples.

## Installation

You can install gatrack.js via Bower or NPM:
```
bower install gatrack
npm install gatrack
```
Or, you can just include the `dist/gatrack.min.js` file anywhere on your page.

## Way-cool:

- [Auto-track](#api-usage) events on elements with a class-based API
Expand Down

0 comments on commit 52288dc

Please sign in to comment.