Skip to content

Commit

Permalink
added with_documentation condition
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofucci committed Oct 3, 2013
1 parent c3e3a9e commit e518362
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"author_name": "Your Name",
"email": "Your email",
"description": "A short description of the project.",
"year": "Current year"
"year": "Current year",
"with_documentation": "yes"
}
8 changes: 8 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import shutil

with open('./requirements/local.txt', 'r') as f:
if 'Sphinx' not in f.read():
shutil.rmtree('./docs')
2 changes: 1 addition & 1 deletion {{cookiecutter.repo_name}}/requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r testing.txt

Sphinx
{% if cookiecutter.with_documentation == 'yes' %}Sphinx{% endif %}

0 comments on commit e518362

Please sign in to comment.