Grunt: compile typescript, create source maps
This commit is contained in:
Родитель
5de074013b
Коммит
93c9449eb1
|
@ -161,3 +161,7 @@ $RECYCLE.BIN/
|
|||
|
||||
# Visual studio 2015 user specific files
|
||||
JavaScript/.vs
|
||||
|
||||
# Temp directories
|
||||
bundle/
|
||||
node_modules/
|
|
@ -0,0 +1 @@
|
|||
// Ignore this file. See https://github.com/grunt-ts/grunt-ts/issues/77
|
|
@ -0,0 +1,31 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
ts: {
|
||||
default: {
|
||||
src: [
|
||||
'**/*.ts',
|
||||
'!node_modules/**',
|
||||
'!bundle/**',
|
||||
'!dist/**',
|
||||
'!JavaScript/JavaScriptSDK.Tests/**'],
|
||||
out: 'bundle/ai.js',
|
||||
comments: true
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
my_target: {
|
||||
files: {
|
||||
'bundle/ai.min.js': ['bundle/ai.js']
|
||||
},
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sourceMapIncludeSources: true,
|
||||
sourceMapIn: 'bundle/ai.js.map'
|
||||
},
|
||||
}
|
||||
}
|
||||
});
|
||||
grunt.loadNpmTasks("grunt-ts");
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.registerTask("default", ["ts", "uglify"]);
|
||||
};
|
54
package.json
54
package.json
|
@ -1,26 +1,32 @@
|
|||
{
|
||||
"name": "applicationinsights-js",
|
||||
"version": "1.0.8",
|
||||
"description": "Microsoft Application Insights JavaScript SDK",
|
||||
"main": "JavaScript/JavaScriptSDK.Module/AppInsightsModule.js",
|
||||
"keywords": [
|
||||
"browser performance monitoring",
|
||||
"script errors",
|
||||
"application insights",
|
||||
"microsoft",
|
||||
"azure"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Microsoft/ApplicationInsights-JS.git"
|
||||
},
|
||||
"author": "Microsoft Application Insights Team",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/ApplicationInsights-JS/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Microsoft/ApplicationInsights-JS#readme"
|
||||
"name": "applicationinsights-js",
|
||||
"version": "1.0.8",
|
||||
"description": "Microsoft Application Insights JavaScript SDK",
|
||||
"main": "JavaScript/JavaScriptSDK.Module/AppInsightsModule.js",
|
||||
"keywords": [
|
||||
"browser performance monitoring",
|
||||
"script errors",
|
||||
"application insights",
|
||||
"microsoft",
|
||||
"azure"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Microsoft/ApplicationInsights-JS.git"
|
||||
},
|
||||
"author": "Microsoft Application Insights Team",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/ApplicationInsights-JS/issues"
|
||||
},
|
||||
"homepage": "https://github.com/Microsoft/ApplicationInsights-JS#readme",
|
||||
"devDependencies": {
|
||||
"grunt": "1.0.1",
|
||||
"grunt-contrib-uglify": "^2.3.0",
|
||||
"grunt-ts": "^6.0.0-beta.15",
|
||||
"typescript": "1.8.10"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
// "outDir": "bundle",
|
||||
"outFile": "ai.js",
|
||||
"sourceMap": true,
|
||||
"inlineSourceMap": true,
|
||||
// "noImplicitAny": true,
|
||||
"noImplicitAny": false,
|
||||
"module": "amd",
|
||||
"target": "es5",
|
||||
"allowJs": true,
|
||||
"alwaysStrict": true
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче