fixed packaging issues

This commit is contained in:
Umed Khudoiberdiev 2016-12-05 17:47:59 +05:00
parent fac16c3fc9
commit c94859a180
2 changed files with 15 additions and 13 deletions

View File

@ -151,6 +151,17 @@ export class Gulpfile {
.pipe(gulp.dest("./build/package"));
}
/**
* Removes /// <reference from compiled sources.
*/
@Task()
packageReplaceReferences() {
return gulp.src("./build/package/**/*.d.ts")
.pipe(replace(`/// <reference types="node" />`, ""))
.pipe(replace(`/// <reference types="chai" />`, ""))
.pipe(gulp.dest("./build/package"));
}
/**
* Moves all compiled files to the final package directory.
*/
@ -178,16 +189,7 @@ export class Gulpfile {
@Task()
packageReadmeFile() {
return gulp.src("./README.md")
.pipe(replace(/```typescript([\s\S]*?)```/g, "```javascript$1```"))
.pipe(gulp.dest("./build/package"));
}
/**
* This task will copy typings.json file to the build package.
*/
@Task()
copyTypingsFile() {
return gulp.src("./typings.json")
// .pipe(replace(/```typescript([\s\S]*?)```/g, "```javascript$1```"))
.pipe(gulp.dest("./build/package"));
}
@ -200,8 +202,8 @@ export class Gulpfile {
"clean",
"packageCompile",
"packageMoveCompiledFiles",
"packageClearCompileDirectory",
["packagePreparePackageFile", "packageReadmeFile", "copyTypingsFile"]
["packageClearCompileDirectory", "packageReplaceReferences"],
["packagePreparePackageFile", "packageReadmeFile"]
];
}

View File

@ -1,7 +1,7 @@
{
"name": "typeorm",
"private": true,
"version": "0.0.3-alpha.18",
"version": "0.0.3-alpha.19",
"description": "Data-mapper ORM for Typescript",
"license": "MIT",
"readmeFilename": "README.md",