Incorporate typescript build into the package.json
Also fix up the sources to build correctly, and ignore the .ts source files when creating the NPM pacakge.
This commit is contained in:
Родитель
10e6a7927a
Коммит
b975c78431
|
@ -9,4 +9,8 @@ obj
|
|||
|
||||
# Ignore test files
|
||||
Tests
|
||||
Server.js
|
||||
|
||||
# Don't publish .ts files
|
||||
*.ts
|
||||
!*.d.ts
|
||||
|
||||
|
|
|
@ -62,4 +62,4 @@ class Sender {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = Sender;
|
||||
export = Sender;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import http = require("http");
|
||||
///<reference path='.\Scripts\typings\node\node.d.ts' />
|
||||
///<reference path='.\Scripts\typings\applicationInsights\ai.d.ts' />
|
||||
|
||||
import http = require("http");
|
||||
import url = require("url");
|
||||
import Sender = require("./Sender");
|
||||
|
||||
// environment variables
|
||||
var ENV_azurePrefix = "APPSETTING_";
|
||||
|
@ -309,4 +313,4 @@ export class NodeAppInsights extends Microsoft.ApplicationInsights.AppInsights {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
}
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": "tsc --module commonjs --declaration applicationInsights.ts",
|
||||
"postinstall": "node install.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^1.0.1"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче