This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #535 from segmentio/standard
convert to standard
- Loading branch information
Showing
5 changed files
with
27 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,25 @@ | ||
# | ||
# Binaries. | ||
# | ||
|
||
DUO = node_modules/.bin/duo | ||
ESLINT = node_modules/.bin/eslint | ||
UGLIFYJS = node_modules/.bin/uglifyjs | ||
|
||
# | ||
# Files. | ||
# | ||
|
||
SRC = $(wildcard lib/*.js) | ||
|
||
# | ||
# Chore tasks. | ||
# | ||
|
||
# Install node dependencies. | ||
node_modules: package.json $(wildcard node_modules/*/package.json) | ||
@npm install | ||
@touch node_modules | ||
node_modules: package.json | ||
npm install | ||
touch $@ | ||
|
||
# Remove temporary/built files. | ||
clean: | ||
rm -rf *.log analytics.js analytics.min.js | ||
.PHONY: clean | ||
|
||
# Remove temporary/built files and vendor dependencies. | ||
distclean: clean | ||
rm -rf components node_modules | ||
.PHONY: distclean | ||
|
||
# | ||
# Build tasks. | ||
# | ||
|
||
# Build analytics.js. | ||
analytics.js: node_modules $(SRC) package.json | ||
@$(DUO) --stdout --standalone analytics lib/index.js > $@ | ||
./node_modules/.bin/duo --stdout --standalone analytics lib/index.js > $@ | ||
|
||
# Build minified analytics.js. | ||
analytics.min.js: analytics.js | ||
@$(UGLIFYJS) $< --output $@ | ||
./node_modules/.bin/uglifyjs $< --output $@ | ||
|
||
# Build shortcut. | ||
build: analytics.min.js | ||
.PHONY: build | ||
|
||
# | ||
# Test tasks. | ||
# | ||
|
||
# Lint JavaScript source. | ||
lint: node_modules | ||
@$(ESLINT) $(SRC) | ||
.PHONY: lint | ||
./node_modules/.bin/standard | ||
|
||
.PHONY: clean distclean build lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters