Skip to content

Commit

Permalink
X-mkprj: add editorconfig template
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarotta committed Oct 14, 2019
1 parent 3c52d53 commit 9b3f01e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bioinfoconda/prj/X-mkprj.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,23 @@ function create_templates()
prjpath=$1
prjname=$(basename $prjpath)

# Snakemake templates
cp $templatespath/Snakefile $prjpath/local/snakefiles/main.smk
cp $templatespath/latex.smk $prjpath/local/snakefiles/
sed_template $templatespath/snakemake_config.yml > $prjpath/local/config/snakemake_config.yml

# Docker templates
sed_template $templatespath/Dockerfile > $prjpath/local/dockerfiles/Dockerfile
sed_template $templatespath/docker-entrypoint.sh > $prjpath/local/dockerfiles/docker-entrypoint.sh
cp $templatespath/dockerignore $prjpath/local/dockerfiles/dockerignore

# Rmarkdown templates
sed_template $templatespath/notebook.Rmd > $prjpath/local/doc/report/notebook.Rmd

# Editorconfig
cp $templatespath/editorconfig $prjpath/.editorconfig

# Symbolic links
ln -s ../local/snakefiles/main.smk $prjpath/dataset/Snakefile
ln -s local/dockerfiles/dockerignore $prjpath/.dockerignore

Expand Down
21 changes: 21 additions & 0 deletions bioinfoconda/templates/editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Trim trailing whitespace when saving
[*]
trim_trailing_whitespace = true

# 4 space indentation
[*]
indent_style = space
indent_size = 4

# # Indentation override for all files under lib directory
# [lib/**]
# indent_style = unset
# indent_size = unset

0 comments on commit 9b3f01e

Please sign in to comment.