Skip to content
This repository was archived by the owner on Apr 28, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "segment/browser",

"rules": {
"global-strict": 0,
"max-len": 0,
"strict": 0
},

"globals": {
"exports": true,
"module": true,
"require": true
}
}
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
BINS = ./node_modules/.bin
DUO = $(BINS)/duo
DUOT = $(BINS)/duo-test
ESLINT = $(BINS)/eslint
UGLIFYJS = $(BINS)/uglifyjs

#
Expand Down Expand Up @@ -45,7 +46,7 @@ node_modules: package.json $(wildcard node_modules/*/package.json)

# Remove temporary/built files.
clean:
@rm -rf $(BUILD) *.log analytics.js analytics.min.js components
@rm -rf $(BUILD) *.log analytics.js analytics.min.js
.PHONY: clean

# Remove temporary/built files and vendor dependencies.
Expand Down Expand Up @@ -91,19 +92,24 @@ build: $(BUILD)
# Test tasks.
#

# Lint JavaScript source.
lint: node_modules
@$(ESLINT) $(SRC) $(TESTS)
.PHONY: lint

# Test locally in PhantomJS.
test: $(BUILD)
test: node_modules lint $(BUILD)
@$(DUOT) $(DUOT_ARGS) phantomjs
.PHONY: test
.DEFAULT_GOAL = test

# Test locally in the browser.
test-browser: $(BUILD)
test-browser: node_modules lint $(BUILD)
@$(DUOT) $(DUOT_ARGS) browser
.PHONY: test-browser

# Test with Sauce Labs.
test-sauce: $(BUILD)
test-sauce: node_modules lint $(BUILD)
@$(DUOT) $(DUOT_ARGS) saucelabs \
--browsers $(BROWSER) \
--title analytics.js
Expand Down
Loading