├── .eslintrc ├── .gitignore ├── .gitmodules ├── .npmignore ├── .prettierrc ├── AUTHORS ├── ChangeLog ├── LICENSE ├── README.md ├── bin └── gig ├── config.js ├── contrib └── git-bash-ext │ ├── CHANGES.txt │ ├── README.md │ ├── contrib │ └── installer.sh │ ├── git-ign │ ├── git-ignore │ ├── git-ignore-add │ ├── git-ignore-apply │ ├── git-ignore-env │ ├── git-ignore-init │ ├── git-ignore-list │ └── git-ignore-update ├── lib ├── gig.js └── gig │ ├── command.js │ ├── gen.js │ ├── help.js │ ├── init.js │ ├── option.js │ ├── pkg.js │ ├── show.js │ └── template.js ├── package-lock.json ├── package.json └── screenshot.jpg /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "quotes": ["error", "single"], 4 | "max-len": ["error", { "code": 120 }], 5 | "operator-linebreak": ["error", "before"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### intellij ### 2 | *.iml 3 | *.ipr 4 | *.iws 5 | .idea/ 6 | 7 | ### sublimetext ### 8 | # SublimeText project files 9 | *.sublime-workspace 10 | 11 | ### osx ### 12 | .DS_Store 13 | .AppleDouble 14 | .LSOverride 15 | Icon 16 | 17 | 18 | # Thumbnails 19 | ._* 20 | 21 | # Files that might appear on external disk 22 | .Spotlight-V100 23 | .Trashes 24 | 25 | ### java ### 26 | *.class 27 | 28 | # Package Files # 29 | *.jar 30 | *.war 31 | *.ear 32 | 33 | ### java ### 34 | *.class 35 | 36 | # Package Files # 37 | *.jar 38 | *.war 39 | *.ear 40 | 41 | ### nodejs ### 42 | ### node ### 43 | # Logs 44 | logs 45 | *.log 46 | 47 | # Runtime data 48 | pids 49 | *.pid 50 | *.seed 51 | 52 | # Directory for instrumented libs generated by jscoverage/JSCover 53 | lib-cov 54 | 55 | # Coverage directory used by tools like istanbul 56 | coverage 57 | 58 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 59 | .grunt 60 | 61 | # node-waf configuration 62 | .lock-wscript 63 | 64 | # Compiled binary addons (http://nodejs.org/api/addons.html) 65 | build/Release 66 | 67 | # Dependency directory 68 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 69 | node_modules 70 | 71 | ### windows ### 72 | # Windows image file caches 73 | Thumbs.db 74 | ehthumbs.db 75 | 76 | # Folder config file 77 | Desktop.ini 78 | 79 | # Recycle Bin used on file shares 80 | $RECYCLE.BIN/ 81 | 82 | # Windows Installer files 83 | *.cab 84 | *.msi 85 | *.msm 86 | *.msp 87 | 88 | # Windows shortcuts 89 | *.lnk 90 | 91 | ### osx ### 92 | .DS_Store 93 | .AppleDouble 94 | .LSOverride 95 | 96 | # Icon must end with two \r 97 | Icon 98 | 99 | # Thumbnails 100 | ._* 101 | 102 | # Files that might appear in the root of a volume 103 | .DocumentRevisions-V100 104 | .fseventsd 105 | .Spotlight-V100 106 | .TemporaryItems 107 | .Trashes 108 | .VolumeIcon.icns 109 | 110 | # Directories potentially created on remote AFP share 111 | .AppleDB 112 | .AppleDesktop 113 | Network Trash Folder 114 | Temporary Items 115 | .apdisk 116 | 117 | ### linux ### 118 | *~ 119 | 120 | # KDE directory preferences 121 | .directory 122 | 123 | # Linux trash folder which might appear on any partition or disk 124 | .Trash-* 125 | 126 | ### sublimetext ### 127 | # cache files for sublime text 128 | *.tmlanguage.cache 129 | *.tmPreferences.cache 130 | *.stTheme.cache 131 | 132 | # workspace files are user-specific 133 | *.sublime-workspace 134 | 135 | # project files should be checked into the repository, unless a significant 136 | # proportion of contributors will probably not be using SublimeText 137 | # *.sublime-project 138 | 139 | # sftp configuration file 140 | sftp-config.json 141 | 142 | ### vim ### 143 | [._]*.s[a-w][a-z] 144 | [._]s[a-w][a-z] 145 | *.un~ 146 | Session.vim 147 | .netrwhist 148 | *~ 149 | 150 | ### jetbrains ### 151 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 152 | 153 | *.iml 154 | 155 | ## Directory-based project format: 156 | .idea/ 157 | # if you remove the above rule, at least ignore the following: 158 | 159 | # User-specific stuff: 160 | # .idea/workspace.xml 161 | # .idea/tasks.xml 162 | # .idea/dictionaries 163 | 164 | # Sensitive or high-churn files: 165 | # .idea/dataSources.ids 166 | # .idea/dataSources.xml 167 | # .idea/sqlDataSources.xml 168 | # .idea/dynamic.xml 169 | # .idea/uiDesigner.xml 170 | 171 | # Gradle: 172 | # .idea/gradle.xml 173 | # .idea/libraries 174 | 175 | # Mongo Explorer plugin: 176 | # .idea/mongoSettings.xml 177 | 178 | ## File-based project format: 179 | *.ipr 180 | *.iws 181 | 182 | ## Plugin-specific files: 183 | 184 | # IntelliJ 185 | /out/ 186 | 187 | # mpeltonen/sbt-idea plugin 188 | .idea_modules/ 189 | 190 | # JIRA plugin 191 | atlassian-ide-plugin.xml 192 | 193 | # Crashlytics plugin (for Android Studio and IntelliJ) 194 | com_crashlytics_export_strings.xml 195 | crashlytics.properties 196 | crashlytics-build.properties 197 | 198 | ### yeoman ### 199 | node_modules/ 200 | bower_components/ 201 | *.log 202 | 203 | build/ 204 | dist/ 205 | 206 | 207 | ### node ### 208 | # Logs 209 | logs 210 | *.log 211 | npm-debug.log* 212 | 213 | # Runtime data 214 | pids 215 | *.pid 216 | *.seed 217 | *.pid.lock 218 | 219 | # Directory for instrumented libs generated by jscoverage/JSCover 220 | lib-cov 221 | 222 | # Coverage directory used by tools like istanbul 223 | coverage 224 | 225 | # nyc test coverage 226 | .nyc_output 227 | 228 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 229 | .grunt 230 | 231 | # node-waf configuration 232 | .lock-wscript 233 | 234 | # Compiled binary addons (http://nodejs.org/api/addons.html) 235 | build/Release 236 | 237 | # Dependency directories 238 | node_modules 239 | jspm_packages 240 | 241 | # Optional npm cache directory 242 | .npm 243 | 244 | # Optional eslint cache 245 | .eslintcache 246 | 247 | # Optional REPL history 248 | .node_repl_history 249 | 250 | # Output of 'npm pack' 251 | *.tgz 252 | 253 | # Yarn Integrity file 254 | .yarn-integrity 255 | 256 | 257 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "gitignore"] 2 | path = gitignore 3 | url = https://github.com/github/gitignore.git 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | *.swp 3 | .idea 4 | *.iml 5 | npm-debug.log 6 | .DS_Store 7 | docs/ 8 | examples/ 9 | contrib/ -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "es5" 4 | } 5 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Authors ordered by first contribution. 2 | 3 | # Active committers 4 | insanehong 5 | Daegeun Kim 6 | 7 | # Contributors 8 | Redface 9 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | # ChangeLog 2 | 3 | ## v1.1.5 - 2019. 01. 06(GTM+09) 4 | - fixed: search template files with recursive-search 5 | 6 | ## v1.1.3 - 2019. 01. 05(GMT+09) 7 | - Updateh gitinore template form ttps://github.com/github/gitignore 8 | 9 | ## v1.1.1 - 2018. 07. 19(GMT+09) 10 | - Update gitignore template from https://github.com/github/gitignore 11 | 12 | ## v1.1.0 - 2017. 01. 04 (GMT+09) 13 | - Remove npm_modules directory 14 | - add ignore patterns for nodejs in .gitignore file 15 | 16 | ## v1.0.1 - 2017. 01. 02 (GMT+09) 17 | - Update gitignore template from https://github.com/github/gitignore 18 | - Used version info from package.json in config.js 19 | 20 | ## v1.0.0 - 2015.12.03 (GMT+09) 21 | - Update gitignore template from https://github.com/github/gitignore 22 | - update npm dependency 23 | 24 | ## v0.2.5 - 2015.04.08 (GMT+09) 25 | - Update README.md 26 | - Change help messages 27 | - Auto sort template list alphabetically 28 | 29 | +## v0.2.4 - 2015. 03. 31 (GMT+09) 30 | - Update gitignore template from https://github.com/github/gitignore 31 | - Update npm dependency 32 | 33 | ## v0.2.3 - 2014. 11. 12 (GMT+09) 34 | - Update gitignore template from https://github.com/github/gitignore 35 | 36 | ## v0.2.2 - 2014. 10. 03 (GMT+09) 37 | - Update gitignore template from https://github.com/github/gitignore 38 | 39 | ## v0.2.1 - 2014. 09. 02 (GMT+09) 40 | - Update gitignore template from https://github.com/github/gitignore 41 | 42 | ## v0.2.0 - 2014. 8. 22 (GMT+09) 43 | 44 | - Update gitignore template from https://github.com/github/gitignore 45 | 46 | ## v0.1.17 - 2014. 6. 16 (GMT+09) 47 | 48 | - modify help message for templete option 49 | 50 | ## v0.1.14 - 2013.06.07 (GMT+09) 51 | 52 | * Change custom template save directory 53 | * gig/gitignore -> ${HOME}/.gig 54 | * add Defendency module : mkdirp 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Insanehong and other gig contributors 2 | 3 | Contributors : 4 | dgkim84 @GeekDani 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining 7 | a copy of this software and associated documentation files (the 8 | "Software"), to deal in the Software without restriction, including 9 | without limitation the rights to use, copy, modify, merge, publish, 10 | distribute, sublicense, and/or sell copies of the Software, and to 11 | permit persons to whom the Software is furnished to do so, subject to 12 | the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 21 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 22 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 23 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gig 2 | 3 | gig helps you create a new `.gitignore` files for your git project. 4 | 5 | ## contrib 6 | * [Git bash extension - git ignore](https://github.com/hackrslab/gig/tree/master/contrib/git-bash-ext) 7 | 8 | ## install 9 | 10 | ``` 11 | npm install -g gig 12 | ``` 13 | 14 | ## update 15 | 16 | ``` 17 | npm update -g gig 18 | ``` 19 | 20 | ## usage 21 | 22 | ### generate .gitignore file 23 | 24 | generate a `.gitignore` file for your git project 25 | 26 | ``` 27 | # If a `.gitignore` file aleady exists, append conditions to the `.gitignore` file. 28 | gig gen java intellij sublimetext 29 | 30 | # If you want to overrride a `.gitignore` file, add commands to options : --override (shortcut : -o) 31 | gig gen -o java intellij sublimetext 32 | 33 | ``` 34 | 35 | ### packaging template 36 | 37 | pkg command is to create a custom template. 38 | 39 | ``` 40 | # If a 'mypakage' file aleady exists, append conditions to the 'mypakage' file. 41 | gig pkg -name 'mypakage' java intellij sublimetext 42 | 43 | # if you want to override a `mypakage` file, add commands to options : --override (shortcut : -o) 44 | gig pkg -name 'mypakage' -o java intellij sublimetext 45 | 46 | gig show mypakage 47 | *.class 48 | 49 | # Package Files # 50 | *.jar 51 | *.war 52 | *.ear 53 | 54 | intellij : 55 | *.iml 56 | *.ipr 57 | *.iws 58 | .idea/ 59 | 60 | sublimetext : 61 | # SublimeText project files 62 | *.sublime-workspace 63 | ``` 64 | 65 | ### Display ignore conditions. 66 | 67 | ``` 68 | gig show java intellij sublimetext 69 | ``` 70 | 71 | ### More Information 72 | 73 | ``` 74 | gig --help 75 | ``` 76 | 77 | ## gitignore template files sourced in 78 | 79 | [GitHub gitignore repository](https://github.com/github/gitignore) 80 | 81 | ## Screenshot 82 | 83 | ![gig](https://raw.github.com/hackrslab/gig/master/screenshot.jpg) 84 | 85 | ## ChangeLog 86 | 87 | [See the ChangeLog](https://github.com/hackrslab/gig/tree/master/ChangeLog) 88 | 89 | ## LICENCE 90 | 91 | ## MIT LICENSE 92 | 93 | The MIT License 94 | 95 | Copyright (c) 2013 The gig Authors 96 | 97 | See the [LICENSE](https://github.com/hackrslab/gig/tree/master/LICENSE) file for details. 98 | 99 | -------------------------------------------------------------------------------- /bin/gig: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var gig = require('../lib/gig') 4 | nopt = require('nopt'), 5 | option = require('../lib/gig/option'); 6 | 7 | 8 | var parsed = nopt(option.known,option.shortcut,process.argv,2); 9 | 10 | var cmd = parsed.argv.remain, 11 | opt = parsed; 12 | 13 | gig.tasks(cmd,opt); -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * gig 3 | * 4 | * Copyright (c) 2013 Insanehong 5 | * 6 | * Contributors 7 | * 8 | * Licensed under the MIT license. 9 | * https://github.com/insanehong/gig/blob/master/LICENSE 10 | */ 11 | var path = require('path'); 12 | var config = require('./package.json'); 13 | 14 | var config = { 15 | title : 'gig', 16 | version : config.version, 17 | _baseDir : __dirname, 18 | _libDir : path.join(__dirname,'lib'), 19 | _moduleDir : path.join(__dirname,'lib','gig'), 20 | _fileDir : path.join(__dirname,'gitignore'), 21 | _ext : '.gitignore', 22 | _saveDir : path.join(process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE,'.gig') 23 | }; 24 | 25 | module.exports = config; 26 | -------------------------------------------------------------------------------- /contrib/git-bash-ext/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 2 | 2013.06.07 3 | 4 | * Add git ignore init / git ignore add / git ignore apply / git ignore update / git ignore list 5 | -------------------------------------------------------------------------------- /contrib/git-bash-ext/README.md: -------------------------------------------------------------------------------- 1 | # Git Ignore Bash Extension 2 | 3 | Don't need to install NodeJS 4 | 5 | ## Install 6 | 7 | ```shell 8 | # stable version 9 | $ wget --no-check-certificate https://raw.github.com/insanehong/gig/master/contrib/git-bash-ext/contrib/installer.sh -O - | bash 10 | # or 11 | $ wget --no-check-certificate https://raw.github.com/insanehong/gig/master/contrib/git-bash-ext/contrib/installer.sh -O - | sudo bash 12 | 13 | # unstable version 14 | $ wget --no-check-certificate https://raw.github.com/dgkim84/gig/master/contrib/git-bash-ext/contrib/installer.sh -O - | bash 15 | # or 16 | $ wget --no-check-certificate https://raw.github.com/dgkim84/gig/master/contrib/git-bash-ext/contrib/installer.sh -O - | sudo bash 17 | ``` 18 | 19 | ## Usage 20 | 21 | * git ignore init 22 | * git ignore update 23 | * git ignore list 24 | * git ignore add 25 | * git ignore apply 26 | 27 | ```shell 28 | $ git ignore 29 | usage: git ignore 30 | 31 | Available subcommands are: 32 | update - update git ignore extension 33 | 34 | init [template[ template ...]] - initialize .gitignore (remove and apply) 35 | list - list tmeplate 36 | add - append ignore pattern to .gitignore 37 | apply