Skip to content

Commit

Permalink
fix(cli): use getPackageVersion for create-atomic-component-project (#…
Browse files Browse the repository at this point in the history
…1293)

<!-- For Coveo Employees only. Fill this section.

CDX-1433

-->

## Proposed changes

Same as #1292 for another package.

## Testing
Same as #1292, but with lib

- UT
- Manual
  • Loading branch information
louis-bompart authored May 1, 2023
1 parent f23c4eb commit b045bfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ exports[`createAtomicProject createAtomicLib() calls \`npx @coveo/create-atomic-
"npm",
[
"init",
"@coveo/atomic-component-project",
"@coveo/atomic-component-project@1.2.3",
],
{
"cwd": "kewlProject",
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/core/src/lib/atomic/createAtomicProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export function createAtomicLib(options: CreateLibOptions) {
mkdirSync(projectDirectory);
const cliArgs = [
'init',
transformPackageNameToNpmInitializer(atomicLibInitializerPackage),
`${transformPackageNameToNpmInitializer(
atomicLibInitializerPackage
)}@${getPackageVersion(atomicAppInitializerPackage)}`,
];
return spawnProcess(appendCmdIfWindows`npm`, cliArgs, {
cwd: projectDirectory,
Expand Down

0 comments on commit b045bfe

Please sign in to comment.