Skip to content

Commit

Permalink
updated gitignore creation for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
JC-Coder committed Mar 10, 2024
1 parent e8964d7 commit 0d21d09
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
29 changes: 29 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-js:latest
1 change: 1 addition & 0 deletions src/utils/create-backend-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export async function createBackendProject(
shell.cd("-");
}
}

addGitignore(framework, destinationPath);

// process dependencies install
Expand Down
5 changes: 4 additions & 1 deletion src/utils/file-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,13 @@ export const getTemplateDir = (filePath) => {
export function addGitignore(type, destination) {
const templateDir = getTemplateDir("gitignores");
const gitignoreDestination = `${destination}/.gitignore`;

if (["reactjs", "vuejs"].includes(type)) {
type = "frontend";
type = "nextjs";
}

const gitignoreSource = `${templateDir}/${type}`;

fs.createFileSync(gitignoreDestination);
fs.copyFileSync(gitignoreSource, gitignoreDestination);
}
39 changes: 39 additions & 0 deletions templates/gitignores/nestjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# compiled output
/dist
/node_modules

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

dump.rdb
.env
access.log

0 comments on commit 0d21d09

Please sign in to comment.