Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Convert to TypeScript format and update build process to generate JS files. #2

Open
wants to merge 5 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
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
# Mac Resource files
._*
*.DS_Store

# Archives
*.gz

# Cache and build output directories
.tscache
dist

# CI Test results
testresults.xml

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
test:
clear && mocha --recursive --reporter spec --slow 1
clear && npm run build && mocha --recursive --reporter spec --slow 1

coveralls:
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --recursive && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage

Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module.exports = require('./dist/oauth').OAuth;
module.exports.default = module.exports;
36 changes: 27 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"version": "3.0.0",
"description": "OAuth 1.0a Request Authorization for Node and Browser.",
"scripts": {
"build": "tsc --project .",
"lint": "tslint --project tsconfig.json --type-check",
"test": "make test"
},
"main": "src/oauth.js",
"main": "index.js",
"repository": "https://github.com/whs/node-oauth-1.0a.git",
"keywords": [
"oauth",
Expand All @@ -14,17 +16,33 @@
"authorize",
"signature",
"nonce",
"consumer"
"consumer",
"typescript"
],
"license": "MIT",
"devDependencies": {
"mocha": "~2.4.5",
"chai": "~3.5.0",
"request": "~2.69.0",
"istanbul": "^0.4.2",
"coveralls": "^2.10.0"
"@types/chai": "^3.5.0",
"@types/istanbul": "^0.4.29",
"@types/mocha": "^2.2.40",
"@types/node": "^7.0.12",
"@types/randomstring": "^1.1.5",
"@types/request": "0.0.42",
"chai": "^3.5.0",
"coveralls": "^2.13.0",
"istanbul": "^0.4.5",
"mocha": "^3.2.0",
"request": "^2.81.0",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
},
"dependencies": {
"randomstring": "^1.1.4"
}
"randomstring": "^1.1.5"
},
"engines": {
"node": ">= 6"
},
"files": [
"dist",
"index.js"
]
}
Loading