gitmyhub

gitignore.io

Swift ★ 8.7k updated 1y ago

Create useful .gitignore files for your project

The source code for gitignore.io, a web service that generates ready-made .gitignore files for any combination of operating system, programming language, and editor.

SwiftVaporDockerNode.jssetup: easycomplexity 3/5

This is the source code for gitignore.io, a web service that generates .gitignore files for software projects. A .gitignore file tells Git which files to leave untracked in a repository, such as temporary build outputs, editor settings, or operating system metadata. The service is publicly hosted by Toptal at toptal.com/developers/gitignore, where you can pick your operating system, programming language, and editor to get a ready-made file.

The web server is written in Swift using the Vapor framework, which is a server-side Swift web framework designed to run on Linux and macOS. This is the application layer of the service: it handles requests, looks up the appropriate templates, and returns the generated content. The actual template files (the raw text patterns for each language and tool) live in a separate repository.

You can run your own instance of the service locally using Docker. The repository includes Docker Compose files for both development and production modes. A development mode setup mounts the public assets and resource directories so changes are picked up without rebuilding the container. The development server starts at http://localhost:8080.

The project also includes end-to-end tests covering both API responses and browser behavior, using Node.js-based tools. Generated .gitignore files are released under CC0, meaning they are in the public domain and carry no usage restrictions. Configuration options let you set a custom host origin, a URL subdirectory prefix, and a Google Analytics tag if you want to deploy your own branded instance.

Where it fits