gign 0.0.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Antonio Carlos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,175 @@
1
- # GIGN
2
-
3
- [![NPM Version](https://img.shields.io/npm/v/gign.svg)](https://npmjs.org/package/gign)
4
- [![NPM Downloads](https://img.shields.io/npm/dm/gign.svg)](https://npmjs.org/package/gign)
5
- [![GitHub issues](https://img.shields.io/github/issues/juninmd/gign.svg)](https://github.com/juninmd/gign/issues)
6
- [![GitHub forks](https://img.shields.io/github/forks/juninmd/gign.svg)](https://github.com/juninmd/gign/network)
7
-
8
- ```
9
- ________.__
10
- / _____/|__| ____ ____
11
- / \ ___| |/ ___\ / \
12
- \ \_\ \ / /_/ > | \
13
- \______ /__\___ /|___| /
14
- \/ /_____/ \/
15
-
16
- ```
17
- - `gign` generate a automatic `.gitignore` file for your project.
18
-
19
- ## Requisites
20
- - Node 8 `for(Await/Async)`
21
-
22
- ## How to Install?
23
- ```bash
24
- $ yarn global add gign
25
- ```
26
-
27
- ## How to use?
28
-
29
- ```bash
30
- $ gign <path>
31
- ```
32
-
33
- ## Thanks
34
- We use the gitignore.io api
35
- http://gitignore.io/
36
-
37
- ## Beta Suport
38
- * Windows, Linux and Mac
39
- * Node JS
40
- * Typescript
41
-
42
- ## Help Gign
43
- You can help to improve the tool!
44
- Include one new pattern on `pattern.json` or `manual.json`
45
- I will wait for your P.R. ;D
1
+ <div align="center">
2
+
3
+ ```
4
+ ________.__
5
+ / _____/|__| ____ ____
6
+ / \ ___| |/ ___\ / \
7
+ \ \_\ \ / /_/ > | \
8
+ \______ /__\___ /|___| /
9
+ \/ /_____/ \/
10
+ ```
11
+
12
+ # gign
13
+
14
+ ### ⚡ Gerador inteligente, offline e automático de `.gitignore` para qualquer projeto
15
+
16
+ [![npm version](https://img.shields.io/npm/v/gign.svg?style=flat-square&color=cb3837&logo=npm)](https://www.npmjs.com/package/gign)
17
+ [![npm downloads](https://img.shields.io/npm/dm/gign.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/gign)
18
+ [![GitHub release](https://img.shields.io/github/v/release/juninmd/gign?style=flat-square&color=success)](https://github.com/juninmd/gign/releases)
19
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg?style=flat-square&logo=node.js)](https://nodejs.org/)
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
21
+ [![codecov](https://img.shields.io/codecov/c/github/juninmd/gign/master?style=flat-square&logo=codecov)](https://codecov.io/gh/juninmd/gign)
22
+
23
+ <p>
24
+ <a href="#-recursos">Recursos</a> •
25
+ <a href="#-instalação">Instalação</a> •
26
+ <a href="#-uso">Uso</a> •
27
+ <a href="#-como-funciona">Como funciona</a> •
28
+ <a href="#-stacks-suportadas">Stacks</a> •
29
+ <a href="#-automação--deploy">Deploy</a> •
30
+ <a href="#-desenvolvimento">Desenvolvimento</a> •
31
+ <a href="#-licença">Licença</a>
32
+ </p>
33
+
34
+ </div>
35
+
36
+ ---
37
+
38
+ ## 💡 O que é o gign?
39
+
40
+ O **gign** inspeciona a estrutura do seu projeto, detecta o sistema operacional e todas as linguagens, frameworks e ferramentas em uso (Node.js, TypeScript, Python, Docker, Rust, Go, VS Code, JetBrains, e muito mais) e gera um `.gitignore` sob medida, **deduplicado** e **100% offline**, sem chamadas a APIs externas.
41
+
42
+ Inspirado pelo clássico [gitignore.io](https://www.toptal.com/developers/gitignore), mas totalmente autocontido.
43
+
44
+ ---
45
+
46
+ ## ✨ Recursos
47
+
48
+ | | Recurso | Descrição |
49
+ | --- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
50
+ | 🚀 | **Offline e instantâneo** | Templates oficiais de [`github/gitignore`](https://github.com/github/gitignore) embutidos no pacote. Zero chamadas de rede. |
51
+ | 🔍 | **Detecção automática** | Mapeia arquivos de configuração, lockfiles e diretórios para identificar tecnologias. |
52
+ | 🖥️ | **Sensível ao sistema** | Inclui automaticamente as regras do SO atual (`.DS_Store`, `Thumbs.db`, etc.). |
53
+ | 🧹 | **Deduplicação inteligente** | Mescla múltiplos templates sem repetir regras. |
54
+ | 📦 | **Sem dependências em runtime** | Distribuído como um único bundle minificado via `esbuild`. |
55
+ | 🔐 | **Proveniência npm** | Publicação com assinatura criptográfica via OIDC no GitHub Actions. |
56
+
57
+ ---
58
+
59
+ ## 🚀 Instalação
60
+
61
+ ### Execução direta (sem instalar)
62
+
63
+ ```bash
64
+ npx gign .
65
+ ```
66
+
67
+ ### Instalação global
68
+
69
+ ```bash
70
+ npm install -g gign # npm
71
+ pnpm add -g gign # pnpm
72
+ yarn global add gign # yarn
73
+ bun add -g gign # bun
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 📖 Uso
79
+
80
+ ```bash
81
+ # No diretório atual
82
+ gign .
83
+
84
+ # Em um diretório específico
85
+ gign ./meu-projeto
86
+ ```
87
+
88
+ Exemplo de saída:
89
+
90
+ ```text
91
+ [gign] generated at /workspace/meu-projeto/.gitignore
92
+ [gign] tags: macos,node,react,typescript,visualstudiocode
93
+ [gign] manual tags: jest,prettier,typescript,vite
94
+ ```
95
+
96
+ O arquivo gerado já vem organizado por seções, pronto para ser versionado. ✅
97
+
98
+ ---
99
+
100
+ ## 🧠 Como funciona
101
+
102
+ ```mermaid
103
+ flowchart LR
104
+ A["📁 Projeto"] --> B["🔎 Scanner de padrões"]
105
+ B --> C["🧩 Tags & SO"]
106
+ C --> D["⚡ Deduplicação + regras"]
107
+ D --> E["📄 .gitignore"]
108
+ ```
109
+
110
+ 1. **Varredura:** analisa arquivos-chave como `package.json`, `Cargo.toml`, `go.mod` e `requirements.txt`.
111
+ 2. **Resolução de tags:** identifica o SO host e cruza arquivos e extensões com `pattern.json` e `manual.json`.
112
+ 3. **Composição:** carrega os templates de `src/data/templates.json`, adiciona as regras manuais e remove duplicatas linha a linha.
113
+ 4. **Gravação:** salva o `.gitignore` final no diretório alvo.
114
+
115
+ ---
116
+
117
+ ## 🛠️ Stacks suportadas
118
+
119
+ Mais de **250 ecossistemas** são suportados nativamente.
120
+
121
+ <details>
122
+ <summary><b>Ver as principais tecnologias detectadas</b></summary>
123
+
124
+ <br>
125
+
126
+ - **Linguagens:** TypeScript, JavaScript, Python, Go, Rust, Java, Kotlin, C/C++, C#, Ruby, PHP, Swift, Dart, Elixir, Scala, Lua, Zig
127
+ - **Frontend & meta-frameworks:** React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Astro, Remix, Angular, Vite, Gatsby
128
+ - **Backend & runtimes:** Node.js, Bun, Deno, NestJS, Express, Fastify, Django, Flask, FastAPI, Laravel, Spring Boot
129
+ - **Infraestrutura & DevOps:** Docker, Kubernetes, Terraform, Helm, Serverless, AWS CDK, Pulumi, Cloudflare Workers
130
+ - **IDEs & editores:** Visual Studio Code, JetBrains (IntelliJ, WebStorm, PyCharm, CLion, Rider, GoLand), Xcode, Sublime Text, Vim
131
+ - **Testes & qualidade:** Jest, Vitest, Playwright, Cypress, ESLint, Prettier, Biome, Ruff, Coverage
132
+
133
+ </details>
134
+
135
+ ---
136
+
137
+ ## 🔄 Automação & deploy
138
+
139
+ Entregas totalmente automatizadas:
140
+
141
+ - **Conventional Commits:** `feat:`, `fix:`, `perf:` e `BREAKING CHANGE` definem o bump de versão (minor, patch ou major).
142
+ - **semantic-release:** analisa os commits, calcula a próxima versão e gera tags e notas de release, sem aprovação manual.
143
+ - **Publicação no npm:** a cada push em `master`, o GitHub Actions valida testes e lint, compila o bundle e publica no [npm](https://www.npmjs.com/package/gign) com **proveniência**.
144
+
145
+ ---
146
+
147
+ ## 💻 Desenvolvimento
148
+
149
+ ```bash
150
+ git clone https://github.com/juninmd/gign.git
151
+ cd gign
152
+ npm ci
153
+
154
+ npm test # suíte de testes (Jest)
155
+ npm run test:coverage # testes com cobertura
156
+ npm run lint # ESLint
157
+ npm run format # Prettier (escrita)
158
+ npm run format:check # Prettier (checagem)
159
+ npm run build # bundle de produção em dist/
160
+ npm run sync:templates # atualiza templates a partir de github/gitignore
161
+ ```
162
+
163
+ Veja [CONTRIBUTING.md](CONTRIBUTING.md) para as diretrizes de contribuição.
164
+
165
+ ---
166
+
167
+ ## 📄 Licença
168
+
169
+ Distribuído sob a licença [MIT](LICENSE).
170
+
171
+ <div align="center">
172
+
173
+ Feito com ☕ por [Antonio Carlos](https://github.com/juninmd)
174
+
175
+ </div>