Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading