Skip to content
This repository was archived by the owner on Feb 4, 2019. It is now read-only.
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
typings
dist

**/*.js
**/*.map
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
typings
src
25 changes: 16 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{
"name": "azure-functions-typescript",
"version": "0.0.1",
"version": "0.1.0",
"description": "Helper library for using TypeScript with Azure Functions",
"main": "src/index.js",
"typings": "src/index.d.ts",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/christopheranderson/azure-functions-typescript.git"
},
"scripts": {
"pre-build": "typings install",
"clean": "rimraf ./dist",
"prebuild": "npm run clean",
"build": "tsc",
"pre-watch":"typings install",
"watch": "typings install & tsc -w"
"watch": "tsc -w"
},
"author": "christopheranderson",
"author": "christopheranderson & Steve Lee",
"license": "MIT",
"devDependencies": {
"typescript": "^1.8.10",
"typings": "^1.3.2"
"rimraf": "^2.6.1",
"typescript": "^2.4.1"
},
"dependencies": {
"@types/node": "^8.0.13"
}
}
4 changes: 1 addition & 3 deletions samples/http-trigger/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/// <reference path="../typings/index.d.ts" />

import {HttpContext, IFunctionRequest, HttpStatusCodes} from 'azure-functions-typescript'

export function index(context: HttpContext, req: IFunctionRequest) {
if(req.method == "GET")
context.res.status = HttpStatusCodes.OK;
context.res.status = HttpStatusCodes.OK;
context.done(null, {});
}

12 changes: 5 additions & 7 deletions samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"description": "This is a test. This is only a test.",
"main": "",
"scripts": {
"test":"node ./http-trigger/index.js",
"prebuild": "typings install",
"test": "node ./http-trigger/index.js",
"build": "tsc",
"prewatch":"typings install",
"watch": "typings install & tsc -w"
"watch": "tsc -w"
},
"author": "christopheranderson",
"repository": {
Expand All @@ -17,10 +15,10 @@
},
"license": "MIT",
"dependencies": {
"azure-functions-typescript": "../"
"azure-functions-typescript": "../",
"tslib": "1.7.1"
},
"devDependencies": {
"typescript": "^1.8.10",
"typings": "^1.3.2"
"typescript": "^2.4.1"
}
}
10 changes: 6 additions & 4 deletions samples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"target": "es2015",
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true
"sourceMap": true,
"strict": true,
"importHelpers": true
},
"exclude": [
"node_modules"
"files": [
"http-trigger/index.ts"
]
}
9 changes: 0 additions & 9 deletions samples/typings.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/context.d.ts

This file was deleted.

121 changes: 0 additions & 121 deletions src/http.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/index.d.ts

This file was deleted.

7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
import {Context} from './context';
import {IFunctionRequest, IFunctionResponse, HttpContext, HttpStatusCodes, HttpMethod} from './http';


export {Context, IFunctionRequest, IFunctionResponse, HttpContext, HttpStatusCodes, HttpMethod};
export {Context} from './context';
export {IFunctionRequest, IFunctionResponse, HttpContext, HttpStatusCodes, HttpMethod} from './http';
11 changes: 7 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true,
"declaration": true
"declaration": true,
"outDir": "./dist",
"declarationDir": "./dist"

},
"exclude": [
"node_modules",
"samples"
"files": [
"src/index.ts"
]
}
9 changes: 0 additions & 9 deletions typings.json

This file was deleted.