Skip to content

Commit

Permalink
feat(cli): Add support for RWJS_CWD and --cwd to TW setup (#11923)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jan 24, 2025
1 parent dc974b5 commit 7ed8f38
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions packages/cli/src/commands/setup/ui/libraries/tailwindcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,18 @@ export const handler = async ({ force, install }) => {
task: async () => {
const yarnVersion = await execa('yarn', ['--version'])
const isYarnV1 = yarnVersion.stdout.trim().startsWith('1')
await execa('yarn', [
'add',
'-D',
...(isYarnV1 ? ['-W'] : []),
...projectPackages,
])
await execa(
'yarn',
[
'add',
'-D',
...(isYarnV1 ? ['-W'] : []),
...projectPackages,
],
{
cwd: rwPaths.base,
},
)
},
},
],
Expand All @@ -160,13 +166,13 @@ export const handler = async ({ force, install }) => {
{
title: `Install ${webWorkspacePackages.join(', ')}`,
task: async () => {
await execa('yarn', [
'workspace',
'web',
'add',
'-D',
...webWorkspacePackages,
])
await execa(
'yarn',
['workspace', 'web', 'add', '-D', ...webWorkspacePackages],
{
cwd: rwPaths.base,
},
)
},
},
],
Expand Down

0 comments on commit 7ed8f38

Please sign in to comment.