@smapiot/pilet-template-angular 0.15.0-beta.4440 → 0.15.0-beta.4515

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +6 -5
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -1032,11 +1032,12 @@ var require_utils2 = __commonJS({
1032
1032
  var path_1 = require("path");
1033
1033
  var fs_1 = require("fs");
1034
1034
  var log_1 = require_log();
1035
- function getPackageJsonWithSource(targetDir, fileName) {
1036
- const path = path_1.posix.join(targetDir, fileName);
1037
- (0, log_1.log)("verbose", `Adding 'source' to package.json "${path}" ...`);
1035
+ function getPackageJsonWithSource(root2, targetDir, fileName) {
1036
+ const absPath = path_1.posix.join(targetDir, fileName);
1037
+ const path = (0, path_1.isAbsolute)(absPath) ? (0, path_1.relative)(root2, absPath) : absPath;
1038
+ (0, log_1.log)("verbose", `Adding "source" to package.json: "${path}"`);
1038
1039
  return Promise.resolve({
1039
- content: Buffer.from(`{"source":${JSON.stringify(path)}}`, "utf8"),
1040
+ content: Buffer.from(`{"source": ${JSON.stringify(path)}}`, "utf8"),
1040
1041
  path: "package.json"
1041
1042
  });
1042
1043
  }
@@ -1162,7 +1163,7 @@ var require_factory = __commonJS({
1162
1163
  });
1163
1164
  return Promise.all([
1164
1165
  ...sources.map((source) => (0, template_1.getFileFromTemplate)(sourceDir, source, data)),
1165
- (0, utils_1.getPackageJsonWithSource)(data.src, `index${data.extension}`)
1166
+ (0, utils_1.getPackageJsonWithSource)(data.projectRoot, data.src, `index${data.extension}`)
1166
1167
  ]);
1167
1168
  };
1168
1169
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/pilet-template-angular",
3
- "version": "0.15.0-beta.4440",
3
+ "version": "0.15.0-beta.4515",
4
4
  "description": "Official scaffolding template for pilets: 'angular'.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -54,7 +54,7 @@
54
54
  "test": "echo \"Error: run tests from root\" && exit 1"
55
55
  },
56
56
  "devDependencies": {
57
- "@smapiot/template-utils": "0.15.0-beta.4440"
57
+ "@smapiot/template-utils": "0.15.0-beta.4515"
58
58
  },
59
- "gitHead": "996f5885e2f799c182bde89a8971381ae6f7b19f"
59
+ "gitHead": "e19408c0e1a505504a51f0845abe2349ade73c2d"
60
60
  }