Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim analytics #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 1 addition & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"extends": "segment/browser",

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

"globals": {
"exports": true,
"module": true,
"require": true
}
"extends": "@segment/eslint-config/browser/legacy"
}
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules/
test/server/pid.txt
components
build.js
coverage
node_modules
npm-debug.log
6 changes: 6 additions & 0 deletions History.md → HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

Master / Not Released
==================

* Removing Duojs dependancy
* Updating core libraries

2.11.0 / 2015-08-17
==================

Expand Down
File renamed without changes.
57 changes: 32 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
#
# Binaries.
#
##
# Binaries
##

DUO = node_modules/.bin/duo
BROWSERIFY = node_modules/.bin/browserify
ESLINT = node_modules/.bin/eslint
UGLIFYJS = node_modules/.bin/uglifyjs

#
# Files.
#
##
# Files
##

SRC = $(wildcard lib/*.js)

#
# Chore tasks.
#
##
# Tasks
##

# Install node dependencies.
# Install node modules.
node_modules: package.json $(wildcard node_modules/*/package.json)
@npm install
@touch node_modules

# Remove temporary/built files.
# Install dependencies.
install: node_modules

# Remove temporary files and build artifacts.
clean:
rm -rf *.log analytics.js analytics.min.js
.PHONY: clean

# Remove temporary/built files and vendor dependencies.
# Remove temporary files, build artifacts, and vendor dependencies.
distclean: clean
rm -rf components node_modules
rm -rf node_modules
.PHONY: distclean

#
# Build tasks.
#

# Build analytics.js.
analytics.js: node_modules $(SRC) package.json
@$(DUO) --stdout --standalone analytics lib/index.js > $@
analytics.js: install $(SRC) package.json
@$(BROWSERIFY) lib/index.js --standalone analytics > analytics.js

# Build minified analytics.js.
analytics.min.js: analytics.js
Expand All @@ -47,11 +46,19 @@ analytics.min.js: analytics.js
build: analytics.min.js
.PHONY: build

#
# Test tasks.
#

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

# Run browser unit tests in a browser.
test-browser: install
.PHONY: test-browser

# Default test target.
test: lint test-browser
.PHONY: test
.DEFAULT_GOAL = test

test-sauce: test
.PHONY: test-sauce
18 changes: 11 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

Analytics.js makes it easy to collect customer data and send it to many different tools using a single, unified API.

Analytics.js is open source and is one of the libraries that powers [Segment](https://segment.com), the managed, hassle-free way to collect customer data in the browser and beyond.
Analytics.js is open source and is one of the libraries that powers [Segment], the managed, hassle-free way to collect customer data in the browser and beyond.

For our mobile and server-side data collection libraries, check out our [libraries][] page.
For our mobile and server-side data collection libraries, check out our [libraries] page.

## Documentation

First, read the [Analytics.js QuickStart][], which contains installation instructions and a brief overview of what Analytics.js does and how it works.
First, read the [Analytics.js QuickStart], which contains installation instructions and a brief overview of what Analytics.js does and how it works.

For more detail on the Analytics.js API, check out the [Analytics.js Library Reference].

For more detail on the Analytics.js API, check out the [Analytics.js Library Reference][].

## Contributing

Expand All @@ -23,12 +24,15 @@ If you're not sure where to open an issue, feel free to open an issue against th

## License

Released under the [MIT license](License.md).
Released under the [MIT license].


-------

[analytics.js library reference]: https://segment.com/docs/libraries/analytics.js
[analytics.js quickstart]: https://segment.com/docs/tutorials/quickstart-analytics.js
[Segment]: https://segment.com
[MIT license]: License.md
[Analytics.js Library Reference]: https://segment.com/docs/libraries/analytics.js
[Analytics.js Quickstart]: https://segment.com/docs/tutorials/quickstart-analytics.js
[analytics.js-core]: https://github.com/segmentio/analytics.js-core
[analytics.js-integrations]: https://github.com/segment-integrations?query=analytics.js-integration
[ci-badge]: https://travis-ci.org/segmentio/analytics.js.png?branch=master
Expand Down
Loading