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

generate-gitignore #1407

Merged
merged 1 commit into from
Oct 27, 2019
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions lib/review/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def execute(*args)
generate_style(dir)
generate_texmacro(dir)
generate_config(dir)
generate_gitignore(dir)
generate_locale(dir) if @locale
generate_rakefile(dir)
generate_gemfile(dir)
Expand Down Expand Up @@ -156,6 +157,10 @@ def generate_config(dir)
File.open(File.join(dir, 'config.yml'), 'w') { |f| f.write content }
end

def generate_gitignore(dir)
FileUtils.cp(File.join(@review_dir, 'samples/sample-book/src/.gitignore'), dir)
end

def generate_style(dir)
FileUtils.cp(File.join(@review_dir, 'samples/sample-book/src/style.css'), dir)
end
Expand Down
153 changes: 153 additions & 0 deletions samples/sample-book/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/*.pdf
/*.epub
/*.html
/webroot
/*-pdf
/*-epub
/*-text

/vendor
/.bundle

# Created by https://www.gitignore.io/api/vim,linux,macos,emacs,windows
# Edit at https://www.gitignore.io/?templates=vim,linux,macos,emacs,windows

### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*

# Org-mode
.org-id-locations
*_archive

# flymake-mode
*_flymake.*

# eshell files
/eshell/history
/eshell/lastdir

# elpa packages
/elpa/

# reftex files
*.rel

# AUCTeX auto folder
/auto/

# cask packages
.cask/
dist/

# Flycheck
flycheck_*.el

# server auth directory
/server/

# projectiles files
.projectile

# directory configuration
.dir-locals.el

# network security
/network-security.data


### Linux ###

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/vim,linux,macos,emacs,windows