-
Notifications
You must be signed in to change notification settings - Fork 4
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 #13 from cainus/v2
new version
- Loading branch information
Showing
22 changed files
with
13,658 additions
and
15,187 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
module.exports = { | ||
"env": { | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"never" | ||
] | ||
} | ||
} |
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,43 +1,8 @@ | ||
REPORTER = spec | ||
|
||
lint: | ||
./node_modules/.bin/jshint ./test ./index.js ./util.js | ||
|
||
browser-test: | ||
$(MAKE) browser-build | ||
gnome-open test.html | ||
|
||
browser-build-min: | ||
@rm -f urlgrey.min.js | ||
@./node_modules/.bin/browserify index.js \ | ||
-s urlgrey | \ | ||
./node_modules/.bin/uglifyjs > urlgrey.min.js | ||
|
||
browser-build: | ||
@rm -f urlgrey.js | ||
@./node_modules/.bin/browserify index.js \ | ||
-s urlgrey > urlgrey.js | ||
|
||
precommit: | ||
$(MAKE) test | ||
$(MAKE) browser-build | ||
$(MAKE) browser-build-min | ||
echo "Artifacts built!" | ||
npx eslint . | ||
|
||
test: | ||
$(MAKE) lint | ||
@NODE_ENV=test ./node_modules/.bin/mocha --bail --reporter $(REPORTER) | ||
|
||
test-cov: | ||
$(MAKE) lint | ||
@NODE_ENV=test ./node_modules/.bin/istanbul cover \ | ||
./node_modules/mocha/bin/_mocha -- -R spec | ||
|
||
test-coveralls: | ||
echo TRAVIS_JOB_ID $(TRAVIS_JOB_ID) | ||
$(MAKE) test | ||
@NODE_ENV=test ./node_modules/.bin/istanbul cover \ | ||
./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && \ | ||
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js || true | ||
@NODE_ENV=test ./node_modules/.bin/jest | ||
|
||
.PHONY: test |
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
Oops, something went wrong.