chore: add a script to produce a packed tgz of the module (#8110)

This makes it easier to install custom builds in local projects
This commit is contained in:
Joe Flateau 2021-11-06 09:16:49 -04:00 committed by GitHub
parent 1649882d33
commit 6929ae3e44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -116,6 +116,17 @@ export class Gulpfile {
"cd ./build/package && npm publish"
]));
}
/**
* Packs a .tgz from ./build/package directory.
*/
@Task()
packagePack() {
return gulp.src("package.json", { read: false })
.pipe(shell([
"cd ./build/package && npm pack && mv -f typeorm-*.tgz .."
]));
}
/**
* Publishes a package to npm from ./build/package directory with @next tag.
@ -230,6 +241,14 @@ export class Gulpfile {
];
}
/**
* Creates a package .tgz
*/
@SequenceTask()
pack() {
return ["package", "packagePack"];
}
/**
* Creates a package and publishes it to npm.
*/

View File

@ -208,6 +208,7 @@
"compile": "rimraf ./build && tsc",
"watch": "./node_modules/.bin/tsc -w",
"package": "gulp package",
"pack": "gulp pack",
"lint": "eslint -c ./.eslintrc.js src/**/*.ts test/**/*.ts sample/**/*.ts",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},