Skip to content

Commit

Permalink
refactor: change version to componentSetVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanBetty committed Jan 26, 2023
1 parent 820feb8 commit 71f2037
Show file tree
Hide file tree
Showing 3 changed files with 5,636 additions and 5,466 deletions.
32 changes: 2 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/bb-components-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ const rootDir: string = parseDir(args);
const distDir = `${rootDir}/dist`;
const enableNewTranspile = !!options.transpile;

function getVersion() {
const rawPackageJsonFile = readFileSync('./package.json').toString();
function getComponentSetVersion() {
const rawPackageJsonFile = readFileSync(`${rootDir}/package.json`).toString();
const parsedPackageJsonFile = JSON.parse(rawPackageJsonFile);

return parsedPackageJsonFile.version;
}

Expand Down Expand Up @@ -404,7 +405,7 @@ void (async (): Promise<void> => {
const componentsWithVersion = components.map((component) => {
return {
...component,
version: getVersion(),
componentSetVersion: getComponentSetVersion(),
};
});

Expand Down
Loading

0 comments on commit 71f2037

Please sign in to comment.