Skip to content

Commit

Permalink
feat(provider): Adds Google Analytics provider
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBGod committed Jan 21, 2016
0 parents commit 8fb0373
Show file tree
Hide file tree
Showing 18 changed files with 1,634 additions and 0 deletions.
200 changes: 200 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
{
"env": {
"browser": 2,
"node": 2,
"mocha": 2,
"es6": 2
},
"ecmaFeatures": {
"modules": true
},
"globals": {
"_": 2,
"$": 2,
"angular": 2,
"jQuery": 2
},
"rules": {
// Possible Errors
"comma-dangle": 2,
// no-comma-dangle - (deprecated)
"no-cond-assign": [2, "always"],
"no-console": 2,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 2,
"no-dupe-keys": 2,
"no-dupe-args": 2,
"no-duplicate-case": 2,
"no-empty-character-class": 2,
// no-empty-class - (deprecated)
"no-empty": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 2,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-jsdoc": 2,
"valid-typeof": 2,
"no-unexpected-multiline": 2,

// Best Practices
// not sure
"accessor-pairs": [2, {"getWithoutSet": false, "setWithoutGet": true}],
"block-scoped-var": 2,
"complexity": [2, 6],
"consistent-return": 2,
"curly": 2,
"default-case": 2,
"dot-notation": 2,
// not good for chain calls, but not for properties
"dot-location": [2, "property"],
"eqeqeq": 2,
"guard-for-in": 2,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 2,
"no-else-return": 2,
"no-empty-label": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-param-reassign": 2,
"no-process-env": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-void": 2,
"no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "anywhere" }],
"no-with": 2,
"radix": 2,
"vars-on-top": 0,
"wrap-iife": [2, "inside"],
"yoda": [2, "never"],

// Strict Mode
"strict": [2, "global"],

// Variables
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 2,
"no-unused-vars": 2,
"no-use-before-define": [2, "nofunc"],

// Node.js
"handle-callback-err": [2, "^.*(e|E)rr" ],
"no-mixed-requires": [2, true],
"no-new-require": 2,
"no-path-concat": 2,
"no-process-exit": 2,
"no-sync": 2,

// Stylistic Issues
"array-bracket-spacing": [2, "never"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": 2,
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"consistent-this": [2, "self"],
// not sure
"eol-last": 0,
"func-names": 0,
"func-style": [2, "declaration"],
"indent": [2, 2],
"key-spacing": [2, { "beforeColon": false, "afterColon": true}],
"max-nested-callbacks": [2, 3],
"new-cap": [2, {"newIsCap": true, "capIsNew": true, "capIsNewExceptions":[
"ObjectId",
"Object",
"Function",
"Number",
"String",
"Boolean",
"Date",
"Array",
"Symbol",
"RegExp"
]}],
"new-parens": 2,
"newline-after-var": 0,
"no-array-constructor": 2,
"no-inline-comments": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": [2, {"max": 1}],
"no-nested-ternary": 2,
"no-new-object": 2,
"no-spaced-func": 2,
"no-ternary": 0,
"no-trailing-spaces": 2,
"no-underscore-dangle": 2,
"no-unneeded-ternary": 2,
"object-curly-spacing": [2, "never"],
"one-var": [2, {
"var": "never", // Exactly one var declaration per function
"let": "never", // Exactly one let declaration per block
"const": "never" // Exactly one declarator per const declaration per block
}],
"operator-assignment": [1, "always"],
"operator-linebreak": [2, "after"],
"padded-blocks": [2, "never"],
"quote-props": [2, "as-needed"],
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"semi-spacing": 2,
// "sort-vars": [1, { "ignoreCase": true }],
"space-after-keywords": [2, "always" ],
"space-before-blocks": [2, "always"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-comment": 0,
"wrap-regexp": 0,

// Legacy
"max-len": [1, 120, 4],
// todo: apply max-params
"max-params": [0, 3],
// todo: apply max-statements
"max-statements": [2, 30],
"no-bitwise": 2
}
}
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#################
## Misc
#################
**/.DS_Store
nbproject
manifest.mf
build.xml
node_modules/*
npm-debug.log
coverage
*.js
!karma.conf.js
!karma-test-shim.js
*.map
*.d.ts
typings

#################
## JetBrains
#################
.idea
.project
.settings
.idea/*
*.iml

############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini

############
## Mac
############

# Mac crap
.DS_Store

41 changes: 41 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#################
## Misc
#################
**/.DS_Store
nbproject
manifest.mf
build.xml
node_modules/*
npm-debug.log
coverage
*.ts
!*.d.ts
tests
*.spec.*
*.test.*

#################
## JetBrains
#################
.idea
.project
.settings
.idea/*
*.iml

############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini

############
## Mac
############

# Mac crap
.DS_Store
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '4'
before_install:
- npm i -g npm@^2.0.0
- npm i -g tsd
before_script:
- npm prune
after_success:
- npm run semantic-release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
before_script:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
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 angulartics

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.

Loading

0 comments on commit 8fb0373

Please sign in to comment.