Skip to content

Commit

Permalink
fix(gene init): Add missing required deps
Browse files Browse the repository at this point in the history
  • Loading branch information
krzotki committed Nov 12, 2024
1 parent b8ec58d commit 0587e05
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
20 changes: 20 additions & 0 deletions packages/create/bin/create-gene-workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async function runCommands() {

console.log('Installing dependencies with pnpm');

// Install dependencies
await execCommand('pnpm', [
'install',
`@brainly-gene/core@${packageVersion}`,
Expand All @@ -97,6 +98,11 @@ async function runCommands() {
`[email protected]`,
`@tanstack/[email protected]`,
'@nrwl/[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'[email protected]',
'@apollo/[email protected]',
]);

// Install dev dependencies
Expand All @@ -116,6 +122,20 @@ async function runCommands() {
'[email protected]',
'[email protected]',
'@nrwl/[email protected]',
"[email protected]",
"[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]",
"@storybook/[email protected]"
]);

console.log('Generating gene-workspace with pnpm nx');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ export default async function (tree: Tree) {
await generateFiles(tree, joinPathFragments(__dirname, './files'), './', {});

// Update .eslintrc.json
// TODO once eslint plugin will be stablized enable it again
// const eslintJson = tree.read('.eslintrc.json', 'utf-8');
// const updatedEslintJson = eslintJson.replace(
// 'plugin:@nrwl/nx/typescript',
// 'plugin:@brainly-gene/eslint-plugin/basic'
// );
const eslintJson = tree.read('.eslintrc.json', 'utf-8');
const updatedEslintJson = eslintJson
.replace(
'plugin:@nrwl/nx/typescript',
'plugin:@brainly-gene/eslint-plugin/basic'
)
.replace(
'"plugins": ["@nrwl/nx"]',
'"plugins": ["@nrwl/nx", "@brainly-gene"]'
);

// tree.write('.eslintrc.json', updatedEslintJson);
tree.write('.eslintrc.json', updatedEslintJson);

// Update .gitignore to ignore .storybook/assets
const gitignore = tree.read('.gitignore', 'utf-8');
const updatedGitignore = gitignore + '\n.storybook/assets';
tree.write('.gitignore', updatedGitignore);

return () => {
installPackagesTask(tree);
Expand Down

0 comments on commit 0587e05

Please sign in to comment.