mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed systemjs build, removed duplicate import
This commit is contained in:
parent
b711c71358
commit
50a3f2db1c
21
gulpfile.ts
21
gulpfile.ts
@ -62,7 +62,8 @@ export class Gulpfile {
|
||||
"!./src/typeorm-model-shim.ts",
|
||||
"!./src/platform/PlatformTools.ts"
|
||||
])
|
||||
.pipe(gulp.dest("./build/browser"));
|
||||
.pipe(gulp.dest("./build/systemjs/typeorm"))
|
||||
.pipe(gulp.dest("./build/browser"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,7 +73,7 @@ export class Gulpfile {
|
||||
browserCopyMainBrowserFile() {
|
||||
return gulp.src("./package.json", { read: false })
|
||||
.pipe(file("typeorm.ts", `export * from "./typeorm/index";`))
|
||||
.pipe(gulp.dest("./build/browser"));
|
||||
.pipe(gulp.dest("./build/systemjs"));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,6 +83,7 @@ export class Gulpfile {
|
||||
browserCopyPlatformTools() {
|
||||
return gulp.src("./src/platform/BrowserPlatformTools.template")
|
||||
.pipe(rename("PlatformTools.ts"))
|
||||
.pipe(gulp.dest("./build/systemjs/typeorm/platform"))
|
||||
.pipe(gulp.dest("./build/browser/platform"));
|
||||
}
|
||||
|
||||
@ -96,12 +98,11 @@ export class Gulpfile {
|
||||
"lib": ["es5", "es6", "dom"],
|
||||
typescript: require("typescript")
|
||||
});
|
||||
const tsResult = gulp.src(["./build/browser/**/*.ts", "./node_modules/reflect-metadata/**/*.d.ts", "./node_modules/@types/**/*.ts"])
|
||||
const tsResult = gulp.src(["./build/systemjs/**/*.ts", "./node_modules/reflect-metadata/**/*.d.ts", "./node_modules/@types/**/*.ts"])
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(tsProject());
|
||||
|
||||
return [
|
||||
// tsResult.dts.pipe(gulp.dest("./build/package")),
|
||||
tsResult.js
|
||||
.pipe(sourcemaps.write(".", { sourceRoot: "", includeContent: true }))
|
||||
.pipe(gulp.dest("./build/browser"))
|
||||
@ -120,7 +121,6 @@ export class Gulpfile {
|
||||
.pipe(tsProject());
|
||||
|
||||
return [
|
||||
// tsResult.dts.pipe(gulp.dest("./build/package")),
|
||||
tsResult.js
|
||||
.pipe(sourcemaps.write(".", { sourceRoot: "", includeContent: true }))
|
||||
.pipe(gulp.dest("./build/browser"))
|
||||
@ -138,6 +138,13 @@ export class Gulpfile {
|
||||
.pipe(gulp.dest("./build/browser"));
|
||||
}
|
||||
|
||||
@Task()
|
||||
browserClearPackageDirectory(cb: Function) {
|
||||
return del([
|
||||
"./build/systemjs/**"
|
||||
])
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Main Packaging and Publishing tasks
|
||||
// -------------------------------------------------------------------------
|
||||
@ -220,6 +227,7 @@ export class Gulpfile {
|
||||
return gulp.src("./package.json")
|
||||
.pipe(replace("\"private\": true,", "\"private\": false,"))
|
||||
.pipe(gulp.dest("./build/package"))
|
||||
.pipe(replace("\"name\": \"typeorm\",", "\"name\": \"typeorm-browser\","))
|
||||
.pipe(gulp.dest("./build/browser"));
|
||||
}
|
||||
|
||||
@ -250,10 +258,11 @@ export class Gulpfile {
|
||||
package() {
|
||||
return [
|
||||
"clean",
|
||||
["browserCopySources", "browserCopyPlatformTools"],
|
||||
["browserCopySources", "browserCopyPlatformTools", "browserCopyMainBrowserFile"],
|
||||
["packageCompile", "browserCompile", "browserCompileSystemJS"],
|
||||
["packageMoveCompiledFiles", "browserUglify"],
|
||||
[
|
||||
"browserClearPackageDirectory",
|
||||
"packageClearPackageDirectory",
|
||||
"packageReplaceReferences",
|
||||
"packagePreparePackageFile",
|
||||
|
||||
@ -60,7 +60,6 @@ export * from "./decorator/entity/ClassEntityChild";
|
||||
export * from "./decorator/entity/ClosureEntity";
|
||||
export * from "./decorator/entity/EmbeddableEntity";
|
||||
export * from "./decorator/entity/SingleEntityChild";
|
||||
export * from "./decorator/entity/Entity";
|
||||
export * from "./decorator/entity/TableInheritance";
|
||||
export * from "./decorator/transaction/Transaction";
|
||||
export * from "./decorator/transaction/TransactionManager";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user