Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added gitignore file in init #890

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 16 additions & 0 deletions src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,21 @@ async function generatePrettierConfig(options: Options): Promise<void> {
return generateConfigFile(options, './.prettierrc.js', style);
}

async function generateGitIngore(options: Options): Promise<void> {
const config = `.DS_Store
.nyc_output
.vscode
build
coverage
node_modules
npm-debug.log
yarn-error.log
yarn.lock
__pycache__
`;
return generateConfigFile(options, './.gitignore', config);
}

async function generateEditorConfig(options: Options): Promise<void> {
const config = `root = true

Expand Down Expand Up @@ -337,6 +352,7 @@ export async function init(options: Options): Promise<boolean> {
generateESLintIgnore(options),
generatePrettierConfig(options),
generateEditorConfig(options),
generateGitIngore(options),
]);
await installDefaultTemplate(options);

Expand Down