Skip to content

Commit 52288dc

Browse files
author
j-beckman
committed
Adding Bower and NPM support
1 parent 3225882 commit 52288dc

File tree

5 files changed

+112
-2
lines changed

5 files changed

+112
-2
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
*.DS_Store
22

3-
package.json
4-
gruntfile.js
53
node_modules/
64

75
npm-debug.log

bower.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "gatrack",
3+
"version": "1.3.0",
4+
"homepage": "http://jbckmn.github.io/gatrack.js/",
5+
"authors": [
6+
"jbckmn <[email protected]>"
7+
],
8+
"description": "Easily track user (or any) events and errors with Google Analytics",
9+
"main": "dist/gatrack.min.js",
10+
"dependencies": {},
11+
"keywords": [
12+
"Google",
13+
"Analytics",
14+
"error",
15+
"tracking",
16+
"event",
17+
"tracking",
18+
"user",
19+
"interaction"
20+
],
21+
"license": "MIT",
22+
"ignore": [
23+
"**/.*",
24+
"node_modules",
25+
"bower_components",
26+
"test",
27+
"tests"
28+
]
29+
}

gruntfile.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
4+
uglify: {
5+
general: {
6+
options: {
7+
banner: '/*! <%= pkg.name %> v<%= pkg.version %> By <%= pkg.author %>, <%= grunt.template.today("dd-mm-yyyy") %>, <%= pkg.repository.url %>, License: <%= pkg.license %> */\n',
8+
mangle: {
9+
except: ['gatrack']
10+
}
11+
},
12+
files: {
13+
'dist/gatrack.min.js': ['src/gatrack.js']
14+
}
15+
}
16+
},
17+
jshint: {
18+
files: ['gruntfile.js', 'src/gatrack.js'],
19+
options: {
20+
globals: {
21+
jQuery: true,
22+
console: true,
23+
module: true,
24+
document: true
25+
}
26+
}
27+
}
28+
});
29+
30+
grunt.loadNpmTasks('grunt-contrib-jshint');
31+
grunt.loadNpmTasks('grunt-contrib-uglify');
32+
33+
grunt.registerTask('test', ['jshint']);
34+
grunt.registerTask('crush', ['uglify']);
35+
grunt.registerTask('default', ['jshint', 'uglify']);
36+
};

package.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "gatrack",
3+
"version": "1.3.0",
4+
"description": "Easily track user (or any) events and errors with Google Analytics",
5+
"main": "dist/gatrack.min.js",
6+
"directories": {
7+
"example": "example"
8+
},
9+
"devDependencies": {
10+
"grunt": "^0.4.2",
11+
"grunt-contrib-jshint": "^0.8.0",
12+
"grunt-contrib-uglify": "^0.3.0"
13+
},
14+
"dependencies": {},
15+
"scripts": {
16+
"test": "grunt test"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/jbckmn/gatrack.js.git"
21+
},
22+
"keywords": [
23+
"Google",
24+
"Analytics",
25+
"error",
26+
"tracking",
27+
"event",
28+
"tracking",
29+
"user",
30+
"interaction"
31+
],
32+
"author": "jbckmn <[email protected]>",
33+
"license": "MIT",
34+
"bugs": {
35+
"url": "https://github.com/jbckmn/gatrack.js/issues"
36+
},
37+
"homepage": "http://jbckmn.github.io/gatrack.js/"
38+
}

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

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

11+
## Installation
12+
13+
You can install gatrack.js via Bower or NPM:
14+
```
15+
bower install gatrack
16+
npm install gatrack
17+
```
18+
Or, you can just include the `dist/gatrack.min.js` file anywhere on your page.
19+
1120
## Way-cool:
1221

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

0 commit comments

Comments
 (0)