This repository was archived by the owner on Apr 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +27
-54
lines changed Expand file tree Collapse file tree 4 files changed +27
-54
lines changed Original file line number Diff line number Diff line change 1- #
2- # Binaries.
3- #
4-
5- DUO = node_modules/.bin/duo
6- ESLINT = node_modules/.bin/eslint
7- UGLIFYJS = node_modules/.bin/uglifyjs
8-
9- #
10- # Files.
11- #
121
132SRC = $(wildcard lib/* .js)
143
15- #
16- # Chore tasks.
17- #
18-
19- # Install node dependencies.
20- node_modules : package.json $(wildcard node_modules/* /package.json)
21- @npm install
22- @touch node_modules
4+ node_modules : package.json
5+ npm install
6+ touch $@
237
24- # Remove temporary/built files.
258clean :
269 rm -rf * .log analytics.js analytics.min.js
27- .PHONY : clean
2810
29- # Remove temporary/built files and vendor dependencies.
3011distclean : clean
3112 rm -rf components node_modules
32- .PHONY : distclean
3313
34- #
35- # Build tasks.
36- #
37-
38- # Build analytics.js.
3914analytics.js : node_modules $(SRC ) package.json
40- @ $( DUO ) --stdout --standalone analytics lib/index.js > $@
15+ ./node_modules/.bin/duo --stdout --standalone analytics lib/index.js > $@
4116
42- # Build minified analytics.js.
4317analytics.min.js : analytics.js
44- @ $( UGLIFYJS ) $< --output $@
18+ ./node_modules/.bin/uglifyjs $< --output $@
4519
46- # Build shortcut.
4720build : analytics.min.js
48- .PHONY : build
49-
50- #
51- # Test tasks.
52- #
5321
54- # Lint JavaScript source.
5522lint : node_modules
56- @$(ESLINT ) $(SRC )
57- .PHONY : lint
23+ ./node_modules/.bin/standard
24+
25+ .PHONY : clean distclean build lint
Original file line number Diff line number Diff line change 22/**
33 * Analytics.js
44 *
5- * (C) 2015 Segment.io Inc.
5+ * (C) 2017 Segment Inc.
66 */
77
8- var analytics = require ( 'segmentio/analytics.js-core' ) ;
9- var Integrations = require ( './integrations' ) ;
10- var each = require ( 'each' ) ;
8+ var analytics = require ( 'segmentio/analytics.js-core' )
9+ var Integrations = require ( './integrations' )
10+ var each = require ( 'each' )
1111
1212/**
1313 * Expose the `analytics` singleton.
1414 */
1515
16- module . exports = exports = analytics ;
16+ module . exports = exports = analytics
1717
1818/**
1919 * Expose require.
2020 */
2121
22- analytics . require = require ;
22+ analytics . require = require
2323
2424/**
2525 * Expose `VERSION`.
2626 */
2727
28- exports . VERSION = require ( '../bower.json' ) . version ;
28+ exports . VERSION = require ( '../bower.json' ) . version
2929
3030/**
3131 * Add integrations.
3232 */
3333
34- each ( Integrations , function ( name , Integration ) {
35- analytics . use ( Integration ) ;
36- } ) ;
34+ each ( Integrations , function ( name , Integration ) {
35+ analytics . use ( Integration )
36+ } )
Original file line number Diff line number Diff line change 11/* eslint quote-props: 0 */
2- 'use strict' ;
2+ 'use strict'
33
44module . exports = {
55 'adroll' : require ( 'analytics.js-integration-adroll' ) ,
@@ -89,4 +89,4 @@ module.exports = {
8989 'woopra' : require ( 'analytics.js-integration-woopra' ) ,
9090 'wootric' : require ( 'analytics.js-integration-wootric' ) ,
9191 'yandex-metrica' : require ( 'analytics.js-integration-yandex-metrica' )
92- } ;
92+ }
Original file line number Diff line number Diff line change 2424 "dependencies" : {},
2525 "devDependencies" : {
2626 "duo" : " ^0.12.0" ,
27- "eslint" : " 0.x" ,
28- "eslint-config-segment" : " ^1.0.7" ,
27+ "standard" : " ^8.6.0" ,
2928 "uglify-js" : " >= 1.3.4"
29+ },
30+ "standard" : {
31+ "ignore" : [
32+ " analytics.js" ,
33+ " analytics.min.js"
34+ ]
3035 }
3136}
You can’t perform that action at this time.
0 commit comments