mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Patch the modules package.json version
This commit is contained in:
@@ -40,6 +40,7 @@ module.exports = function(grunt) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var updateModulesPackageDef = function(content, srcPath) {
|
var updateModulesPackageDef = function(content, srcPath) {
|
||||||
|
console.log("Patch: " + srcPath);
|
||||||
return updatePackageDef(content, function(contentAsObject) {
|
return updatePackageDef(content, function(contentAsObject) {
|
||||||
contentAsObject.version = localCfg.packageVersion;
|
contentAsObject.version = localCfg.packageVersion;
|
||||||
if (localCfg.commitSHA) {
|
if (localCfg.commitSHA) {
|
||||||
@@ -276,8 +277,9 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
modulesPackageDef: {
|
modulesPackageDef: {
|
||||||
expand: true,
|
expand: true,
|
||||||
src: localCfg.packageJsonFilePath,
|
src: path.basename(localCfg.packageJsonFilePath),
|
||||||
dest: localCfg.outDir + "/",
|
cwd: path.dirname(localCfg.packageJsonFilePath),
|
||||||
|
dest: localCfg.outTnsCoreModules + "/",
|
||||||
options: {
|
options: {
|
||||||
process: updateModulesPackageDef
|
process: updateModulesPackageDef
|
||||||
}
|
}
|
||||||
@@ -724,6 +726,7 @@ module.exports = function(grunt) {
|
|||||||
grunt.registerTask("pack-modules", [
|
grunt.registerTask("pack-modules", [
|
||||||
"compile-modules",
|
"compile-modules",
|
||||||
"node-tests",
|
"node-tests",
|
||||||
|
"copy:modulesPackageDef",
|
||||||
"exec:packModules"
|
"exec:packModules"
|
||||||
]);
|
]);
|
||||||
grunt.registerTask("pack-apps", [
|
grunt.registerTask("pack-apps", [
|
||||||
@@ -752,7 +755,6 @@ module.exports = function(grunt) {
|
|||||||
"check-packagejson-boms",
|
"check-packagejson-boms",
|
||||||
"compile-ts",
|
"compile-ts",
|
||||||
"collect-modules-raw-files",
|
"collect-modules-raw-files",
|
||||||
"copy:modulesPackageDef",
|
|
||||||
"copy:definitionFiles",
|
"copy:definitionFiles",
|
||||||
"copy:jsLibs",
|
"copy:jsLibs",
|
||||||
"generate-tns-core-modules-dts",
|
"generate-tns-core-modules-dts",
|
||||||
|
|||||||
Reference in New Issue
Block a user