This repository was archived by the owner on Apr 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +27
-69
lines changed Expand file tree Collapse file tree 5 files changed +27
-69
lines changed Load Diff This file was deleted.
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
- #
12
1
13
2
SRC = $(wildcard lib/* .js)
14
3
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 $@
23
7
24
- # Remove temporary/built files.
25
8
clean :
26
9
rm -rf * .log analytics.js analytics.min.js
27
- .PHONY : clean
28
10
29
- # Remove temporary/built files and vendor dependencies.
30
11
distclean : clean
31
12
rm -rf components node_modules
32
- .PHONY : distclean
33
13
34
- #
35
- # Build tasks.
36
- #
37
-
38
- # Build analytics.js.
39
14
analytics.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 > $@
41
16
42
- # Build minified analytics.js.
43
17
analytics.min.js : analytics.js
44
- @ $( UGLIFYJS ) $< --output $@
18
+ ./node_modules/.bin/uglifyjs $< --output $@
45
19
46
- # Build shortcut.
47
20
build : analytics.min.js
48
- .PHONY : build
49
-
50
- #
51
- # Test tasks.
52
- #
53
21
54
- # Lint JavaScript source.
55
22
lint : 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 2
2
/**
3
3
* Analytics.js
4
4
*
5
- * (C) 2015 Segment.io Inc.
5
+ * (C) 2017 Segment Inc.
6
6
*/
7
7
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' )
11
11
12
12
/**
13
13
* Expose the `analytics` singleton.
14
14
*/
15
15
16
- module . exports = exports = analytics ;
16
+ module . exports = exports = analytics
17
17
18
18
/**
19
19
* Expose require.
20
20
*/
21
21
22
- analytics . require = require ;
22
+ analytics . require = require
23
23
24
24
/**
25
25
* Expose `VERSION`.
26
26
*/
27
27
28
- exports . VERSION = require ( '../bower.json' ) . version ;
28
+ exports . VERSION = require ( '../bower.json' ) . version
29
29
30
30
/**
31
31
* Add integrations.
32
32
*/
33
33
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 1
1
/* eslint quote-props: 0 */
2
- 'use strict' ;
2
+ 'use strict'
3
3
4
4
module . exports = {
5
5
'adroll' : require ( 'analytics.js-integration-adroll' ) ,
@@ -89,4 +89,4 @@ module.exports = {
89
89
'woopra' : require ( 'analytics.js-integration-woopra' ) ,
90
90
'wootric' : require ( 'analytics.js-integration-wootric' ) ,
91
91
'yandex-metrica' : require ( 'analytics.js-integration-yandex-metrica' )
92
- } ;
92
+ }
Original file line number Diff line number Diff line change 24
24
"dependencies" : {},
25
25
"devDependencies" : {
26
26
"duo" : " ^0.12.0" ,
27
- "eslint" : " 0.x" ,
28
- "eslint-config-segment" : " ^1.0.7" ,
27
+ "standard" : " ^8.6.0" ,
29
28
"uglify-js" : " >= 1.3.4"
29
+ },
30
+ "standard" : {
31
+ "ignore" : [
32
+ " analytics.js" ,
33
+ " analytics.min.js"
34
+ ]
30
35
}
31
36
}
You can’t perform that action at this time.
0 commit comments