gulp-tsconfig-update
Advanced tools
Comparing version 1.1.0 to 1.1.1
///<reference path="../typings/bundle.d.ts"/> | ||
///<reference path="TsConfig.d.ts"/> | ||
"use strict"; | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
@@ -38,3 +39,3 @@ var gutil = require("gulp-util"); | ||
tsConfig.files = tsFiles.map(function (file) { | ||
return file.path.replace(file.cwd, ".").replace(/\\/g, "/"); | ||
return path.relative(file.cwd, file.path).replace(/\\/g, "/"); | ||
}); | ||
@@ -41,0 +42,0 @@ fs.writeFileSync(tsConfigPath, JSON.stringify(tsConfig, null, 4), "utf-8"); |
{ | ||
"name": "gulp-tsconfig-update", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A gulp plugin to update `files` property in tsconfig.json by `gulp.src`.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -53,3 +53,3 @@ ///<reference path="../typings/bundle.d.ts"/> | ||
tsConfig.files = tsFiles.map((file)=> { | ||
return file.path.replace(file.cwd, ".").replace(/\\/g, "/"); | ||
return path.relative(file.cwd, file.path).replace(/\\/g, "/"); | ||
}); | ||
@@ -56,0 +56,0 @@ fs.writeFileSync(tsConfigPath, JSON.stringify(tsConfig, null, 4), "utf-8"); |
@@ -11,6 +11,12 @@ var assert = require("chai").assert; | ||
var files = [ | ||
"./src/bar.ts", | ||
"./src/foo.ts", | ||
"./src2/bar.ts", | ||
"./src2/foo.ts" | ||
"src/bar.ts", | ||
"src/foo.ts", | ||
"src2/src3/bar.ts", | ||
"src2/src3/foo.ts", | ||
"src2/src4/bar.ts", | ||
"src2/src4/foo.ts", | ||
"src2/src5/bar.ts", | ||
"src2/src5/foo.ts", | ||
"src2/bar.ts", | ||
"src2/foo.ts" | ||
]; | ||
@@ -17,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
9101
24
239