Skip to content

Commit

Permalink
fixed cli e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
shairez committed Nov 13, 2024
1 parent 8953ab8 commit 6e6a8b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"release": "pnpm release.prepare && pnpm release.setroot && pnpm release.publish && pnpm release.resetroot",
"release.publish": "changeset publish",
"release.resetroot": "cp dist/pnpm-workspace.yaml pnpm-workspace.yaml",
"release.e2e": "pnpm release.prepare && pnpm release.setroot && pnpm -r exec pnpm version patch && pnpm -r publish --tag e2e --no-git-checks && pnpm release.resetroot",
"release.e2e": "pnpm release.prepare && pnpm release.setroot && pnpm -r exec pnpm version patch && pnpm -r exec pnpm publish --tag e2e --no-git-checks && pnpm release.resetroot",
"test.cli": "NODE_OPTIONS=--experimental-vm-modules nx test cli",
"test.cli.e2e": "nx e2e cli-e2e",
"test.headless": "nx component-test headless --skip-nx-cache",
"test.visual.headless": "nx visual-test headless",
"test.pw.headless": "nx e2e headless",
Expand Down Expand Up @@ -147,7 +148,7 @@
"includedScripts": []
},
"volta": {
"node": "20.9.0",
"node": "22.7.0",
"pnpm": "9.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/cli-e2e/src/cli.smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Qwik UI CLI Smoke test', () => {

it('should be installed and add the button file', () => {
execSync(
'npx -y qwik-ui@e2e init --e2e --projectRoot / --uiComponentsPath "src/components/ui" --rootCssPath "src/global.css" --installTailwind --style "simple" --components=button',
'npx -y qwik-ui@e2e init --e2e --projectRoot ./ --uiComponentsPath "src/components/ui" --rootCssPath "src/global.css" --installTailwind --style "simple" --components=button',
{
cwd: projectDirectory,
env: process.env,
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function handleInit() {

if (installTailwind) {
execSync(
`${getPackageManagerCommand().exec} qwik add tailwind --skipConfirmation=true`,
`${getPackageManagerCommand().exec} qwik add tailwind --skipConfirmation=true --projectDir=${config.projectRoot}`,
{
stdio: 'inherit',
cwd: config.projectRoot,
Expand Down Expand Up @@ -432,9 +432,9 @@ Options: [${possibleComponentNames.join(', ')}]`,
coerce: (components) => componentTypesFromString(components),
})
.option('projectRoot', {
description: 'The root of the project (default: "/")',
description: 'The root of the project (default: "./")',
type: 'string',
default: '/',
default: './',
}),
handler: () => {},
};
Expand All @@ -450,8 +450,8 @@ Options: [${possibleComponentNames.join(', ')}]`,
if (!projectRoot && !args['projectRoot']) {
projectRoot = cancelable(
await text({
message: cyan('Specify the root of the project (leave empty for "/")'),
initialValue: '/',
message: cyan('Specify the root of the project (leave empty for "./")'),
initialValue: './',
}),
);
}
Expand Down

0 comments on commit 6e6a8b1

Please sign in to comment.