<p align="center">
<a href="https://www.toptal.com/developers/gitignore">
<img src="https://yellow-cdn.veclightyear.com/0a4dffa0/2b471bb5-9e99-4c93-b1af-861882d92f09.svg"/>
</a>
<br>
<strong>为您的项目创建有用的 .gitignore 文件</strong>
</p>
<p align="center">
<a href="https://swift.org"><img src="https://yellow-cdn.veclightyear.com/0a4dffa0/f40c20b0-c802-4219-a62a-d36618718c02.svg?style=flat-square"/></a>
<a href="https://travis-ci.org/toptal/gitignore.io"><img src="https://img.shields.io/travis/toptal/gitignore.io/master?style=flat-square" alt="Travis"></a>
<a href="https://codeclimate.com/github/joeblau/gitignore.io/test_coverage"><img src="https://yellow-cdn.veclightyear.com/0a4dffa0/5823d94d-d795-41d8-81ec-772c18528d56.svg?style=flat-square" alt="Code Climate 测试覆盖率"></a>
<a href="https://codeclimate.com/github/joeblau/gitignore.io/maintainability"><img src="https://yellow-cdn.veclightyear.com/0a4dffa0/bc3542fd-8dc5-41d8-b8a1-0b780d4ae301.svg?style=flat-square" alt="Code Climate 可维护性"></a>
<img src="https://yellow-cdn.veclightyear.com/0a4dffa0/6e096ce6-d943-47c0-a4a4-608919390783.svg?style=flat-square"alt="平台">
<a href="https://github.com/joeblau/gitignore.io/blob/master/LICENSE.md"><img src="https://yellow-cdn.veclightyear.com/0a4dffa0/f48849e8-7693-4702-b925-9930e58ca1f0.svg?style=flat-square" alt="许可证"></a>
</p>
关于
.gitignore.io 是一个网络服务,旨在帮助您为 Git 仓库创建 .gitignore 文件。该网站提供了图形界面和命令行方法,可为您的操作系统、编程语言或集成开发环境创建 .gitignore 文件。
.gitignore
模板来源
gitignore.io 的源模板:https://github.com/toptal/gitignore
生成文件的许可证
所有通过 https://www.toptal.com/developers/gitignore 生成的文件均采用 CC0 许可。
文档
完整的 gitignore.io 文档:https://docs.gitignore.io/
Docker 容器
先决条件
构建
生产环境
docker-compose up --build
开发环境
docker-compose -f ./docker-compose-dev.yml build
docker-compose -f ./docker-compose-dev.yml up
这将启动运行在 http://localhost:8080 的 Web 服务器
开发模式将以下目录挂载到 Docker 卷:
LESS 和 CSS
该应用程序使用 LESS 作为 Public/css
文件夹中文件的 CSS 预处理器。
要处理 less 文件,您需要:
- 使用
yarn install
安装所有依赖项
- 使用
yarn build
处理资产
环境变量
请将环境变量设置为 Docker 配置。所有变量都是可选的。
...
services:
app:
...
environment:
HOST_ORIGIN: http://www.example.com
BASE_PREFIX: /foo/bar
GOOGLE_ANALYTICS_UID:
...
...
HOST_ORIGIN
Web 服务器的源,默认为 https://www.toptal.com
HOST_ORIGIN: http://www.example.com
BASE_PREFIX
如果您想在子目录下托管此 Web 服务器(例如 http://www.example.com/foo/bar),请设置此变量。
BASE_PREFIX: /foo/bar
GOOGLE_ANALYTICS_UID
Google Tag Manager 代码片段的用户 ID
GOOGLE_ANALYTICS_UID: UA-XXXXXXXX-X
E2E 测试
测试位于 e2e-tests
文件夹中:
先决条件:
运行:
- 设置 BASE_URL 环境变量(仅在更改默认 URL 或端口时)
- docker-compose up --build --detach
- yarn gitupdate
- yarn install
- yarn build
- yarn test
- docker-compose stop